#INCLUDE "offti-82.h" .ORG 0 #IFDEF OSHELL82 .DB "_getkey codes",0 #ENDIF ROM_CALL(CLEARLCD) CALL_(SHOWHEADER) ; Simply demonstrates CALL_() MAINLOOP: LD HL,$0801 ; Setup cursor to follow the header LD ($800C),HL ROM_GETKEY ; No setup needed, just wait for key CP $40 ; $40 is the code for [2nd] [QUIT] RET Z LD L,A LD H,0 ROM_CALL(D_HL_DECI) ; Display the value of A (key code) JUMP_(MAINLOOP) ; and repeat this process SHOWHEADER: LD HL,0 LD ($800C),HL LD HL,TOPLINE ; Point HL to the message LD DE,(PROGRAM_ADDR) ; but first we need to correct ADD HL,DE ; it - add to (PROGRAM_ADDR) ROM_CALL(D_ZT_STR) ; Display ASCIIZ string RET ; Return from subroutine TOPLINE: .DB "Scancode values:" .DB "Current:",0 ; Zero for end of text message .END