]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/ungetc.s
cleanups and add more comments
[cc65] / libsrc / common / ungetc.s
index 590d2d671a3c3584b9aa83af77b86ef0f82199c1..386c450a8ee1dbbb4c52ec7be9086bc912113226 100644 (file)
 
 ; c must be in char range
 
-        tax
+        txa
         bne     error
 
 ; Check if the file is open
 
-       ldy     #_FILE::f_flags
-       lda     (ptr1),y
-       and     #_FOPEN                 ; Is the file open?
-               beq     error                   ; Branch if no
+        ldy     #_FILE::f_flags
+        lda     (ptr1),y
+        and     #_FOPEN                 ; Is the file open?
+        beq     error                   ; Branch if no
 
 ; Set the pushback flag and reset the end-of-file indicator
 
@@ -68,4 +68,4 @@ error:  lda     #EINVAL
         rts
 
 .endproc
-
+