Bare metal VGA: implement "status report" escape codes (#613)

* Bare metal VGA: implement "status report" escape codes
* Minor fix to pseudoteletypewriter code

Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
This commit is contained in:
tkchia 2022-09-13 17:14:10 +08:00 committed by GitHub
parent e0fabd1d49
commit df08b541af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 113 additions and 10 deletions

View file

@ -60,6 +60,14 @@
* (https://www.delorie.com/djgpp/doc/rbinter/id/22/1.html)
*/
#undef VGA_USE_BLINK
/**
* If VGA_PERSNICKETY_STATUS is defined, then when deciding how to return
* status response codes (e.g. "\e[0n"), the tty code will pay attention to
* the terminal's termios mode (TODO). If undefined, the tty code will
* simply return any response strings immediately, & will not echo them
* per the common use case.
*/
#undef VGA_PERSNICKETY_STATUS
#define kTtyFg 0x0001
#define kTtyBg 0x0002
@ -146,6 +154,9 @@ void _TtyErase(struct Tty *, size_t, size_t);
void _TtySetY(struct Tty *, unsigned short);
void _TtySetX(struct Tty *, unsigned short);
extern struct Tty _vga_tty;
ssize_t sys_readv_vga(struct Fd *, const struct iovec *, int);
ssize_t sys_writev_vga(struct Fd *, const struct iovec *, int);
COSMOPOLITAN_C_END_