]> git.sur5r.net Git - cc65/commitdiff
use mul40 routine instead of doing the multiplication myself
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 23 Jun 2000 22:05:59 +0000 (22:05 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 23 Jun 2000 22:05:59 +0000 (22:05 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@117 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/atari/cputc.s

index 088e2bbf15d2e07fb8250d301a5b3bd9f0df78e8..c7d30a4604335eb7ea6abfaf0d40d7e4230d2c6e 100644 (file)
@@ -7,7 +7,7 @@
 
        .export         _cputcxy, _cputc
        .export         plot, cputdirect, putchar
-       .import         popa, _gotoxy
+       .import         popa, _gotoxy, mul40
 
        .include        "atari.inc"
 
@@ -70,22 +70,8 @@ plot:        ldy     COLCRS
 
 putchar:
        pha                     ; save char
-       lda     #0
-       sta     tmp4
        lda     ROWCRS
-       asl     a
-       rol     tmp4
-       asl     a
-       rol     tmp4            ; row * 4
-       adc     ROWCRS
-       bcc     L1
-       inc     tmp4            ; row * 5
-L1:    asl     a
-       rol     tmp4            ; row * 10
-       asl     a
-       rol     tmp4
-       asl     a
-       rol     tmp4            ; row * 40
+       jsr     mul40
 L3:    clc
        adc     SAVMSC          ; add start of screen memory
        sta     ptr4