3 ; Maciej 'YTM/Elysium' Witkowiak
9 ; void cputcxy (unsigned char x, unsigned char y, char c);
10 ; void cputc (char c);
13 ; TAB (should be implemented)
14 ; other special characters directly from keyboard are unsafe, though some might be
16 ; HOME, UPLINE, ULINEON, ULINEOFF, REV_ON, REV_OFF, BOLDON, ITALICON, OUTLINEON, PLAINTEXT
17 ; and cursor movement, maybe stuff like INSERT too
19 ; these must be ignored:
20 ; ESC_GRAPHICS, ESC_RULER, GOTOX, GOTOY, GOTOXY, NEWCARDSET, all 1..8
22 ; note that there are conflicts between control characters and keyboard:
23 ; HOME = KEY_ENTER, KEY_HOME = REV_ON,
24 ; UPLINE = ?, KEY_UPARROW = GOTOY, ...
26 .export _cputcxy, _cputc, update_cursor
28 .import _gotoxy, fixcursor
31 .importzp cursor_x, cursor_y, cursor_c, cursor_r
33 .include "../inc/const.inc"
34 .include "../inc/geossym.inc"
35 .include "../inc/jumptab.inc"
40 jsr _gotoxy ; Set cursor, drop x
43 ; Plot a character - also used as internal function
47 ; some characters 0-31 are not safe for PutChar
76 cmp xsize ; hit right margin?
78 lda #0 ; yes - do cr+lf
82 cmp ysize ; hit bottom margin?
84 dec cursor_r ; yes - stay in the last line
96 lda #1 ; update cursor prompt position