; A program to show how it is possible
; to use kl_log_ext more than once to register
; extension commands.
;
;; firmware functions we use in this example
kl_log_ext: equ &bcd1
txt_output: equ &bb5a
org &4000
start:
ld hl,bufferrsx1
ld bc,rsxtable1
call kl_log_ext
ld hl,bufferrsx2
ld bc,rsxtable2
call kl_log_ext
ret
rsxtable1:
dw rsxcmdtable1
jp functiona
bufferrsx1:
defs 4
rsxcmdtable1:
db "A"+&80
db 0
rsxtable2:
dw rsxcmdtable2
jp functionb
bufferrsx2:
defs 4
rsxcmdtable2:
db "B"+&80
db 0
functiona:
ld a,"A"
call txt_output
ret
functionb:
ld a,"B"
call txt_output
ret
;;end start