2 ; Maciej 'YTM/Elysium' Witkowiak
8 ; void cputcxy (unsigned char x, unsigned char y, char c);
12 ; TAB (should be implemented)
13 ; other special characters directly from keyboard are unsafe, though some might be
15 ; HOME, UPLINE, ULINEON, ULINEOFF, REV_ON, REV_OFF, BOLDON, ITALICON, OUTLINEON, PLAINTEXT
16 ; and cursor movement, maybe stuff like INSERT too
18 ; these must be ignored:
19 ; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8
21 ; note that there are conflicts between control characters and keyboard:
22 ; HOME = KEY_ENTER, KEY_HOME = REV_ON,
23 ; UPLINE = ?, KEY_UPARROW = GOTOY, ...
25 .export _cputcxy, _cputc
26 .import gotoxy, fixcursor
28 .importzp cursor_x, cursor_y, cursor_c, cursor_r
31 .include "geossym.inc"
32 .include "jumptab.inc"
36 jsr gotoxy ; Set cursor, drop x and y
39 ; Plot a character - also used as internal function
43 ; some characters 0-31 are not safe for PutChar
65 adc #6 ; 6 pixels down to the baseline
74 cmp xsize ; hit right margin?
76 lda #0 ; yes - do cr+lf
80 cmp ysize ; hit bottom margin?
82 dec cursor_r ; yes - stay in the last line