conio: switch cursor get/set to BIOS calls, rename text-mode accessors
_get_cursor/_set_cursor now use BIOS GetCursor/SetCursor (RST 8, 08Eh/084h) instead of ESTEX CURSOR/LOCATE; cursor position packed into a two_bytes union. get_videotextmode/set_videotextmode renamed to gettextmode/settextmode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
-2
@@ -74,12 +74,24 @@ uint16_t getkey(void);
|
||||
#define KEY_PGUP 0x59
|
||||
#define KEY_INS 0x50 /* numpad 0; not verified */
|
||||
#define KEY_DEL 0x55 /* numpad 5/.; not verified */
|
||||
|
||||
typedef union {
|
||||
uint16_t value;
|
||||
struct {
|
||||
uint8_t low;
|
||||
uint8_t high;
|
||||
} byte;
|
||||
} two_bytes;
|
||||
|
||||
|
||||
|
||||
char putch (char c);
|
||||
char cputs (const char *s);
|
||||
int cprintf(const char *fmt, ...);
|
||||
void clrscr(void);
|
||||
void gotoxy(uint8_t x, uint8_t y);
|
||||
|
||||
|
||||
/* Solid-C compatibility helpers. */
|
||||
#define home() gotoxy(0, 0)
|
||||
#define inp(port) z80_inp(port)
|
||||
@@ -124,8 +136,8 @@ void clrscr_attr(uint8_t attr);
|
||||
#define TEXT_MODE_40x32 0x02
|
||||
#define TEXT_MODE_80x32 0x03
|
||||
|
||||
uint8_t get_videotextmode(void);
|
||||
int set_videotextmode(uint8_t mode); /* 0 OK, -1 + errno on bad mode */
|
||||
uint8_t gettextmode(void);
|
||||
int settextmode(uint8_t mode); /* 0 OK, -1 + errno on bad mode */
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* Text-output attribute (used by the conio set: putch / cputs / cprintf).
|
||||
|
||||
Reference in New Issue
Block a user