Re: A86: getkey program
[Prev][Next][Index][Thread]
Re: A86: getkey program
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 ; ----------------------------------
At 08:08 PM 9/3/98 EDT, you wrote:
>
>Does anybody have a getkey program in assembly that will give the key code
>number for the key you pressed. For example, it would look like this in
>basic:
>
>lbl a
>getky->z
>If z>0
>disp z
>goto a
>
>I really could use this. I need it to display the number at the same place
>every time for the small font.
>
>THANX
>Dan
>
--
David Phillips
mailto:electrum@tfs.net
ICQ: 13811951
AOL/AIM: Electrum32
Follow-Ups:
References: