.export _cputcxy, _cputc
.export plot, cputdirect, putchar
- .import popa, _gotoxy
+ .import popa, _gotoxy, mul40
.include "atari.inc"
.ifdef DIRECT_SCREEN
.importzp tmp4,ptr4
+ .import _revflag
_cputc:
cmp #$0D ; CR
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
adc SAVMSC+1
sta ptr4+1
pla ; get char again
- ora INVFLG
+ ora _revflag
ldy COLCRS
sta (ptr4),y
rts