fujirun/debug.s

32 lines
454 B
ArmAsm
Raw Normal View History

debugtext nop
sta SETTEXT
sta KBDSTROBE
?1 lda KEYBOARD
sta debug_last_key
cmp #$A0 ; space?
bne ?1
rts
2017-07-20 16:48:26 +00:00
printhex ; A = hex byte, X = column, Y = row; A is clobbered, X&Y are not
pha
stx param_x
lsr
lsr
lsr
lsr
tax
lda hexdigit,x
ldx param_x
jsr fastfont
pla
and #$0f
tax
lda hexdigit,x
ldx param_x
inx
jsr fastfont
rts
hexdigit .byte "0123456789ABCDEF"