stub behaviour is now configurable
This commit is contained in:
1 parent
49f48eb615
commit
33b6b36fcb
18 files changed
+48
-14
No files matched your search
@@ -93,3 +93,9 @@ Feature needs about 330 bytes in BASIC segment.
|
||||
On the most widespread CPUs the D flag is not cleared upon entering interrupts. Since the original Kernal does not clear it either, it's not safe to use BCD processor mode without disabling the interrupts first. This option makes sure the D flag is disabled at the start of the interrupt - this allows some optimizations in the code.
|
||||
|
||||
Feature needs 2 bytes in KERNAL segmment (for CPUs needing the patch), but at the same time allows optimizations allowing to gain some more bytes. If unsure - enable.
|
||||
|
||||
### `CONFIG_STUBS_BRK`
|
||||
|
||||
Option just for debugging purposes - replaces `RTS` stubbed routines implementation with one causing a break.
|
||||
|
||||
If unsure - disable.
|
||||
@@ -22,3 +22,5 @@
|
||||
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
|
||||
// #define CONFIG_STUBS_BRK
|
||||
@@ -22,3 +22,5 @@
|
||||
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
|
||||
// #define CONFIG_STUBS_BRK
|
||||
@@ -22,3 +22,5 @@
|
||||
|
||||
#define CONFIG_DOS_WEDGE
|
||||
#define CONFIG_BCD_SAFE_INTERRUPTS
|
||||
|
||||
// #define CONFIG_STUBS_BRK
|
||||
@@ -58,4 +58,26 @@
|
||||
|
||||
#if CONFIG_BCD_SAFE_INTERRUPTS
|
||||
#define HAS_BCD_SAFE_INTERRUPTS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Stub configuration
|
||||
|
||||
.macro STUB_IMPLEMENTATION_RTS() {
|
||||
rts
|
||||
}
|
||||
|
||||
.macro STUB_IMPLEMENTATION_BRK() {
|
||||
.break
|
||||
brk
|
||||
brk
|
||||
jmp *-2
|
||||
}
|
||||
|
||||
.macro STUB_IMPLEMENTATION()
|
||||
{
|
||||
#if CONFIG_STUBS_BRK
|
||||
STUB_IMPLEMENTATION_BRK()
|
||||
#else
|
||||
STUB_IMPLEMENTATION_RTS()
|
||||
#endif
|
||||
}
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
MAIN:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
CHRNCH:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -2,4 +2,4 @@
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RUNC:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
QPLOP:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -2,4 +2,4 @@
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
NEWSTT:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
GONE:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
EVAL:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -7,4 +7,4 @@
|
||||
|
||||
|
||||
LINPRT:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
|
||||
|
||||
ERROR:
|
||||
rts // XXX implement this
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -2,4 +2,4 @@
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -2,4 +2,4 @@
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INITMSG:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -2,4 +2,4 @@
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -10,4 +10,4 @@
|
||||
//
|
||||
|
||||
SAVE:
|
||||
rts
|
||||
STUB_IMPLEMENTATION()
|
||||
Reference in new issue
Block a user