Command line arguments can be passed to main()
. Since this is not
supported by BASIC, the following syntax was chosen:
RUN:REM ARG1 " ARG2 IS QUOTED" ARG3 "" ARG5
main
is the program name.The program return code (low byte) is passed back to BASIC by use of the
ST
variable.
The extended memory at $9000 of the CBM 8x96 may be added to the heap by using the following code:
/* Check for the existence of RAM */
if (PEEK(0x9000) == POKE(0x9000, PEEK(0x9000)+1)) {
/* Add it to the heap */
_heapadd ((void *) 0x9000, 0x2000);
}