summaryrefslogtreecommitdiff
path: root/src/kernel/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/main.c')
-rw-r--r--src/kernel/main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/kernel/main.c b/src/kernel/main.c
index d7965e2..ec18738 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -2,14 +2,15 @@ __asm__(".code16gcc\n");
void vga_graphics_write_at_offset(char, short);
void vga_graphics_write(char);
+void vga_graphics_write_with_attr(char, char);
void vga_graphics_write_str(char*);
static short CURSOR_LOC = 0;
void _start() {
- vga_graphics_write('a');
- vga_graphics_write('/');
- vga_graphics_write('b');
+ vga_graphics_write_with_attr('a', 1);
+ vga_graphics_write_with_attr('/', 2);
+ vga_graphics_write_with_attr('b', 3);
char foo[] = "hello how are you";
vga_graphics_write_str(foo);
while(1) { }
@@ -21,6 +22,11 @@ void vga_graphics_write_str(char* str) {
}
}
+void vga_graphics_write_with_attr(char value, char attr) {
+ vga_graphics_write_at_offset(value, CURSOR_LOC++);
+ vga_graphics_write_at_offset(attr, CURSOR_LOC++);
+}
+
void vga_graphics_write(char value) {
vga_graphics_write_at_offset(value, CURSOR_LOC);
CURSOR_LOC += 2;