2 ; Mark Keates, Christian Groessler
4 ; void cputcxy (unsigned char x, unsigned char y, char c);
8 .export _cputcxy, _cputc
9 .export plot, cputdirect, putchar
17 jsr _gotoxy ; Set cursor, drop x
33 cmp #ATEOL ; Atari-EOL?
47 cputdirect: ; accepts screen code
89 adc SAVMSC ; add start of screen memory
101 ataint: .byte 64,0,32,96
103 ;****************************************************************
104 .else ;***** above DIRECT_SCREEN, below thru OS ***************
105 ;****************************************************************
107 .import __do_oserror,cursor,__oserror
110 ; Plot a character - also used as internal function
112 _cputc: cmp #$0D ; CR?
116 beq plot ; Recalculate pointers
118 ; don't know whether this is needed. the compiler generates
119 ; already ATEOL chars for \n
125 ; Printable char of some sort
131 cmp #32 ; control char?
136 jsr putchar ; Write the character to the screen
142 ; Write one character to the screen without doing anything else, return X
164 ldx #0 ; iocb #0 (screen editor)
181 jmp __do_oserror ; update system specific error code
190 .endif ; not defined DIRECT_SCREEN