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
34 cmp #ATEOL ; Atari-EOL?
48 cputdirect: ; accepts screen code
90 adc SAVMSC ; add start of screen memory
102 ataint: .byte 64,0,32,96
104 ;****************************************************************
105 .else ;***** above DIRECT_SCREEN, below thru OS ***************
106 ;****************************************************************
108 .import __do_oserror,cursor,__oserror
111 ; Plot a character - also used as internal function
113 _cputc: cmp #$0D ; CR?
117 beq plot ; Recalculate pointers
119 ; don't know whether this is needed. the compiler generates
120 ; already ATEOL chars for \n
126 ; Printable char of some sort
132 cmp #32 ; control char?
137 jsr putchar ; Write the character to the screen
143 ; Write one character to the screen without doing anything else, return X
165 ldx #0 ; iocb #0 (screen editor)
182 jmp __do_oserror ; update system specific error code
191 .endif ; not defined DIRECT_SCREEN