]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm610/cputc.s
Small size optimizations
[cc65] / libsrc / cbm610 / cputc.s
index 9454b138a8bc8dd487f488c549d477a48398a8ef..ae8bfb16fea608c1acf57d8d43cb9d83d6551b4e 100644 (file)
@@ -8,13 +8,13 @@
        .export         _cputcxy, _cputc, cputdirect, putchar
        .export         newline, plot
        .exportzp       CURS_X, CURS_Y
+
+        .import         PLOT
        .import         _gotoxy
        .import         popa
-       .import         xsize, revers
 
        .include        "cbm610.inc"
-       .include        "zeropage.inc"
-       .include        "../cbm/cbm.inc"
+
 
 _cputcxy:
        pha                     ; Save C
@@ -52,7 +52,7 @@ cputdirect:
 
 advance:
         iny
-        cpy     xsize
+        cpy     #XSIZE
         bne     L3
         jsr     newline         ; new line
         ldy     #0              ; + cr
@@ -61,7 +61,7 @@ L3:     sty     CURS_X
 
 newline:
        clc
-       lda     xsize
+       lda     #XSIZE
        adc     CharPtr
        sta     CharPtr
        bcc     L4
@@ -71,7 +71,7 @@ L4:   inc     CURS_Y
 
 ; Handle character if high bit set
 
-L10:   and     #$7F     
+L10:   and     #$7F
                cmp     #$7E            ; PI?
        bne     L11
        lda     #$5E            ; Load screen code for PI
@@ -93,7 +93,7 @@ putchar:
        ldx     IndReg
        ldy     #$0F
        sty     IndReg
-       ora     revers          ; Set revers bit
+       ora     RVS             ; Set revers bit
                ldy     CURS_X
        sta     (CharPtr),y     ; Set char
        stx     IndReg