diff options
author | Benji Dial <benji3.141@gmail.com> | 2020-05-16 13:25:46 -0400 |
---|---|---|
committer | Benji Dial <benji3.141@gmail.com> | 2020-05-16 13:25:46 -0400 |
commit | 53801b9baed096e57b40df6147d9ff0f3da0c737 (patch) | |
tree | 4d1987c277cc02b53ff06ee756f67f85b62d1acc /src/kernel/vga.c | |
parent | c0daede46df4f546639bd2d3e11dcf064d554966 (diff) | |
download | portland-os-53801b9baed096e57b40df6147d9ff0f3da0c737.tar.gz |
Hello world
Diffstat (limited to 'src/kernel/vga.c')
-rw-r--r-- | src/kernel/vga.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/kernel/vga.c b/src/kernel/vga.c new file mode 100644 index 0000000..d0170c0 --- /dev/null +++ b/src/kernel/vga.c @@ -0,0 +1,14 @@ +#include <stdint.h> + +#define VGA_START (uint16_t *)0x000b8000 +#define VGA_END (VGA_START + 80 * 25) +uint16_t *cursor = VGA_START; +uint16_t color = 0x1f00; + +void vga_printsz(uint8_t *sz) { + while (*sz) { + *(cursor++) = color | *(sz++); + if (cursor == VGA_END) + cursor = VGA_START; + } +}
\ No newline at end of file |