improved uart character printing and poweroff/restart

This commit is contained in:
Liam Kerr 2026-02-08 22:06:36 +00:00
parent 10851eeb64
commit 8cd08165e0
6 changed files with 66 additions and 7 deletions

View file

@ -1,11 +1,9 @@
#include <stdint.h>
#include <stddef.h>
#include <drivers/uart.h>
#include <syscon/syscon.h>
void kmain() {
char *uart = (char *)0x10000000;
char *msg = "Hello, OS World!\n";
for (int i = 0; msg[i] != '\0'; i++) {
*uart = msg[i]; // Write each character to the UART
}
kprint("Hello, OS World!\n");
poweroff();
}