]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/kbhit.s
fix comments
[cc65] / libsrc / apple2 / kbhit.s
index 8471330bab4aae3c80850f696679f5a5d9813b5e..c4efb38d6491dbab3b248500118ef9044dd9347c 100644 (file)
@@ -1,18 +1,18 @@
-       ;;
-       ;; 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     KEY_STROBE      ; Reading strobe checks for keypress
-       bmi     L1              ; if KEY_STROBE > 127 key was pressed
-       jmp     return0
-L1:
-       jmp     return1
+        lda     KBD             ; Reading KBD checks for keypress
+        rol                     ; if high bit is set, key was pressed
+        lda     #$00
+        tax
+        rol
+        rts