home *** CD-ROM | disk | FTP | other *** search
- HOW TO DO IT IN COMAL 0.14
-
- ** How to start C64 COMAL 0.14
-
- Put COMAL disk into drive then type:
-
- load "boot*",8
- run
-
- ** How to return to BASIC from COMAL
-
- Type the command:
-
- basic
-
- ** How to see what is on a disk
-
- Put the disk into the drive. Type:
-
- cat
-
- The CTRL key slows the display
- scroll.
-
- ** How to retrieve programs from disk
-
- Put the disk into the drive. Find the
- program name exact spelling (see CAT
- above). Type the command (replace
- name with the name of the program you
- want):
-
- load "name"
-
- ** How to run a program that is
- already in the computer
-
- Issue the command:
-
- run
-
- ** How to run a program from disk
-
- Put the disk into the drive. Find the
- exact program name (see CAT above).
- Type the command (replace name with
- the name of the program you want to
- run):
-
- chain "name"
-
- ** How to stop a running program
-
- Press the STOP key. If that doesn't
- work, press the RESTORE key and STOP
- key simultaneously (resets COMAL).
-
- ** How to look at a program
-
- If the program is not in the computer
- yet, first LOAD the program:
-
- load "name"
-
- To see the program in the computer
- type:
-
- list
-
- The CTRL key slows down the display.
- To pause it, press the SPACE BAR.
- Press SPACE again to resume. See page
- 38 of COMAL From A To Z for more
- information.
-
- ** How to write a new program
-
- Issue the commands:
-
- new
- auto
-
- Now, type in the program. Hit RETURN
- key twice in a row to stop the AUTO
- mode. See the free COMAL INFO booklet
- for more info.
-
- ** How to erase lines in a program
-
- Find the line number of the line to
- be erased (line 100 in this example),
- then issue a DEL command:
-
- del 100
-
- You may delete a block of lines all
- at once. Find the first and last line
- numbers in the block of lines (lines
- 500 thru 750 for this example), then
- issue a DEL command:
-
- del 500-750
-
- See page 20 of COMAL From A To Z for
- more info.
-
- ** How to add lines to the end of a
- program
-
- The program must be in the computer.
- Find the last line number currently
- used (630 for this example). Then
- issue the command:
-
- auto 640
-
- Specify a starting line that is 10
- more than the last line in the
- program.
-
- ** How to add lines in the middle of
- a program
-
- The program must be in the computer.
- Locate the place you wish to add a
- line. For example, between the
- following:
-
- 0040 PRINT "WELCOME TO MY PROGRAM"
- 0050 PRINT "HOPE YOU ENJOY IT"
-
- Type in the line to add, using a line
- number between the two lines.
-
- 0045 PRINT "WRITTEN ON DEC 25, 1985"
-
- Numbering a program by 10's allows
- you to easily add up to 9 lines
- between any current lines.
-
- ** How to renumber a program
-
- If you add or delete lines in a
- program, it is easy to restore the
- program to be numbered by 10's. Issue
- the command:
-
- renum
-
- See page 51 of COMAL From A To Z for
- more information about RENUM.
-
- ** How to store a program on disk
-
- Type the command (replace name with
- the name that you wish to store the
- program as):
-
- save "name"
-
- ** How to merge program segments
-
- COMAL allows you to store common
- routines and useful procedures on
- disk in ASCII form so that they may
- later be merged into other programs.
- To store the routines to disk use the
- LIST command (with appropriate line
- number range) with an added file name
- after it:
-
- list 9600-9730 "filename"
-
- In COMAL 0.14 the line numbers are
- significant - and you must be careful
- that they do not conflict with the
- line numbers in the program they are
- merged into. To avoid this problem,
- you may wish to renumber the routines
- in the 9000 line number range. Later,
- you can merge that segment into
- another program:
-
- FROM COMAL 0.14:
-
- enter "filename"
-
- ** How to list a program on the
- printer
-
- Make sure the program is in the
- computer. Issue the commands:
-
- select "lp:"
- list
-
- ** How to set printer auto linefeeds
-
- linefeed+ turns linefeeds on
- linefeed- turns linefeeds off
-
- ** How to access the device and
- secondary address
-
- Send all output to printer device 4,
- secondary address 7 (lower case
- mode):
-
- open file 255,"lp:",unit 4,7,write
- select "lp:"
-
- Send output to device 5 printer:
-
- open file 255,"lp:",unit 5,write
- select "lp:"
-
- Access to disk drive device 9 rather
- than default device 8 by adding a
- ",9" at the end of many commands:
-
- save "name",9
- load "name",9
- chain "name",9
- open file 2,"name",unit 9,read
-
- ** How to flip text and graphics
- screens
-
- Initialize the graphics screen the
- first time (choose type of screen 0
- or 1):
-
- setgraphic 0 // <-- hi res
- setgraphic 1 // <-- multi-color
-
- Once the screen is chosen, you can
- flip between graphics and text easily
- with the function keys:
-
- f1 - flips to the text screen
- f3 - flips to the graphics screen
- with text window at top
- (called split screen)
- f5 - flips to the graphics screen
-