home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR9 / ROPE.ZIP / ROPE.BAS (.txt) < prev    next >
QuickBASIC Tokenized Source  |  1992-04-06  |  25KB  |  284 lines

  1. screen1*
  2. loop1
  3. makecell
  4. drawbox
  5. icolor
  6. iboxM
  7. ivalue'
  8. BFLINE
  9. iconn
  10. drawconn~
  11. icaseo
  12. itestY
  13. itest1
  14. itest2f
  15. redraw
  16. compute
  17. nextboxl
  18. THENj
  19. juse=
  20. iboxtypeQ
  21. drawonec
  22. filenam@
  23. isaveF
  24. tempo
  25. musicK
  26. jsum]
  27. decimal
  28. digit
  29. THENn
  30. nprint
  31. nofile
  32. helpmsg
  33. Welcome
  34. Apraphul
  35. Computer
  36.     newscreenL
  37. harrows
  38. helparrowsv
  39. helphelp
  40. helpand
  41. helpor
  42. helpinvert
  43. helpnullZ
  44. @    helpvalue
  45. helpconn
  46. helpredraw
  47. helpcompute
  48. @    helpmusic
  49. helpstep
  50. helpfile
  51. helpexit
  52. isbox
  53. isvalue
  54. displaybox
  55. idbox
  56. idvalue
  57. COMMAND
  58. Press
  59. column
  60. @    helparrow
  61.  ### "
  62. *.rop"
  63. File name to save program"
  64. *.rop"
  65. File name to load program"
  66.  not found."
  67. Input new filename
  68. drawbox
  69. drawconn
  70. compute
  71. drawonec
  72. music
  73. helpmsg
  74. GREETINGS
  75.          Welcome to the Apraphul Rope Computer          
  76.   For details see COMPUTER RECREATIONS by A.K. Dewdney  
  77.  Scientific American, April 1988, v. 258 #4, p. 118-121 
  78.          Program copyright 1988 by Aaron Brown          
  79. ESSENTIALS
  80.  Press space bar  
  81.  to start program 
  82.  Type "e
  83.  to get  
  84.  back to help     
  85. COMMAND SUMMARY
  86.  Use cursor (arrow) keys; "e
  87. ; to move around screen                   
  88.  Type a command letter now to get additional help                             
  89.  Change box     
  90.  Change box inputs     
  91.  Start computation                   
  92.  A - AND box    
  93.  0 - all inputs false  
  94.  S - Step (compute this box only)    
  95.  I - INVERT box 
  96.  1 - top input true    
  97.  C - Compute until any key is hit    
  98.  N - NULL box   
  99.  2 - bottom input true 
  100.  M - Compute and play music          
  101.  O - OR box     
  102.  3 - both inputs true  
  103.  R - Redraw screen (no computation)  
  104.  Miscellaneous  
  105.  File Commands         
  106.  Input connections                   
  107.  H - Help       
  108.  F - Save to file      
  109.  U - reverse Up connection           
  110.  E - Exit       
  111.  L - Load from file    
  112.  D - reverse Down connection         
  113. helparrow
  114. HELP MESSAGE SCREEN FOR ARROW COMMANDS
  115. The arrow commands change the currently"
  116. selected box.  "
  117.  moves up one box, "
  118. moves down, 
  119.  moves right, and 
  120. moves left.  All motions wrap-around
  121. (the computer is a torus).  The"
  122. currently selected box is shown in a
  123. different color (or brightness) and"
  124. is the box affected by other commands.
  125. Press any key to return to the main"
  126. help message screen.
  127. helphelp
  128.     HELP MESSAGE SCREEN FOR 
  129.  COMMAND
  130. The HELP command prints the main help
  131. screen.  Any command typed when the
  132. help screen is displayed explains"
  133. that command rather than executing it.
  134. You cannot exit directly from the help
  135. screen, first type <space> to get to
  136. the main program, then type E.  Press"
  137. any key to return to the main help
  138. message screen."
  139. helpand
  140.    HELP MESSAGE SCREEN FOR "
  141.  COMMAND
  142. The ADD BOX command changes the"
  143. currently selected box to an AND box;"
  144. a box that outputs true only if both
  145. inputs are true.  The following four
  146. boxes show an AND with both inputs
  147. false, the top input true, the
  148. bottom input true, and both inputs
  149. true.  Press any key to return to"
  150. the main help message screen."
  151. helpexit
  152.     HELP MESSAGE SCREEN FOR 
  153.  COMMAND
  154. The EXIT command returns you to DOS.
  155. Press any key to return to the main"
  156. help message screen.
  157. helpstep
  158.     HELP MESSAGE SCREEN FOR 
  159.  COMMAND
  160. The SINGLE STEP command computes only"
  161. the currently selected box, setting"
  162. its output to correspond to its"
  163. input.  Press any key to return to
  164. the main help message screen."
  165. helpfile
  166.     HELP MESSAGE SCREEN FOR 
  167.  AND "
  168.     COMMANDS
  169. The FILE command stores the current"
  170. configurations (box types, connections
  171. and values) into a file.  LOAD reads
  172. a file to set the configuration.  If
  173. no extension is given, .ROP is
  174. assumed.  Press any key to return to
  175. the main help message screen."
  176. helpmusic
  177.     HELP MESSAGE SCREEN FOR 
  178.  COMMAND "
  179. The MUSIC command starts from the"
  180. currently selected box and recomputes"
  181. the boxes in column order.  It works
  182. until any key is pressed.  Each"
  183. computed column plays a note of music"
  184. the most significant three bits set"
  185. the length of the note: 0 for a whole"
  186. note, 1 for a half, 2 for a quarter,
  187. 3 for an 8th, 4 for a 16th, 5 for a"
  188. 32nd, 6 for a 64th, and 7 for skip."
  189. The remaining five bits set the pitch;
  190. 0 is E natural in the octave below
  191. middle C and each increment represents
  192. one half-step above (black or white"
  193. note).  Press any key to return to
  194. the main help message screen."
  195. helpcompute
  196.     HELP MESSAGE SCREEN FOR 
  197.  COMMAND
  198. The COMPUTE command starts from the
  199. currently selected box and recomputes"
  200. the boxes in column order.  It works
  201. until any key is pressed.  The numbers
  202. at the top of each column are the
  203. decimal equivalent of the 8-bit binary
  204. number in the column.  Press any key to"
  205. return to the main help message screen."
  206. helpredraw
  207.     HELP MESSAGE SCREEN FOR 
  208.  COMMAND
  209. The REDRAW command redraws the
  210. screen without changing anything."
  211. It is useful after a COMPUTE has
  212. left numbers on the screen."
  213. Press any key to return to
  214. the main help message screen."
  215. helpconn
  216.     HELP MESSAGE SCREEN FOR 
  217.  AND "
  218.     COMMANDS
  219. The CONNECTION commands change the
  220. input connections of the currently
  221. selected box.  A box can be connected"
  222. to the leftward boxes above, even with,"
  223. and below itself.  UP reverses the
  224. connection with the box above (it makes"
  225. the connection if it is not already"
  226. made and breaks it if it is already"
  227. made).  DOWN reverses the connection
  228. with the box below.  By using these"
  229. two commands, any connection pattern
  230. can be set.  Press any key to return to"
  231. the main help message screen."
  232. helpvalue
  233.     HELP MESSAGE SCREEN FOR 
  234. , and 
  235.  COMMANDS"
  236. The SET VALUE commands change the"
  237. input values of the currently selected
  238. box.  For NULL and INVERT boxes, 0 sets"
  239. the input false and 1 sets it true."
  240. For AND and OR boxes, 0 sets both"
  241. inputs false, 1 sets the top true,
  242. 2 sets the bottom true, and 3 sets
  243. both true.  The following four
  244. boxes show an AND with both inputs
  245. false (0), the top input true (1), the
  246. bottom input true (2), and both inputs
  247. true (3).  Press any key to return to"
  248. the main help message screen."
  249. helpnull
  250.    HELP MESSAGE SCREEN FOR "
  251.  COMMAND
  252. The NULL BOX command changes the
  253. currently selected box to a NULL box;"
  254. a box that outputs true if the input
  255. is true and false if the input is false.
  256. The two boxes below show a NULL with
  257. input false and an NULL with input
  258. true.  Press any key to return to"
  259. the main help message screen."
  260. helpinvert
  261.    HELP MESSAGE SCREEN FOR "
  262.  COMMAND
  263. The INVERT BOX command changes the
  264. currently selected box to an INVERT box;
  265. a box that outputs false if the input"
  266. is true and true if the input is false."
  267. The two boxes below show an INVERT with"
  268. input false and an INVERT with input
  269. true.  Press any key to return to"
  270. the main help message screen."
  271. helpor
  272.    HELP MESSAGE SCREEN FOR "
  273.  COMMAND
  274. The OR BOX command changes the
  275. currently selected box to an OR box;
  276. a box that outputs false only if both"
  277. inputs are false.  The following four"
  278. boxes show an OR with both inputs"
  279. false, the top input true, the
  280. bottom input true, and both inputs
  281. true.  Press any key to return to"
  282. the main help message screen."
  283. displaybox
  284.