This commit is contained in:
Irmen de Jong 2023-01-26 00:37:30 +01:00
parent 8b05abb80d
commit f1a7d5ecf7
2 changed files with 7 additions and 3 deletions

View File

@ -31,12 +31,14 @@ syslib
The "system library" for your target machine. It contains many system-specific definitions such
as ROM/Kernal subroutine definitions, memory location constants, and utility subroutines.
Depending on the compilation target, other routines may also be available in here specific to that target.
Best is to check the source code of the correct syslib module.
Many of these definitions overlap for the C64 and Commander X16 targets so it is still possible
to write programs that work on both targets without modifications.
This module is usually imported automatically and can provide definitions in the ``sys``, ``c64``, ``cx16``, ``c128``, ``atari`` blocks
depending on the chosen compilation target. Read the `syslib source code <https://github.com/irmen/prog8/tree/master/compiler/res/prog8lib>`_ for the correct compilation target to see exactly what is there.
sys (part of syslib)
--------------------
``target``

View File

@ -159,7 +159,9 @@ And for the Commander X16::
cx16.restore_irq() ; set everything back to the systems default irq handler
The Commander X16 provides two additional routines that should be used *in your IRQ handler routine* if it uses the Vera registers::
The Commander X16 syslib provides two additional routines that should be used *in your IRQ handler routine* if it uses the Vera registers.
They take care of saving and restoring the Vera state of the interrupted main program, otherwise the IRQ handler's manipulation
will corrupt any Vera operations that were going on in the main program. The routines are::
cx16.push_vera_context()
; ... do your work that uses vera here...