diff options
Diffstat (limited to 'src/kernel/io.c')
| -rw-r--r-- | src/kernel/io.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/kernel/io.c b/src/kernel/io.c new file mode 100644 index 0000000..10fcac1 --- /dev/null +++ b/src/kernel/io.c @@ -0,0 +1,15 @@ +#include "api/io.h" + +/* + * Minimal API for kernel I/O basics + */ + +volatile uint16_t* VGA = (volatile uint16_t*)0xB8000; +uint16_t cursor = 0; + +void RealPrint(const char* str) { + while(*str) { + VGA[cursor++] = (uint8_t)(*str) | 0x0700; // white on black + str++; + } +} |