This is your original code, as far as I can tell:
.org 9D95h
nop
nop
nop
nop
ld c, 09h ; ???
ld a, 0 ; ???
rst 28h ; \
.db 5Dh ; > DispTail, destroys AF, BC, DE, HL, aka
.db 49H ; / undefined behaviour in this case (we don't
; know what A contains)
ld b, 80h ; B <- 0x80
xor b ; A <- A XOR B
bit 0, a ; A[0] == 0, Z is set, if so
loop: rrc a ; rotate right A, C <- A[0]
jp z, 9D95h ; Jump to 9D95, if Z set
djnz loop ; Decrease B, jump if not zero to loop
ret ; After 128 jumps, returns
So all in all, they key code checking part was incorrect from the get go (calling the wrong ROM call and overly convoluted). Here's what seemed to work:
.org 9D95h
rst 28h ; \
.db 72h ; > Call GetKey, A <- key code
.db 49h ; /
cp 80h ; Compare A with immediate value 0x80 (subtract),
; key code for [+] is 0x80
jp nz, 9D95h ; Jump if Z is not set (was not 0x80)
ret ; return
or in hex:
EF 72 49 FE 80 C2 95 9D C9