home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 June / Ahoy_Magazine_86-06_1986_Double_L.d64 / information < prev    next >
Text File  |  2022-10-26  |  5KB  |  245 lines

  1. HOW TO DO IT IN COMAL 0.14
  2.  
  3. ** How to start C64 COMAL 0.14
  4.  
  5. Put COMAL disk into drive then type:
  6.  
  7.    load "boot*",8
  8.    run
  9.  
  10. ** How to return to BASIC from COMAL
  11.  
  12. Type the command:
  13.  
  14.    basic
  15.  
  16. ** How to see what is on a disk
  17.  
  18. Put the disk into the drive. Type:
  19.  
  20.    cat
  21.  
  22. The CTRL key slows the display
  23. scroll.
  24.  
  25. ** How to retrieve programs from disk
  26.  
  27. Put the disk into the drive. Find the
  28. program name exact spelling (see CAT
  29. above). Type the command (replace
  30. name with the name of the program you
  31. want):
  32.  
  33.    load "name"
  34.  
  35. ** How to run a program that is
  36. already in the computer
  37.  
  38. Issue the command:
  39.  
  40.    run
  41.  
  42. ** How to run a program from disk
  43.  
  44. Put the disk into the drive. Find the
  45. exact program name (see CAT above).
  46. Type the command (replace name with
  47. the name of the program you want to
  48. run):
  49.  
  50.    chain "name"
  51.  
  52. ** How to stop a running program
  53.  
  54. Press the STOP key. If that doesn't
  55. work, press the RESTORE key and STOP
  56. key simultaneously (resets COMAL).
  57.  
  58. ** How to look at a program
  59.  
  60. If the program is not in the computer
  61. yet, first LOAD the program:
  62.  
  63.    load "name"
  64.  
  65. To see the program in the computer
  66. type:
  67.  
  68.    list
  69.  
  70. The CTRL key slows down the display.
  71. To pause it, press the SPACE BAR.
  72. Press SPACE again to resume. See page
  73. 38 of COMAL From A To Z for more
  74. information.
  75.  
  76. ** How to write a new program
  77.  
  78. Issue the commands:
  79.  
  80.    new
  81.    auto
  82.  
  83. Now, type in the program. Hit RETURN
  84. key twice in a row to stop the AUTO
  85. mode. See the free COMAL INFO booklet
  86. for more info.
  87.  
  88. ** How to erase lines in a program
  89.  
  90. Find the line number of the line to
  91. be erased (line 100 in this example),
  92. then issue a DEL command:
  93.  
  94.    del 100
  95.  
  96. You may delete a block of lines all
  97. at once. Find the first and last line
  98. numbers in the block of lines (lines
  99. 500 thru 750 for this example), then
  100. issue a DEL command:
  101.  
  102.    del 500-750
  103.  
  104. See page 20 of COMAL From A To Z for
  105. more info.
  106.  
  107. ** How to add lines to the end of a
  108. program
  109.  
  110. The program must be in the computer.
  111. Find the last line number currently
  112. used (630 for this example). Then
  113. issue the command:
  114.  
  115.    auto 640
  116.  
  117. Specify a starting line that is 10
  118. more than the last line in the
  119. program.
  120.  
  121. ** How to add lines in the middle of
  122. a program
  123.  
  124. The program must be in the computer.
  125. Locate the place you wish to add a
  126. line. For example, between the
  127. following:
  128.  
  129. 0040 PRINT "WELCOME TO MY PROGRAM"
  130. 0050 PRINT "HOPE YOU ENJOY IT"
  131.  
  132. Type in the line to add, using a line
  133. number between the two lines.
  134.  
  135. 0045 PRINT "WRITTEN ON DEC 25, 1985"
  136.  
  137. Numbering a program by 10's allows
  138. you to easily add up to 9 lines
  139. between any current lines.
  140.  
  141. ** How to renumber a program
  142.  
  143. If you add or delete lines in a
  144. program, it is easy to restore the
  145. program to be numbered by 10's. Issue
  146. the command:
  147.  
  148.    renum
  149.  
  150. See page 51 of COMAL From A To Z for
  151. more information about RENUM.
  152.  
  153. ** How to store a program on disk
  154.  
  155. Type the command (replace name with
  156. the name that you wish to store the
  157. program as):
  158.  
  159.    save "name"
  160.  
  161. ** How to merge program segments
  162.  
  163. COMAL allows you to store common
  164. routines and useful procedures on
  165. disk in ASCII form so that they may
  166. later be merged into other programs.
  167. To store the routines to disk use the
  168. LIST command (with appropriate line
  169. number range) with an added file name
  170. after it:
  171.  
  172.   list 9600-9730 "filename"
  173.  
  174. In COMAL 0.14 the line numbers are
  175. significant - and you must be careful
  176. that they do not conflict with the
  177. line numbers in the program they are
  178. merged into. To avoid this problem,
  179. you may wish to renumber the routines
  180. in the 9000 line number range. Later,
  181. you can merge that segment into
  182. another program:
  183.  
  184. FROM COMAL 0.14:
  185.  
  186.   enter "filename"
  187.  
  188. ** How to list a program on the
  189. printer
  190.  
  191. Make sure the program is in the
  192. computer. Issue the commands:
  193.  
  194.    select "lp:"
  195.    list
  196.  
  197. ** How to set printer auto linefeeds
  198.  
  199.    linefeed+     turns linefeeds on
  200.    linefeed-     turns linefeeds off
  201.  
  202. ** How to access the device and
  203. secondary address
  204.  
  205. Send all output to printer device 4,
  206. secondary address 7 (lower case
  207. mode):
  208.  
  209.    open file 255,"lp:",unit 4,7,write
  210.    select "lp:"
  211.  
  212. Send output to device 5 printer:
  213.  
  214.    open file 255,"lp:",unit 5,write
  215.    select "lp:"
  216.  
  217. Access to disk drive device 9 rather
  218. than default device 8 by adding a
  219. ",9" at the end of many commands:
  220.  
  221.    save "name",9
  222.    load "name",9
  223.    chain "name",9
  224.    open file 2,"name",unit 9,read
  225.  
  226. ** How to flip text and graphics
  227. screens
  228.  
  229. Initialize the graphics screen the
  230. first time (choose type of screen 0
  231. or 1):
  232.  
  233.    setgraphic 0 //  <-- hi res
  234.    setgraphic 1 //  <-- multi-color
  235.  
  236. Once the screen is chosen, you can
  237. flip between graphics and text easily
  238. with the function keys:
  239.  
  240.    f1 - flips to the text screen
  241.    f3 - flips to the graphics screen
  242.           with text window at top
  243.           (called split screen)
  244.    f5 - flips to the graphics screen
  245.