diff options
author | iximeow <me@iximeow.net> | 2015-03-22 14:35:59 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2015-03-22 14:35:59 -0700 |
commit | fe8a45a19edcd6693b47cb7f034d400f0610332f (patch) | |
tree | 1b7fe4086eaa31e674b6950c961a9945134dd244 /src/kernel | |
parent | d1e7027b26db30231975db0894b4f3cc726c3faa (diff) |
Write with attr
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/main.c | 12 |
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; |