io.h 701 B

123456789101112131415161718192021222324
  1. /* I/O library: VGA text output and PS/2 keyboard. Usable by terminal and other programs. */
  2. #ifndef IO_H
  3. #define IO_H
  4. #define IO_VGA_COLS 80
  5. #define IO_VGA_ROWS 25
  6. #define IO_CONTENT_ROWS IO_VGA_ROWS
  7. #define IO_CONTENT_SIZE (IO_CONTENT_ROWS * IO_VGA_COLS)
  8. void io_init(void);
  9. void io_clear_screen(void);
  10. void io_putchar(char c);
  11. void io_putstr(const char *s);
  12. unsigned int io_get_cursor(void);
  13. void io_cursor_show_block(void);
  14. void io_cursor_hide_block(void);
  15. void io_vga_write(unsigned int pos, unsigned short value);
  16. void io_drain_keyboard(void);
  17. /* Poll keyboard; returns 0 or ASCII character. Shift applied. */
  18. char io_poll_key(void);
  19. unsigned char io_last_scancode(void);
  20. #endif