mirror of
https://github.com/cc65/cc65.git
synced 2025-01-27 09:33:42 +00:00
use mul40 routine instead of doing the multiplication myself
git-svn-id: svn://svn.cc65.org/cc65/trunk@117 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
70dbbb542f
commit
7b944cae11
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
.export plot, cputdirect, putchar
|
.export plot, cputdirect, putchar
|
||||||
.import popa, _gotoxy
|
.import popa, _gotoxy, mul40
|
||||||
|
|
||||||
.include "atari.inc"
|
.include "atari.inc"
|
||||||
|
|
||||||
@ -70,22 +70,8 @@ plot: ldy COLCRS
|
|||||||
|
|
||||||
putchar:
|
putchar:
|
||||||
pha ; save char
|
pha ; save char
|
||||||
lda #0
|
|
||||||
sta tmp4
|
|
||||||
lda ROWCRS
|
lda ROWCRS
|
||||||
asl a
|
jsr mul40
|
||||||
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
|
|
||||||
L3: clc
|
L3: clc
|
||||||
adc SAVMSC ; add start of screen memory
|
adc SAVMSC ; add start of screen memory
|
||||||
sta ptr4
|
sta ptr4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user