]> git.sur5r.net Git - cc65/blobdiff - libsrc/lynx/kbhit.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / lynx / kbhit.s
index f6a42628522abd9acb5e9060733c6bd4d807e840..b606fc49a2d913577ff026317a56bafa095568bd 100644 (file)
@@ -4,10 +4,10 @@
 ; unsigned char kbhit (void);
 ;
 
-       .export         _kbhit
-       .export         KBEDG
-       .export         KBSTL
-       .import         return1
+        .export         _kbhit
+        .export         KBEDG
+        .export         KBSTL
+        .import         return1
 
 ; --------------------------------------------------------------------------
 ; The Atari Lynx has a very small keyboard - only 3 keys
 ; and Opt1 + Opt2 pressed '3'.
 ; So the keyboard returns '1', '2', '3', 'P', 'R', 'F' or '?'.
 
-       .data
-KBTMP:         .byte   0
-KBPRV:         .byte   0
-KBEDG:         .byte   0
-KBSTL:         .byte   0
-KBDEB:         .byte   0
-KBNPR:         .byte   0
+        .data
+KBTMP:          .byte   0
+KBPRV:          .byte   0
+KBEDG:          .byte   0
+KBSTL:          .byte   0
+KBDEB:          .byte   0
+KBNPR:          .byte   0
 
-       .code
+        .code
 _kbhit:
-       lda     $FCB0           ; Read the Opt buttons
-       and     #$0c
-       sta     KBTMP
-       lda     $FCB1           ; Read Pause
-       and     #1
-       ora     KBTMP           ; 0000210P
-       tax
-       and     KBPRV
-       sta     KBSTL           ; for multibutton
-       txa
-       and     KBDEB
-       sta     KBEDG           ; for just depressed
-       txa
-       and     KBNPR
-       sta     KBDEB           ; for debouncing
-       txa
-       eor     #$ff
-       sta     KBNPR           ; inverted previous ones pressed
-       stx     KBPRV
-       lda     KBEDG
-               beq     @L1
-       jmp     return1         ; Key hit
+        lda     $FCB0           ; Read the Opt buttons
+        and     #$0c
+        sta     KBTMP
+        lda     $FCB1           ; Read Pause
+        and     #1
+        ora     KBTMP           ; 0000210P
+        tax
+        and     KBPRV
+        sta     KBSTL           ; for multibutton
+        txa
+        and     KBDEB
+        sta     KBEDG           ; for just depressed
+        txa
+        and     KBNPR
+        sta     KBDEB           ; for debouncing
+        txa
+        eor     #$ff
+        sta     KBNPR           ; inverted previous ones pressed
+        stx     KBPRV
+        lda     KBEDG
+        beq     @L1
+        jmp     return1         ; Key hit
 
 @L1:    tax                     ; No new keys hit
         rts