New version from Oliver Schmidt
git-svn-id: svn://svn.cc65.org/cc65/trunk@3421 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
;;
|
||||
;; Kevin Ruland
|
||||
;;
|
||||
;; int kbhit (void);
|
||||
;;
|
||||
;
|
||||
; Kevin Ruland
|
||||
; Ullrich von Bassewitz, 2005-03-25
|
||||
;
|
||||
; unsigned char kbhit (void);
|
||||
;
|
||||
|
||||
.export _kbhit
|
||||
.export _kbhit
|
||||
|
||||
.import return0, return1
|
||||
|
||||
.include "apple2.inc"
|
||||
.include "apple2.inc"
|
||||
|
||||
_kbhit:
|
||||
bit KBD ; Reading keyboard checks for keypress
|
||||
bmi L1 ; if KBD > 127 key was pressed
|
||||
jmp return0
|
||||
L1:
|
||||
jmp return1
|
||||
_kbhit: lda KBD ; Reading KBD checks for keypress
|
||||
rol ; if high bit is set, key was pressed
|
||||
lda #$00
|
||||
tax
|
||||
rol
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user