| 123456789101112131415161718192021222324252627 |
- /* I/O library: VGA text output and PS/2 keyboard. Usable by terminal and other programs. */
- #ifndef IO_H
- #define IO_H
- /* Content area: rows 0..(IO_DEBUG_ROW-1). Debug row and busy position. */
- #define IO_VGA_COLS 80
- #define IO_VGA_ROWS 25
- #define IO_DEBUG_ROW 24
- #define IO_CONTENT_ROWS IO_DEBUG_ROW
- #define IO_CONTENT_SIZE (IO_CONTENT_ROWS * IO_VGA_COLS)
- #define IO_BUSY_POS (IO_DEBUG_ROW * IO_VGA_COLS + 79)
- void io_init(void);
- void io_clear_screen(void);
- void io_putchar(char c);
- void io_putstr(const char *s);
- unsigned int io_get_cursor(void);
- void io_cursor_show_block(void);
- void io_cursor_hide_block(void);
- void io_vga_write(unsigned int pos, unsigned short value);
- void io_drain_keyboard(void);
- /* Poll keyboard; returns 0 or ASCII character. Shift applied. */
- char io_poll_key(void);
- unsigned char io_last_scancode(void);
- #endif
|