2 ; Mark Keates, Christian Groessler, Piotr Fusik
4 ; void cputcxy (unsigned char x, unsigned char y, char c);
8 .export _cputcxy, _cputc
9 .export plot, cputdirect, putchar
10 .import gotoxy, _mul40
12 .import _revflag,setcursor
18 jsr gotoxy ; Set cursor, drop x and y
30 cmp #ATEOL ; Atari-EOL?
33 asl a ; shift out the inverse bit
34 adc #$c0 ; grab the inverse bit; convert ATASCII to screen code
35 bpl codeok ; screen code ok?
36 eor #$40 ; needs correction
37 codeok: lsr a ; undo the shift
39 eor #$80 ; restore the inverse bit
41 cputdirect: ; accepts screen code
65 ; turn off cursor, update screen, turn on cursor
74 jsr _mul40 ; destroys tmp4, carry is cleared
75 adc SAVMSC ; add start of screen memory