use macros for CPU-specific jumptable generation
This commit is contained in:
1 parent
f560e26c65
commit
f5b4e554ac
3 files changed
+236
-496
No files matched your search
@@ -40,59 +40,49 @@ __chrout_screen_jumptable_quote_guard:
|
||||
__chrout_screen_jumptable_codes_end:
|
||||
|
||||
|
||||
|
||||
.const chrout_list = List().add(
|
||||
|
||||
chrout_screen_CLR,
|
||||
chrout_screen_HOME,
|
||||
chrout_screen_SHIFT_OFF,
|
||||
chrout_screen_SHIFT_ON,
|
||||
chrout_screen_TXT,
|
||||
chrout_screen_GFX,
|
||||
chrout_screen_RVS_OFF,
|
||||
chrout_screen_RVS_ON,
|
||||
chrout_screen_CRSR_RIGHT,
|
||||
chrout_screen_CRSR_LEFT,
|
||||
chrout_screen_CRSR_DOWN,
|
||||
chrout_screen_CRSR_UP,
|
||||
chrout_screen_INS,
|
||||
#if CONFIG_EDIT_STOPQUOTE
|
||||
chrout_screen_STOP,
|
||||
#endif
|
||||
#if CONFIG_EDIT_TABULATORS
|
||||
chrout_screen_TAB_BW,
|
||||
chrout_screen_TAB_FW,
|
||||
#endif
|
||||
chrout_screen_DEL,
|
||||
chrout_screen_RETURN
|
||||
)
|
||||
|
||||
|
||||
#if !HAS_OPCODES_65C02
|
||||
|
||||
|
||||
chrout_screen_jumptable_lo:
|
||||
|
||||
.byte <(chrout_screen_CLR - 1)
|
||||
.byte <(chrout_screen_HOME - 1)
|
||||
.byte <(chrout_screen_SHIFT_OFF - 1)
|
||||
.byte <(chrout_screen_SHIFT_ON - 1)
|
||||
.byte <(chrout_screen_TXT - 1)
|
||||
.byte <(chrout_screen_GFX - 1)
|
||||
.byte <(chrout_screen_RVS_OFF - 1)
|
||||
.byte <(chrout_screen_RVS_ON - 1)
|
||||
.byte <(chrout_screen_CRSR_RIGHT - 1)
|
||||
.byte <(chrout_screen_CRSR_LEFT - 1)
|
||||
.byte <(chrout_screen_CRSR_DOWN - 1)
|
||||
.byte <(chrout_screen_CRSR_UP - 1)
|
||||
.byte <(chrout_screen_INS - 1)
|
||||
#if CONFIG_EDIT_STOPQUOTE
|
||||
.byte <(chrout_screen_STOP - 1)
|
||||
#endif
|
||||
#if CONFIG_EDIT_TABULATORS
|
||||
.byte <(chrout_screen_TAB_BW - 1)
|
||||
.byte <(chrout_screen_TAB_FW - 1)
|
||||
#endif
|
||||
.byte <(chrout_screen_DEL - 1)
|
||||
.byte <(chrout_screen_RETURN - 1)
|
||||
put_jumptable_lo(chrout_list)
|
||||
|
||||
|
||||
chrout_screen_jumptable_hi:
|
||||
|
||||
.byte >(chrout_screen_CLR - 1)
|
||||
.byte >(chrout_screen_HOME - 1)
|
||||
.byte >(chrout_screen_SHIFT_OFF - 1)
|
||||
.byte >(chrout_screen_SHIFT_ON - 1)
|
||||
.byte >(chrout_screen_TXT - 1)
|
||||
.byte >(chrout_screen_GFX - 1)
|
||||
.byte >(chrout_screen_RVS_OFF - 1)
|
||||
.byte >(chrout_screen_RVS_ON - 1)
|
||||
.byte >(chrout_screen_CRSR_RIGHT - 1)
|
||||
.byte >(chrout_screen_CRSR_LEFT - 1)
|
||||
.byte >(chrout_screen_CRSR_DOWN - 1)
|
||||
.byte >(chrout_screen_CRSR_UP - 1)
|
||||
.byte >(chrout_screen_INS - 1)
|
||||
#if CONFIG_EDIT_STOPQUOTE
|
||||
.byte >(chrout_screen_STOP - 1)
|
||||
#endif
|
||||
#if CONFIG_EDIT_TABULATORS
|
||||
.byte >(chrout_screen_TAB_BW - 1)
|
||||
.byte >(chrout_screen_TAB_FW - 1)
|
||||
#endif
|
||||
.byte >(chrout_screen_DEL - 1)
|
||||
.byte >(chrout_screen_RETURN - 1)
|
||||
put_jumptable_hi(chrout_list)
|
||||
|
||||
|
||||
#else // HAS_OPCODES_65C02
|
||||
|
||||
#else
|
||||
|
||||
__before_chrout_screen_jumptable:
|
||||
|
||||
@@ -100,31 +90,11 @@ __before_chrout_screen_jumptable:
|
||||
|
||||
chrout_screen_jumptable:
|
||||
|
||||
.word chrout_screen_CLR
|
||||
.word chrout_screen_HOME
|
||||
.word chrout_screen_SHIFT_OFF
|
||||
.word chrout_screen_SHIFT_ON
|
||||
.word chrout_screen_TXT
|
||||
.word chrout_screen_GFX
|
||||
.word chrout_screen_RVS_OFF
|
||||
.word chrout_screen_RVS_ON
|
||||
.word chrout_screen_CRSR_RIGHT
|
||||
.word chrout_screen_CRSR_LEFT
|
||||
.word chrout_screen_CRSR_DOWN
|
||||
.word chrout_screen_CRSR_UP
|
||||
.word chrout_screen_INS
|
||||
#if CONFIG_EDIT_STOPQUOTE
|
||||
.word chrout_screen_STOP
|
||||
#endif
|
||||
#if CONFIG_EDIT_TABULATORS
|
||||
.word chrout_screen_TAB_BW
|
||||
.word chrout_screen_TAB_FW
|
||||
#endif
|
||||
.word chrout_screen_DEL
|
||||
.word chrout_screen_RETURN
|
||||
put_jumptable(chrout_list)
|
||||
|
||||
// Make sure routine size is always the same - build system limitation
|
||||
|
||||
.if (__before_chrout_screen_jumptable == chrout_screen_jumptable) { brk }
|
||||
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user