mirror of
https://github.com/cc65/cc65.git
synced 2024-10-31 04:04:49 +00:00
19 lines
392 B
ArmAsm
19 lines
392 B
ArmAsm
|
;
|
||
|
; Ullrich von Bassewitz, 2003-04-13
|
||
|
;
|
||
|
; int kbhit (void);
|
||
|
;
|
||
|
|
||
|
.export _kbhit
|
||
|
|
||
|
.include "atmos.inc"
|
||
|
|
||
|
_kbhit:
|
||
|
ldx #$00 ; Load high byte
|
||
|
lda KEYBUF ; Flag for new char in bit 7
|
||
|
asl a ; Shift bit 7 into carry
|
||
|
txa ; A = 0
|
||
|
rol a ; Move old bit 7 into bit 0
|
||
|
rts
|
||
|
|