;
.export _cputcxy, _cputc, cputdirect, putchar
- .export advance, newline, plot
+ .export newline, plot
.import popa, _gotoxy
.import xsize, revers
; 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
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