Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site inuxd.UUCP Path: utzoo!watmath!clyde!floyd!harpo!eagle!mhuxl!ihnp4!inuxc!inuxd!porter From: porter@inuxd.UUCP (J Porter) Newsgroups: net.micro Subject: COMAL: a better BASIC for your 64 Message-ID: <477@inuxd.UUCP> Date: Tue, 6-Mar-84 08:28:27 EST Article-I.D.: inuxd.477 Posted: Tue Mar 6 08:28:27 1984 Date-Received: Wed, 7-Mar-84 07:26:47 EST Organization: AT&T Consumer Products Div., Indianapolis Lines: 627 ======================================================================== For those of you who have been missing out on the lastest free operating system for your C64, take note. This is probably of general interest anyways. COMAL is like SIMON'S BASIC only better (in most respects), and you can't beat the price, because it's in the public domain. The following is a short description followed by a complete command summary. Every 64 owner ought to have this one. Jeff Porter (inuxd!porter) AT&T Consumer Products Indianapolis ======================================================================= COMAL FOR THE COMMODORE 64 Welcome to COMAL, the language designed to replace BASIC. This information is as of November 25, 1983 and is subject to change. COMAL TODAY newsletter is the source for up to date information about COMAL, as well as many helpful hints and tutorial articles. Contributors to this newsletter include Borge Christensen (founder of COMAL), UniComal Aps (Authors of all CBM COMAL systems), and Len Lindsay (author of COMAL HANDBOOK). It is published by the COMAL Users Group (USA) for $14.95. The COMAL HANDBOOK is meant to be a complete reference for all versions of CBM COMAL. This book is published by Reston Publishing (1-800-336-0338). It retails for about $18.95 and is available through most large book stores, such as B. Daltons, or from the COMAL Users Group (USA). The CAPTAIN COMAL series of book/disk packages are meant to be tutorials to modular programming with COMAL. The first, CAPTAIN COMAL GETS ORGANIZED, is available from the COMAL Users Group for $19.95 (including book and disk). CBM COMAL version 0.14 on this disk includes added graphics, turtle, and sprite commands. Also the keywords KEY$ and PRINT USING are included. Otherwise COMAL HANDBOOK first edition can be used as reference for version 0.14. (Whenever the book mentions version 0.12, just replace it with 0.14). The only difference is in selecting the output location. Version 0.12 used SELECT OUTPUT "LP" and SELECT OUTPUT "DS". Version 0.14 uses SELECT OUTPUT "LP:" and SELECT OUTPUT "DS:". The colon is now required, allowing it to be compatible with the advanced file handling system employed by the version 2.00 cartridge due for release Spring 1984. The graphics, sprite, and turtle commands will be documented by the book COMMODORE 64 GRAPHICS AND SOUND WITH COMAL to be published by Reston Publishing Summer 1984. A brief summary of all these added commands and statements are included in the data file on this disk called INSTRUCTIONS. Run the program SEE'INSTRUCTIONS to read about them. It lists all the words with their correct syntax. [ed: shown below] There are two ways to store programs on the disk, and two corresponding ways to retrieve them: SAVE "NAME" This saves the program currently in the computer onto disk as a binary file with the name you specified inside quotes. It can be retrieved via LOAD, but only with an exact same CBM COMAL version. LIST "NAME.L" This stores the program currently in the computer onto disk as an ASCII file with the name you specified inside quotes (we suggest that you end the file name with a .L to remind you later that the file is a LIST file). The file is a bit larger than the same program stored via SAVE. However, this ASCII file has many additional uses. It can be retrieved by ANY CBM COMAL version. It can be merged with another program at a later time. It can be read by another program using INPUT FILE statements. LOAD "NAME" This will erase the current program first, then will retrieve the program stored on disk with the name you specified inside quotes. Then to run the program issue the RUN command. CHAIN "NAME" This is similar to the LOAD command, but the program will LOAD and RUN automatically. ENTER "NAME.L" This will merge the program or program segment from disk with the one currently in the computer (remember the suggested .L at the end of the file name). Line numbers are significant during this process in version 0.14. If a line is ENTERed with a same line number as one already existing in the computer, the previous line is deleted and the new line ENTERed replaces it. To avoid this problem, simply RENUMber a program or program segment to high line number before LISTing it to disk (ie, RENUM 8000). To retrieve a whole program, issue the NEW command first, then the ENTER command. To list the program currently in the computer to the printer: SELECT OUTPUT "LP:" LIST To see what is on your disk: CAT SPECIAL NOTE: Due to a peculiarity in the C64 serial IEEE to disk and printer you cannot select output to printer and then do a CAT. But the COMAL USERS GROUP (USA) has provided you a way to print a disk directory on the printer bypassing this problem. Try the program called "PRINT'DIRECTORY". NOTE ON OLD COMAL 0.12 PROGRAMS Programs written for version 0.12 will run on version 0.14. But LIST them to disk from version 0.12 and ENTER them into 0.14. The LOAD/SAVE files are not completly compatible and could lock out your system. Do NOT try to LOAD a BASIC program file into COMAL. COMAL gets upset. ====================================== COMAL Users Group 5501 Groveland Terrace Madison, WI 53716 (608) 222-4432 Include $2 Shipping/Handling with every order. Or send a self addressed stamped envelope for more information. Prices listed are subject to change. COMAL KEYWORDS: (version 0.14) // -- allows comments in a program //[] ABS -- gives the absolute value ABS() AND -- logical AND AND APPEND -- start at end of seq file OPEN [FILE] ,,APPEND ATN -- arctangent in radians ATN() AUTO -- automatic line numbering AUTO [][,] BASIC -- back into BASIC mode BASIC CASE -- multiple choice decisions CASE [OF] CAT -- gives disk directory CAT [] CHAIN -- load & run program on disk CHAIN CHR$ -- gives that numbers character CHR$() CLOSE -- closes files CLOSE [[FILE] ] CLOSED -- all proc/func variables local PROC [(params)] [CLOSED] FUNC [(params)] [CLOSED] CON -- continue program execution CON COS -- cosine in radians COS() DATA -- provides data for a READ DATA [,][,...] DEL -- deletes lines DEL DELETE -- deletes a file from disk DELETE DIM -- allocates string & array space DIM OF DIM () OF DIM () DIV -- division with integer answer DIV DO -- do the following statements DO EDIT -- list lines without indentations EDIT [] ELIF -- short for ELSE IF condition ELIF [THEN] ELSE -- IF struc alternative statements ELSE END -- halt program execution END ENDCASE -- end of CASE structure ENDCASE ENDFOR -- end of FOR structure ENDFOR [] ENDFUNC -- end of function ENDFUNC [] ENDIF -- end of IF structure ENDIF ENDPROC -- end of procedure ENDPROC [] ENDWHILE -- end of WHILE structure ENDWHILE ENTER --merge program segment from disk ENTER EOD -- End Of Data flag EOD EOF -- End Of File flag EOF() ESC -- stop key pressed flag ESC TRAP ESC EXEC -- execute a procedure [EXEC] [()] EXP -- natural log e to n EXP() FALSE -- predefined value = 0 FALSE FILE -- specifies that a file is used INPUT FILE [,]: PRINT FILE [,]: READ FILE [,]: WRITE FILE [,]: OPEN [FILE] ,[,] CLOSE [[FILE] ] FOR -- start of FOR loop structure FOR = TO [STEP ] [DO] FUNC -- start of a multiline function FUNC [()] [EXTERNAL ] FUNC [()] [CLOSED] GOTO -- go to line with this name GOTO