2 ; void cputcxy (unsigned char x, unsigned char y, char c);
6 .export _cputcxy, _cputc, cputdirect, putchar
8 .forceimport initconio ; force conio initiation
20 jsr gotoxy ; Set cursor, drop x and y
23 ; Plot a character - also used as internal function
25 _cputc: cmp #$0D ; CR?
28 bra plot ; Recalculate pointer
31 beq newline ; Recalculate pointer
33 ; Printable char of some sort
36 jsr putchar ; Write the character to the screen
38 ; Move the cursor (rightwards) to the next position.
49 ; Set cursor position; calculate VRAM pointer.
54 jmp PLOT ; Set the new cursor
60 ; Write one character to the screen without doing anything else.
63 ora RVS ; Set reverse bit
65 st0 #VDC_MAWR ; Memory-Address Write
72 sta VDC_DATA_LO ; character
74 lda CHARCOLOR ; pallette number
79 ora #>$0200 ; high nybble of char. index