summaryrefslogtreecommitdiff
path: root/kernel/console.c
blob: cdd2fc16990f0ab75c990684b1784ebedb2df733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
// http://invisible-island.net/vttest/
// http://www.xfree86.org/4.7.0/ctlseqs.html


#include "kernel/config.h"

#ifdef FOOLOS_CONSOLE

#include "video/console.h"

void console_init(){scr_clear();}
void console_del_char(){scr_backspace();}
void console_put_char_gray(char c){scr_put_char(c,SCR_GRAY2);}
void console_put_char_white(char c){scr_put_char(c,SCR_WHITE);}
void console_put_char_green(char c){scr_put_char(c,SCR_GREEN);}
void console_put_char_red(char c){scr_put_char(c,SCR_RED);}
void console_put_str_gray(char *s){scr_put_string(s,SCR_GRAY2);}
void console_put_str_white(char *s){scr_put_string(s,SCR_WHITE);}
void console_put_str_green(char *s){scr_put_string(s,SCR_GREEN);}
void console_put_str_red(char *s){scr_put_string(s,SCR_RED);}

#else

#include "video/vesa.h"

void console_init(){uint32_t vesa_physbase=vesa_init(0x9300,0x9400,0x168000+512);}
void console_put_char(char c){PutConsoleChar(c,0xffffff);}
void console_put_str(char *s){PutConsole(s,0xffffff);}

#endif