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 $A000 may be added to the heap by using the following code:
/* Check for the existence of RAM */
if (PEEK(0xA000) == POKE(0xA000, PEEK(0xA000)+1)) {<br>
/* Add it to the heap */
_heapadd ((void *) 0xA000, 0x2000);
}
The runtime for the VIC20 uses routines marked as .CONDES
type 2 for
interrupt handlers. Such routines must be written as simple machine language
subroutines and will be called automatically by the interrupt handler code
when they are linked into a program. See the discussion of the .CONDES
feature in the
assembler manual.