]> git.sur5r.net Git - cc65/blobdiff - libsrc/c64/cgetc.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / c64 / cgetc.s
index 5c4b407c9f2b616c3ab1be88483e1c035397c4c6..042f99fd32f41c26806593fd7ade5ed0f5ed0ad6 100644 (file)
@@ -4,58 +4,58 @@
 ; char cgetc (void);
 ;
 
-       .export         _cgetc
-       .import         cursor
+        .export         _cgetc
+        .import         cursor
 
-       .include        "c64.inc"
+        .include        "c64.inc"
 
-_cgetc:        lda     KEY_COUNT       ; Get number of characters
-               bne     L3              ; Jump if there are already chars waiting
+_cgetc: lda     KEY_COUNT       ; Get number of characters
+        bne     L3              ; Jump if there are already chars waiting
 
 ; Switch on the cursor if needed
 
-       lda     CURS_FLAG
-       pha
-       lda     cursor
-       jsr     setcursor
-L1:    lda     KEY_COUNT
-       beq     L1
-       ldx     #0
-       pla
-       bne     L2
-               inx
-L2:            txa
-               jsr     setcursor
+        lda     CURS_FLAG
+        pha
+        lda     cursor
+        jsr     setcursor
+L1:     lda     KEY_COUNT
+        beq     L1
+        ldx     #0
+        pla
+        bne     L2
+        inx
+L2:     txa
+        jsr     setcursor
 
-L3:            jsr     KBDREAD         ; Read char and return in A
-       ldx     #0
-       rts
+L3:     jsr     KBDREAD         ; Read char and return in A
+        ldx     #0
+        rts
 
 
 ; Switch the cursor on or off
 
-.proc  setcursor
-
-               tax                     ; On or off?
-       bne     seton           ; Go set it on
-       lda     CURS_FLAG       ; Is the cursor currently off?
-       bne     crs9            ; Jump if yes
-       lda     #1
-       sta     CURS_FLAG       ; Mark it as off
-       lda     CURS_STATE      ; Cursor currently displayed?
-       beq     crs8            ; Jump if no
-       ldy     CURS_X          ; Get the character column
-               lda     (SCREEN_PTR),y  ; Get character
-       eor     #$80
-       sta     (SCREEN_PTR),y  ; Store character back
-       lda     CURS_COLOR
-       sta     (CRAM_PTR),y    ; Store color back
-crs8:  lda     #0
-       sta     CURS_STATE      ; Cursor not displayed
-crs9:  rts
-
-seton:         lda     #0
-       sta     CURS_FLAG
-       rts
+.proc   setcursor
+
+        tax                     ; On or off?
+        bne     seton           ; Go set it on
+        lda     CURS_FLAG       ; Is the cursor currently off?
+        bne     crs9            ; Jump if yes
+        lda     #1
+        sta     CURS_FLAG       ; Mark it as off
+        lda     CURS_STATE      ; Cursor currently displayed?
+        beq     crs8            ; Jump if no
+        ldy     CURS_X          ; Get the character column
+        lda     (SCREEN_PTR),y  ; Get character
+        eor     #$80
+        sta     (SCREEN_PTR),y  ; Store character back
+        lda     CURS_COLOR
+        sta     (CRAM_PTR),y    ; Store color back
+crs8:   lda     #0
+        sta     CURS_STATE      ; Cursor not displayed
+crs9:   rts
+
+seton:  lda     #0
+        sta     CURS_FLAG
+        rts
 
 .endproc