From a1d04f2aad589212c3e77ec558304fc8b7efbb66 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Mon, 5 Dec 2022 21:14:45 +0100 Subject: [PATCH] added more $03xx vector definitions to C64/C128/CX16 syslib --- compiler/res/prog8lib/c128/syslib.p8 | 25 +++++++++++++++++++++++++ compiler/res/prog8lib/c64/syslib.p8 | 27 +++++++++++++++++++++++++++ compiler/res/prog8lib/cx16/syslib.p8 | 12 ++++++++++++ docs/source/todo.rst | 1 + 4 files changed, 65 insertions(+) diff --git a/compiler/res/prog8lib/c128/syslib.p8 b/compiler/res/prog8lib/c128/syslib.p8 index 5cc34f63b..33e947b8a 100644 --- a/compiler/res/prog8lib/c128/syslib.p8 +++ b/compiler/res/prog8lib/c128/syslib.p8 @@ -12,9 +12,34 @@ c64 { &ubyte COLOR = $00f1 ; cursor color ;;&ubyte HIBASE = $0288 ; screen base address / 256 (hi-byte of screen memory address) // TODO c128 ?? + + &uword IERROR = $0300 + &uword IMAIN = $0302 + &uword ICRNCH = $0304 + &uword IQPLOP = $0306 + &uword IGONE = $0308 + &uword IEVAL = $030a + &uword ICRNCH2 = $030c + &uword IQPLOP2 = $030e + &uword IGONE2 = $0310 + ; $0312 and $0313 are unused. &uword CINV = $0314 ; IRQ vector (in ram) &uword CBINV = $0316 ; BRK vector (in ram) &uword NMINV = $0318 ; NMI vector (in ram) + &uword IOPEN = $031a + &uword ICLOSE = $031c + &uword ICHKIN = $031e + &uword ICKOUT = $0320 + &uword ICLRCH = $0322 + &uword IBASIN = $0324 + &uword IBSOUT = $0326 + &uword ISTOP = $0328 + &uword IGETIN = $032a + &uword ICLALL = $032c + &uword IEXMON = $032e + &uword ILOAD = $0330 + &uword ISAVE = $0332 + &uword NMI_VEC = $FFFA ; 6502 nmi vector, determined by the kernal if banked in &uword RESET_VEC = $FFFC ; 6502 reset vector, determined by the kernal if banked in &uword IRQ_VEC = $FFFE ; 6502 interrupt vector, determined by the kernal if banked in diff --git a/compiler/res/prog8lib/c64/syslib.p8 b/compiler/res/prog8lib/c64/syslib.p8 index d97ca35ea..871a4a84b 100644 --- a/compiler/res/prog8lib/c64/syslib.p8 +++ b/compiler/res/prog8lib/c64/syslib.p8 @@ -11,9 +11,36 @@ c64 { &ubyte COLOR = $0286 ; cursor color &ubyte HIBASE = $0288 ; screen base address / 256 (hi-byte of screen memory address) + + &uword IERROR = $0300 + &uword IMAIN = $0302 + &uword ICRNCH = $0304 + &uword IQPLOP = $0306 + &uword IGONE = $0308 + &uword IEVAL = $030a + &ubyte SAREG = $030c ; register storage for A for SYS calls + &ubyte SXREG = $030d ; register storage for X for SYS calls + &ubyte SYREG = $030e ; register storage for Y for SYS calls + &ubyte SPREG = $030f ; register storage for P (status register) for SYS calls + &uword USRADD = $0311 ; vector for the USR() basic command + ; $0313 is unused. &uword CINV = $0314 ; IRQ vector (in ram) &uword CBINV = $0316 ; BRK vector (in ram) &uword NMINV = $0318 ; NMI vector (in ram) + &uword IOPEN = $031a + &uword ICLOSE = $031c + &uword ICHKIN = $031e + &uword ICKOUT = $0320 + &uword ICLRCH = $0322 + &uword IBASIN = $0324 + &uword IBSOUT = $0326 + &uword ISTOP = $0328 + &uword IGETIN = $032a + &uword ICLALL = $032c + &uword USERCMD = $032e + &uword ILOAD = $0330 + &uword ISAVE = $0332 + &uword NMI_VEC = $FFFA ; 6502 nmi vector, determined by the kernal if banked in &uword RESET_VEC = $FFFC ; 6502 reset vector, determined by the kernal if banked in &uword IRQ_VEC = $FFFE ; 6502 interrupt vector, determined by the kernal if banked in diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index 670eb8f09..45d165df2 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -85,6 +85,18 @@ asmsub RDTIM16() -> uword @AY { cx16 { ; irq, system and hardware vectors: + &uword IERROR = $0300 + &uword IMAIN = $0302 + &uword ICRNCH = $0304 + &uword IQPLOP = $0306 + &uword IGONE = $0308 + &uword IEVAL = $030a + &ubyte SAREG = $030c ; register storage for A for SYS calls + &ubyte SXREG = $030d ; register storage for X for SYS calls + &ubyte SYREG = $030e ; register storage for Y for SYS calls + &ubyte SPREG = $030f ; register storage for P (status register) for SYS calls + &uword USRADD = $0311 ; vector for the USR() basic command + ; $0313 is unused. &uword CINV = $0314 ; IRQ vector (in ram) &uword CBINV = $0316 ; BRK vector (in ram) &uword NMINV = $0318 ; NMI vector (in ram) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 0d0fdfe4f..265ba6569 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,6 +3,7 @@ TODO For next release ^^^^^^^^^^^^^^^^ +- why slow stack eval for "if c64.READST() & $40" ? - regression test the various projects before release ...