; 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