--- /dev/null
+#ifndef _TTY_H_
+#define _TTY_H_ 1
+
+#include <stddef.h>
+#include <stdint.h>
+
+enum vga_color {
+ VGA_BLACK = 0,
+ VGA_BLUE = 1,
+ VGA_GREEN = 2,
+ VGA_CYAN = 3,
+ VGA_RED = 4,
+ VGA_MAGENTA = 5,
+ VGA_BROWN = 6,
+ VGA_LIGHT_GREY = 7,
+ VGA_DARK_GREY = 8,
+ VGA_LIGHT_BLUE = 9,
+ VGA_LIGHT_GREEN = 10,
+ VGA_LIGHT_CYAN = 11,
+ VGA_LIGHT_RED = 12,
+ VGA_LIGHT_MAGENTA = 13,
+ VGA_LIGHT_BROWN = 14,
+ VGA_WHITE = 15
+};
+
+struct terminal {
+ void (*putchar)(int);
+ void (*clear)(void);
+ void (*scroll)(int);
+ void (*writestring)(const char *);
+ void (*update_cursor)(void);
+ uint16_t *vmem;
+ struct virtual_console *vc;
+ int row, column;
+ int color;
+ int escape;
+};
+
+extern struct terminal terminal;
+
+void terminal_initialize();
+#endif