SYS
Abbreviation: S <SHIFT+Y>
TYPE: Statement
FORMAT: SYS <memory-location>
Action: This is the most common way to mix a BASIC program with
a machine language program. The machine language program begins
at the location given in the SYS statement. The system command
SYS is used in either direct or program mode to transfer control
of the microprocessor to an existing machine language program
in memory. The memory-location given is by numeric expression
and can be anywhere in memory, RAM or ROM.
When you're using the SYS statement you must end that section
of machine language code with an RTS (ReTurn from Subroutine)
instruction so that when the machine language program is finished,
the BASIC execution will resume with the statement following the
SYS command.
EXAMPLES of SYS Statement:
SYS 64738 (Jump to System Cold Start in ROM)
10 POKE 4400,96:SYS 4400 (Goes to machine code location 4400
and returns immediately)
|