2005-03-26 17:03:30 +00:00
|
|
|
;
|
|
|
|
; Kevin Ruland
|
|
|
|
; Ullrich von Bassewitz, 2005-03-25
|
|
|
|
;
|
|
|
|
; unsigned char kbhit (void);
|
|
|
|
;
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-03-30 18:17:57 +00:00
|
|
|
.export _kbhit
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-03-26 17:03:30 +00:00
|
|
|
.include "apple2.inc"
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2005-03-30 18:17:57 +00:00
|
|
|
_kbhit:
|
|
|
|
lda KBD ; Reading KBD checks for keypress
|
2005-03-26 17:03:30 +00:00
|
|
|
rol ; if high bit is set, key was pressed
|
|
|
|
lda #$00
|
|
|
|
tax
|
|
|
|
rol
|
|
|
|
rts
|