2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define VGA_TEXT_ADDRESS 0xB8000
26 /// 80 cols (chars per line)
27 #define VGA_TEXT_WIDTH 80
29 #define VGA_TEXT_HEIGHT 25
31 #define VGA_TEXT_BPC sizeof(vga_text_char_t)
32 /// Size of VGA text buffer
33 #define VGA_TEXT_SIZE (VGA_TEXT_WIDTH*VGA_TEXT_HEIGHT*VGA_TEXT_BPC)
35 #define VGA_TEXT_COLOR_DEFAULT VGA_TEXT_COLOR_GRAY_BLACK
37 #define VGA_TEXT_TABSIZE 8
40 VGA_TEXT_COLOR_GREEN_BLACK
= 0x02,
41 VGA_TEXT_COLOR_GRAY_BLACK
= 0x07,
42 VGA_TEXT_COLOR_RED_BLACK
= 0x0C,
43 VGA_TEXT_COLOR_WHITE_BLUE
= 0x1F
47 /// X position on screen
49 /// Y position on screen
51 /// Color of next char
52 vga_text_color_t color
;
60 vga_text_char_t
*vga_text_video
;
61 vga_text_cursor_t vga_text_cursor
;
64 void vga_text_clear();
65 void vga_text_set_hwcursor(int x
,int y
);
66 void vga_text_setcolor(vga_text_color_t color
);
67 void vga_text_printchar(char chr
);
71 void com_send(char a
);
72 void bochs_send(char a
);