]> git.sur5r.net Git - cc65/blobdiff - libsrc/lynx/kbhit.s
Squeezed bytes and cycles out of the kbhit functions for almost all platforms.
[cc65] / libsrc / lynx / kbhit.s
index b19587a41cc82dc2eed7d4873d45d85e611abe69..f6a42628522abd9acb5e9060733c6bd4d807e840 100644 (file)
@@ -7,7 +7,7 @@
        .export         _kbhit
        .export         KBEDG
        .export         KBSTL
-       .import         return0, return1
+       .import         return1
 
 ; --------------------------------------------------------------------------
 ; The Atari Lynx has a very small keyboard - only 3 keys
@@ -49,7 +49,8 @@ _kbhit:
        sta     KBNPR           ; inverted previous ones pressed
        stx     KBPRV
        lda     KBEDG
-       beq @L1
+               beq     @L1
        jmp     return1         ; Key hit
-@L1:
-       jmp     return0         ; No new keys hit
+
+@L1:    tax                     ; No new keys hit
+        rts