Table of Contents


The SYS commands calls a machine language subroutine at the specified address.


SYS <address> [FAST]

If used without the FAST directive, SYS will do the same as in CBM BASIC, that is, it will load the accumulator, the X and the Y register, and the status register with the bytes stored at addresses $030C-$030F before the call. When the subroutine exits, SYS will save the values of these registers to the same memory addresses.

If however it is used with the FAST directive, a simpler and faster procedure is taken: the program will just jump to the specified address, without loading and saving the registers before and after the call.


Use the FAST directive if you don't need to pass values in registers to the subroutine.


SYS $C000 FAST : REM calls a subroutine at $C000 without passing registers
SYS 64738 FAST : REM restarts the machine

REM -- Printing a character on screen using the KERNAL function CHROUT
POKE ACCU, 'A': REM to load accumulator with the PETSCII code of 'A'
SYS CHROUT : REM will output "A"