From 264e6ebaa0816d0d2070090ebd7a75d7767929cb Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Tue, 8 Jul 2014 11:34:16 +0200 Subject: Merge in parts of the experimental branch --- kernel/console.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 kernel/console.h (limited to 'kernel/console.h') diff --git a/kernel/console.h b/kernel/console.h new file mode 100644 index 0000000..e304773 --- /dev/null +++ b/kernel/console.h @@ -0,0 +1,27 @@ +#define SCR_VIDEOMEM 0xb8000 + +#define SCR_WIDTH 80 +#define SCR_HEIGHT 23 + +#define SCR_CTRL 0x3D4 +#define SCR_DATA 0x3D5 + +#define SCR_BLACK 0x0 +#define SCR_BLUE 0x1 +#define SCR_GREEN 0x2 +#define SCR_CYAN 0x3 +#define SCR_RED 0x4 + +// TODO: more colors here... + +# define SCR_WHITE 0xf + +//autoscroll +void print_nextline(); +void print_hex(uint16_t val); + +//no autoscroll +void print_str(int x,int y,char *str); +void print_str_col(int x,int y,char *str, char col); +void print_char(int x, int y, char c); +void print_char_col(int x, int y, char c, char col); -- cgit v1.2.3