2 ; Ullrich von Bassewitz, 2000-08-06, 2002-12-21
3 ; Using lots of code from MagerValp, MagerValp@cling.gu.se
5 ; void cputcxy (unsigned char x, unsigned char y, char c);
9 .export _cputcxy, _cputc, cputdirect, putchar
11 .constructor initcputc
25 jsr _gotoxy ; Set cursor, drop x
28 ; Plot a character - also used as internal function
30 _cputc: cmp #$0A ; CR?
35 jmp NEWLINE ; Update cursor position
37 ; Printable char of some sort
40 bcc L4 ; Other control char
46 bne L4 ; Branch always
48 L4: jmp PRINT ; Output character
50 ; Handle character if high bit set
55 lda #$5E ; Load screen code for PI
58 bne L4 ; Branch always
65 ; Set cursor position, calculate RAM pointers
70 jmp PLOT ; Set the new cursor
72 ; Write one character to the screen without doing anything else, return X
77 ;--------------------------------------------------------------------------
78 ; Module constructor/destructor