2 ; Written by Groepaz/Hitmen <groepaz@gmx.net>
3 ; Cleanup by Ullrich von Bassewitz <uz@cc65.org>
5 ; void cputcxy (unsigned char x, unsigned char y, char c);
9 .export _cputcxy, _cputc, cputdirect, putchar
11 .constructor initconio
17 .include "creativision.inc"
18 .include "boxchars.inc"
20 ;-----------------------------------------------------------------------------
27 jsr _gotoxy ; Set cursor, drop x
30 ; Plot a character - also used as internal function
32 _cputc: cmp #$0d ; CR?
36 beq plot ; Recalculate pointers
39 beq newline ; Recalculate pointers
41 ; Printable char of some sort
44 jsr putchar ; Write the character to the screen
46 ; Advance cursor position
53 inc CURSOR_Y ; new line
61 ; Set cursor position, calculate RAM pointers
65 jmp setcursor ; Set the new cursor
68 ; Write one character to the screen without doing anything else, return X
98 ;-----------------------------------------------------------------------------
99 ; Initialize the conio subsystem. Code goes into the INIT segment, which may
100 ; be reused after startup.
110 ; Copy box characters to slot