i think it works

This commit is contained in:
maksw committed 2026-04-30 23:52:46 +02:00
commit 0e1479b168
167 files changed
+27008

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
// ke_debug.c - debugging utilities
#include "hal_api.h"
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
#include "printf.h"
int _fltused; // fuckass
int gDebugEnabled = 0;
void (*PrintChar)(char, uint32_t, uint32_t);
void kernel_putchar(char c) {
PrintChar(c, 0x00FF00, 0x000000);
}
void DbgPrint(const char* fmt, ...) {
if (!gDebugEnabled) return;
va_list va;
va_start(va, fmt);
vprintf(fmt, va);
va_end(va);
}
void KeInitDebug(void (*PrintPtr)(char, uint32_t, uint32_t), int v) {
gDebugEnabled = v;
PrintChar = PrintPtr;
printf_set_putchar(kernel_putchar);
}