d
i
g
i
t
a
l
digital equipment corporation · maynard, massachusetts
MEMORY ADDRESS
EMA
RUN
Towers of Hanoi

From comments at top of program:
THIS PROGRAM WORKS WITH THE TOWERS OF HANOI PROBLEM. YOU ARE GIVEN THREE TOWERS WITH VARIOUS SIZED DISCS ON ONE OF THEM. THE OBJECT IS TO PLACE ALL THE DISCS ON ANOTHER TOWER ON AT A TIME, WITH THE STIPULATION THAT A LARGER DISC MAY NEVER BE ON TOP OF A SMALLER ONE. THIS PROGRAM IS GOOD FOR ANY NUMBER OF DISCS AND CAN BE RUN EITHER IN MANUAL (YOU TELL IT WHERE TO MOVE) OR AUTOMATIC MODE. IT WILL ALSO EXPLAIN ITS MOVES OR DRAW THE FOR YOU, DEPENDING ON HOW YOU ANSWER THE 'MOVES OR PLOTS' QUESTION.
** OUT DISC IS THE DISC (1 ON TOP) THAT YOU WANT TO MOVE
** IN DISC IS THE POSITION (1 ON TOP) WHERE YOU MOVE TO
** OUT TOWER IS THE TOWER (1 ON LEFT) FROM WHICH YOU MOVE
** IN TOWER IS THE TOWER (3 ON RIGHT) YOU MOVE TO THIS PROGRAM ASSUMES NO CHEATING, AND DOES NOT CHECK FOR IT. Example session:

.RUN PFOCAL


DO YOU WANT THE STANDARD FEATURES OF PS/8 FOCAL, 1971?  Y


PROCEED.

*LIBRARY GO HANOI
NO. OF DISKS? 3

MOVES OR PLOTS? 
This seems to be a bug in the program. It should let you enter MOVES or PLOTS to select, but you need to enter 0 to have it print moves. If you enter PLOTS it will print the towers on the screen.
             #####                 #                   #
           #########               #                   #
         #############             #                   #

AUTO OR MANUAL? 
If you enter AUTO it will move the disks for you. If you enter manual you will be asked for the moves. You need to select which disk and what tower to move from and to. The program does not automatically take the top disk or put the disc on the top of the next tower, you need to tell it the correct spot on the tower show below. IN-DISC (destination) is three since the locations are numbered starting at one for the top of the tower. If you entered one it would have the disk sitting at the top of the tower with nothing below.
OUT-DISC: 1
TOWER: 1

IN-DISC: 3
TOWER: 2


               #                   #                   #
           #########               #                   #
         #############           #####                 #


Rest of game not show

Index of games and other help



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search