commit 91919c03e8d2dc86c9068a795a73b03483ec9e4a parent 7c97d60ed8a2c919e61d92cef7b8beb093f99f0b Author: Luxferre <3335173-suborg@users.noreply.gitlab.com> Date: Fri, 29 Jul 2022 08:53:50 +0300 input debugging start Diffstat:
M | tal-lib/esop-lib.tal | | | 29 | +++++++++++++++++++++++++++++ |
M | tal-lib/font.tal | | | 7 | +++++-- |
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/tal-lib/esop-lib.tal b/tal-lib/esop-lib.tal @@ -17,6 +17,35 @@ %HLT { #1f SYS } %DBG { #20 SYS SYS } +%DBGBYTE { DUP DBG } +%DBGSHORT { DUP2 SWP DBG DBG } + +( input helper macros ) + +%KP-0 { #0001 } +%KP-1 { #0002 } +%KP-2 { #0004 } +%KP-3 { #0008 } +%KP-4 { #0010 } +%KP-5 { #0020 } +%KP-6 { #0040 } +%KP-7 { #0080 } +%KP-8 { #0100 } +%KP-9 { #0200 } +%KP-A { #0400 } +%KP-B { #0800 } +%KP-C { #1000 } +%KP-D { #2000 } +%KP-STAR { #4000 } +%KP-HASH { #8000 } + +( jump to label or subroutine if a particular key is pressed ) +( label* keymask* -- ) +%JMPKEY { DBGSHORT INKEY AND2 SWP2 JCN2 } +%JSRKEY { INKEY AND2 SWP2 JSR2 } + +( misc macros ) ( byte to short ) %BTS { #00 SWP } + diff --git a/tal-lib/font.tal b/tal-lib/font.tal @@ -6,10 +6,13 @@ |0100 ;on-frame SETSCRVEC #10 #12 - BRK +BRK @on-frame - INC DUP2 PXL + ,&adv KP-A JMPKEY + BRK + &adv + INC DUP2 PXL BRK @putc