]> git.sur5r.net Git - cc65/blobdiff - libsrc/c64/cputc.s
Make screensize() fetch the values dynamically instead of using variables
[cc65] / libsrc / c64 / cputc.s
index 83a0c8b63f78d3b94d5a77c59a105152ac2e155f..cf4275668a7a1d258096f2f1df35311b1c5dce02 100644 (file)
@@ -8,7 +8,6 @@
        .export         _cputcxy, _cputc, cputdirect, putchar
        .export         newline, plot
        .import         popa, _gotoxy
-       .import         xsize
         .import         PLOT
 
        .include        "c64.inc"
@@ -50,7 +49,7 @@ cputdirect:
 
 advance:
        iny
-       cpy     xsize
+       cpy     #XSIZE
        bne     L3
        jsr     newline         ; new line
        ldy     #0              ; + cr
@@ -59,13 +58,13 @@ L3: sty     CURS_X
 
 newline:
        clc
-       lda     xsize
+       lda     #XSIZE
        adc     SCREEN_PTR
        sta     SCREEN_PTR
        bcc     L4
        inc     SCREEN_PTR+1
        clc
-L4:    lda     xsize
+L4:    lda     #XSIZE
        adc     CRAM_PTR
        sta     CRAM_PTR
        bcc     L5