Re: A86: getkey program


[Prev][Next][Index][Thread]

Re: A86: getkey program




In a message dated 9/3/1998 8:01:27 PM Mountain Daylight Time,
electrum@tfs.net writes:

<< Try this (not tested):
 
 loop:
  call _getkey
  or a			; zero?
  jr z,loop		; wait until a key has been pressed
  ld hl,$3020		; (X, Y) location of text in HEX
  ld hl,(_penCol)
  ld h, 0		; Display3Dnum -----------------------
  ld l, a
  call UNPACK_HL
  add a, 48		; 48 is the start of character '0' (zero)
  ld c, a		; Save 3rd digit
  call UNPACK_HL
  add a, 48
  ld b, a		; Save 2nd digit
  call UNPACK_HL	
  add a, 48		; A =  1st digit
  call _vputmap		; Display 1st digit
  ld a, b
  call _vputmap		; Display 2nd digit
  ld a, c
  call _vputmap 		; Display 3rd digit
  jr loop		; ----------------------------------
  >>


I need a program that will tell me the number for the key. I mean like if I
push F1, it will display 11, and so forth.  I could do it the long way whereas
I would have to do a cp k1, etc. but I was wondering if there was a shorter
way.


Follow-Ups: