]> git.sur5r.net Git - cc65/blobdiff - libsrc/plus4/cputc.s
Added dump of the file list
[cc65] / libsrc / plus4 / cputc.s
index 4bf9d2e86e332a438f19b0f2d9996a30f463e387..28a6ce91264422c7fe66f705f0774478037c6446 100644 (file)
@@ -6,7 +6,7 @@
 ;
 
        .export         _cputcxy, _cputc, cputdirect, putchar
-       .export         advance, newline, plot
+       .export         newline, plot
        .import         popa, _gotoxy
        .import         xsize, revers
 
@@ -21,13 +21,13 @@ _cputcxy:
 
 ; Plot a character - also used as internal function
 
-_cputc: cmp    #$0D            ; CR?
+_cputc: cmp            #$0A            ; CR?
        bne     L1
        lda     #0
        sta     CURS_X
                beq     plot            ; Recalculate pointers
 
-L1:    cmp     #$0A            ; LF?
+L1:    cmp     #$0D            ; LF?
                bne     L2
        ldy     CURS_Y
        iny
@@ -54,16 +54,16 @@ advance:
        iny
        cpy     xsize
        bne     L9
-       ldy     #0              ; new line
 newline:
+       ldy     #0              ; new line
        clc
        lda     xsize
        adc     SCREEN_PTR
        sta     SCREEN_PTR
        bcc     L4
        inc     SCREEN_PTR+1
-L4:    clc
-       lda     xsize
+       clc
+L4:    lda     xsize
        adc     CRAM_PTR
        sta     CRAM_PTR
        bcc     L5