diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-22 03:28:49 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-22 03:28:49 +0200 |
| commit | fceb15b1d325a7bb0bcab8993a1057cb991172e8 (patch) | |
| tree | ca95bf9b600d8687f2f6307628db4066e485119a /driver/screen.h | |
| parent | a6184be79e3918764d5e683796afbd8e8ccba018 (diff) | |
support for fg and bg color escape sequences
Diffstat (limited to 'driver/screen.h')
| -rw-r--r-- | driver/screen.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/driver/screen.h b/driver/screen.h new file mode 100644 index 0000000..bcf55e9 --- /dev/null +++ b/driver/screen.h @@ -0,0 +1,40 @@ +#ifndef SCREEN_H +#define SCREEN_H + +// 80 x 24 ? + +#include <stdint.h> + +#define SCR_VIDEOMEM 0xb8000 + +#define SCR_REAL_WIDTH 80 + +#define SCR_WIDTH 78 +#define SCR_HEIGHT 24 + +#define SCR_CTRL 0x3D4 +#define SCR_DATA 0x3D5 + +// colors +#define SCR_BLACK 0x0 +#define SCR_BLUE 0x1 +#define SCR_GREEN 0x2 +#define SCR_CYAN 0x3 +#define SCR_RED 0x4 +#define SCR_MAGENTA 0x5 +#define SCR_BROWN 0x6 +#define SCR_GRAY_LIGHT 0x7 +#define SCR_GRAY_DARK 0x8 +#define SCR_BLUE_LIGHT 0x9 +#define SCR_GREEN_LIGHT 0xa +#define SCR_CYAN_LIGHT 0xb +#define SCR_RED_LIGHT 0xc +#define SCR_MAGENTA_LIGHT 0xd +#define SCR_YELLOW 0xe +#define SCR_WHITE 0xf + +//autoscroll +void update_cursor(uint32_t col,uint32_t row); +void console_put_char(uint8_t c,uint8_t color_fg, uint8_t color_bg, uint32_t x, uint32_t y); + +#endif |
