From fea8e314e6291bd55fd96b1bec478d500b548489 Mon Sep 17 00:00:00 2001 From: czjstmax Date: Sun, 22 Feb 2026 02:33:30 +0100 Subject: initial commit i cant get the stage2 to load kernel, or the kernel to print. it's 2 am so gn for now. Signed-off-by: czjstmax --- src/krn/api/std.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/krn/api/std.h (limited to 'src/krn/api/std.h') diff --git a/src/krn/api/std.h b/src/krn/api/std.h new file mode 100644 index 0000000..d22835f --- /dev/null +++ b/src/krn/api/std.h @@ -0,0 +1,18 @@ +#define MÜLL_STD_H + +/* + * Minimal 'standard library' for I/O basics + */ + +// includes +#include + +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++; + } +} -- cgit v1.3.1