screen1* loop1 makecell drawbox icolor iboxM ivalue' BFLINE iconn drawconn~ icaseo itestY itest1 itest2f redraw compute nextboxl THENj juse= iboxtypeQ drawonec filenam@ isaveF tempo musicK jsum] decimal digit THENn nprint nofile helpmsg Welcome Apraphul Computer newscreenL harrows helparrowsv helphelp helpand helpor helpinvert helpnullZ @ helpvalue helpconn helpredraw helpcompute @ helpmusic helpstep helpfile helpexit isbox isvalue displaybox idbox idvalue COMMAND Press column @ helparrow ### " *.rop" File name to save program" *.rop" File name to load program" not found." Input new filename drawbox drawconn compute drawonec music helpmsg GREETINGS Welcome to the Apraphul Rope Computer For details see COMPUTER RECREATIONS by A.K. Dewdney Scientific American, April 1988, v. 258 #4, p. 118-121 Program copyright 1988 by Aaron Brown ESSENTIALS Press space bar to start program Type "e to get back to help COMMAND SUMMARY Use cursor (arrow) keys; "e ; to move around screen Type a command letter now to get additional help Change box Change box inputs Start computation A - AND box 0 - all inputs false S - Step (compute this box only) I - INVERT box 1 - top input true C - Compute until any key is hit N - NULL box 2 - bottom input true M - Compute and play music O - OR box 3 - both inputs true R - Redraw screen (no computation) Miscellaneous File Commands Input connections H - Help F - Save to file U - reverse Up connection E - Exit L - Load from file D - reverse Down connection helparrow HELP MESSAGE SCREEN FOR ARROW COMMANDS The arrow commands change the currently" selected box. " moves up one box, " moves down, moves right, and moves left. All motions wrap-around (the computer is a torus). The" currently selected box is shown in a different color (or brightness) and" is the box affected by other commands. Press any key to return to the main" help message screen. helphelp HELP MESSAGE SCREEN FOR COMMAND The HELP command prints the main help screen. Any command typed when the help screen is displayed explains" that command rather than executing it. You cannot exit directly from the help screen, first type to get to the main program, then type E. Press" any key to return to the main help message screen." helpand HELP MESSAGE SCREEN FOR " COMMAND The ADD BOX command changes the" currently selected box to an AND box;" a box that outputs true only if both inputs are true. The following four boxes show an AND with both inputs false, the top input true, the bottom input true, and both inputs true. Press any key to return to" the main help message screen." helpexit HELP MESSAGE SCREEN FOR COMMAND The EXIT command returns you to DOS. Press any key to return to the main" help message screen. helpstep HELP MESSAGE SCREEN FOR COMMAND The SINGLE STEP command computes only" the currently selected box, setting" its output to correspond to its" input. Press any key to return to the main help message screen." helpfile HELP MESSAGE SCREEN FOR AND " COMMANDS The FILE command stores the current" configurations (box types, connections and values) into a file. LOAD reads a file to set the configuration. If no extension is given, .ROP is assumed. Press any key to return to the main help message screen." helpmusic HELP MESSAGE SCREEN FOR COMMAND " The MUSIC command starts from the" currently selected box and recomputes" the boxes in column order. It works until any key is pressed. Each" computed column plays a note of music" the most significant three bits set" the length of the note: 0 for a whole" note, 1 for a half, 2 for a quarter, 3 for an 8th, 4 for a 16th, 5 for a" 32nd, 6 for a 64th, and 7 for skip." The remaining five bits set the pitch; 0 is E natural in the octave below middle C and each increment represents one half-step above (black or white" note). Press any key to return to the main help message screen." helpcompute HELP MESSAGE SCREEN FOR COMMAND The COMPUTE command starts from the currently selected box and recomputes" the boxes in column order. It works until any key is pressed. The numbers at the top of each column are the decimal equivalent of the 8-bit binary number in the column. Press any key to" return to the main help message screen." helpredraw HELP MESSAGE SCREEN FOR COMMAND The REDRAW command redraws the screen without changing anything." It is useful after a COMPUTE has left numbers on the screen." Press any key to return to the main help message screen." helpconn HELP MESSAGE SCREEN FOR AND " COMMANDS The CONNECTION commands change the input connections of the currently selected box. A box can be connected" to the leftward boxes above, even with," and below itself. UP reverses the connection with the box above (it makes" the connection if it is not already" made and breaks it if it is already" made). DOWN reverses the connection with the box below. By using these" two commands, any connection pattern can be set. Press any key to return to" the main help message screen." helpvalue HELP MESSAGE SCREEN FOR , and COMMANDS" The SET VALUE commands change the" input values of the currently selected box. For NULL and INVERT boxes, 0 sets" the input false and 1 sets it true." For AND and OR boxes, 0 sets both" inputs false, 1 sets the top true, 2 sets the bottom true, and 3 sets both true. The following four boxes show an AND with both inputs false (0), the top input true (1), the bottom input true (2), and both inputs true (3). Press any key to return to" the main help message screen." helpnull HELP MESSAGE SCREEN FOR " COMMAND The NULL BOX command changes the currently selected box to a NULL box;" a box that outputs true if the input is true and false if the input is false. The two boxes below show a NULL with input false and an NULL with input true. Press any key to return to" the main help message screen." helpinvert HELP MESSAGE SCREEN FOR " COMMAND The INVERT BOX command changes the currently selected box to an INVERT box; a box that outputs false if the input" is true and true if the input is false." The two boxes below show an INVERT with" input false and an INVERT with input true. Press any key to return to" the main help message screen." helpor HELP MESSAGE SCREEN FOR " COMMAND The OR BOX command changes the currently selected box to an OR box; a box that outputs false only if both" inputs are false. The following four" boxes show an OR with both inputs" false, the top input true, the bottom input true, and both inputs true. Press any key to return to" the main help message screen." displaybox