2 ; adapted from Atari version
3 ; Christian Groessler, 2014
5 ; void cputcxy (unsigned char x, unsigned char y, char c);
9 .include "atari5200.inc"
11 .export _cputcxy, _cputc
12 .export plot, cputdirect, putchar
13 .import gotoxy, _mul20
15 .importzp screen_width, screen_height
19 .constructor screen_setup_constructor, 26
20 screen_setup_constructor = screen_setup
24 jsr gotoxy ; Set cursor, drop x and y
36 cmp #ATEOL ; Atari-EOL?
50 cputdirect: ; accepts screen code
77 jsr _mul20 ; destroys tmp4, carry is cleared
78 adc SAVMSC ; add start of screen memory
85 ; and #$C0 ; without this we are compatible with the old version. user must not try to output a char >= $3F
93 ataint: .byte 64,0,32,96