]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/fwrite.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / common / fwrite.s
index 37cf8101577623de80ff80a0cd7c7d0d2a6cbca9..dc0bad1b619ad80651e728c8aeb8cde1576d8bd0 100644 (file)
 
 ; Save file and place it into ptr1
 
-       sta     file
-       sta     ptr1
-       stx     file+1
-       stx     ptr1+1
+        sta     file
+        sta     ptr1
+        stx     file+1
+        stx     ptr1+1
 
 ; Check if the file is open
 
-       ldy     #_FILE::f_flags
-       lda     (ptr1),y
-       and     #_FOPEN                 ; Is the file open?
-               bne     @L2                     ; Branch if yes
+        ldy     #_FILE::f_flags
+        lda     (ptr1),y
+        and     #_FOPEN                 ; Is the file open?
+        bne     @L2                     ; Branch if yes
 
 ; File not open
 
-@L1:    lda    #EBADF
+@L1:    lda     #EBADF
         jsr     __seterrno              ; Returns with A = 0
         tax                             ; A = X = 0
         jmp     incsp6
 
 ; Check if the stream is in an error state
 
-@L2:   lda     (ptr1),y                ; get file->f_flags again
-       and     #_FERROR
-       bne     @L1
+@L2:    lda     (ptr1),y                ; get file->f_flags again
+        and     #_FERROR
+        bne     @L1
 
 ; Build the stackframe for write()
 
 ; Data
 
 .bss
-file:  .res    2
+file:   .res    2