X-Git-Url: https://pd.if.org/git/?p=zos;a=blobdiff_plain;f=tty.h;fp=tty.h;h=17a5c29f1b622e65ca94b415ddc6cf1da0a0c5d4;hp=0000000000000000000000000000000000000000;hb=3afdcc11364fbed161b57409f90fe572fc789047;hpb=ede887c1b1d1700bc36da685788d96a19a5d2065 diff --git a/tty.h b/tty.h new file mode 100644 index 0000000..17a5c29 --- /dev/null +++ b/tty.h @@ -0,0 +1,42 @@ +#ifndef _TTY_H_ +#define _TTY_H_ 1 + +#include +#include + +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