Commodore-64 Comal 80 rev 2.01

From C64-Wiki
Jump to navigationJump to search
Comal 80 rev. 2.01
Comal80_Modul_Startup_message
Developers Jens Erik Jensen, Mogens Kjær, Helge Lassen, Lars Laursen
Publisher Unicomal , Commodore Data
Release 1984, 1985
platform(s) C64
Genre Development system for language Comal
Control C64-icon.png
Media Cartridge-icon.png
Language English
Information ...


Description[edit]

COMAL Cartridge

COMAL 80 v2.01 on Commodore 64 is Unicomal's ApS implementation of the COMAL80 standard for Commodore Data A/S on Cartridge.


Shipment[edit]

The developement system contains one cartridge with COMAL 80 and 5,25" floppy disks with demos and a manual.


Hardware Specifications[edit]

Minimum:

also:

Documentation[edit]


Cartridge Structure[edit]

The C64 Comal80 cartridge size is 64 KB (4 banks x 16KB + 16KB possible EPROM + 16KB possible EPROM) and it's using bankswitching, so that only 16 KB is visible at a time in the C64 memory map at address $8000 to $BFFF. By write too address $DE00 or call comal system routine, you can control which comal80 module routines you can call in our own mashineprogram.


Difference between v2.0 and rev. 00.14[edit]

rev. 00.14 is a diskloading system where Comal 80 is loaded from Diskdrive, it gives only 12 KB programming space, compared to v2.0 where there is 30 KB programming space and some other features.


Comal programs saved must be loaded with same version, a solution to overcome this, is to LIST the program to Diskdrive.


  • The variable used in FOR is not local in rev. 00.14 where it is local in v2.0.
  • CLOSED procecures or functions names is global in rev. 00.14 where in v2.0 it is local a must use IMPORT to be used.
  • SPRITES IDENTIFY must follow a SHOWSPRITE in v2.0.
  • Tranfering arrays in function calls in rev. 00.14 it only needs the name, in v2.0 the name must be followed by a (,).
  • Function calls with parameters can be used without () in rev. 00.14 where in v2.0 you must use ().
  • Direct access can be done in rev. 00.14, it is forbidden in v2.0.
  • UNIT was used in rev. 00.14 to specify device, in v2.0 only needs to type "0:" for use device 8.
  • CLOSE FILE 255 is deleted in program in v2.0.
  • In rev. 00.14 Packages GRAPHICS and SPRITES is included in program where in v2.0 it must use USE Package.
  • CLEAR in rev. 00.14 is now CLEARSCREEN in v2.0.
  • SETTEXT in rev. 00.14 is now TEXTSCREEN in v2.0.
  • SETGRAPHICS in rev. 00.14 is now GRAPHICSSCREEN in v2.0.
  • HOME in rev. 00.14 is center of the screen where in v.2.0 it is (0,0).
  • FRAME in rev. 00.14 is changed to WINDOW in v2.0.


ONLY in v2.0[edit]

  • FULL Comal Kernal
  • Defineable functionkeys
  • Graphicsscreen dumps
  • Better error messages
  • Modem communication
  • ASCII conversion
  • Batch files
  • External procedures
  • User Packages
  • Empty EPROM socket



Programming[edit]

Editor commands[edit]

Disk commands[edit]

Input & Output commands[edit]

File commands[edit]

Real Number functions[edit]

Integer functions[edit]

String functions[edit]


Structure[edit]

Variables[edit]

Type Declare Min value Max value
Real numbers variablename := 3.14 2.93873588e-39 1.70141183e38
Integer variablename# := 255 -32768 32767
Hexadecimals variablename := $ffff 0 65535
Binary numbers variablename := %1111111111111111 0 65535

Function[edit]

Procedure[edit]

Loops[edit]

Branches[edit]

Logical operators[edit]

Error handling[edit]

Others[edit]

Packages[edit]

Command: USE package

Expand COMAL 80[edit]

USE - LINK - DISCARD


Machinecode

Example of a package to expand Comal 80 with a function using Comal kernal functions, to subtract 2 real numbers for return a real number. Best methode is to assemble it with Assembler 64 from Commodore Data or a assembler who can assamble to OBJ type file in SEQ fileformat.

;
.LIB   C64SYMB         ;FILE FROM COMAL DEMODISK
;
       *=$8009         ;BEGIN ADDRESS
;
       .BYTE DEFPAG    ;52KB RAM MEMORY MAP
       .WORD END       ;MODULE END LABEL
       .WORD DUMMY     ;NO SIGNAL-HANDLER
;
;  PACKAGETABEL:
;
       .BYTE 4,'TEST'  ;PACKAGES NAME IS TEST
       .WORD TESTP     ;PROCEDURE-TABEL
       .WORD DUMMY     ;INGEN INITIALISERING
       .BYTE 0         ;NO MORE PACKAGES
;
;  PROCEDURE-TABEL:
;
TESTP  .BYTE 3,'SUB'
       .WORD PSUB
       .BYTE 0         ;NO MORE PROCEDURES
;
;  FUNC SUB(A,B)
;
PSUB   .BYTE FUNC+REAL,<SUB,>SUB,2
       .BYTE VALUE+REAL
       .BYTE VALUE+REAL
       .BYTE ENDFNC
;
SUB    LDA #1
       JSR FNDPAR
       LDA COPY1
       LDY COPY1+1
       JSR LDAC2
       LDA #2
       JSR FNDPAR
       LDA COPY1
       LDY COPY1+1
       JSR LDAC1
       JSR FPSUB2
       JSR PUSHA1
       RTS
;
END    .END

Manual[edit]


Literature[edit]


Links[edit]