finished tty system for now

This commit is contained in:
justuswolff
2026-03-19 19:19:51 +01:00
parent fa6c48ae7e
commit d5de6c04ab
8 changed files with 41 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
#include "../headers/stdlib.h"
#include "../headers/graphics.h"
uint32_t strlen32(char* str) {
uint32_t i = 0;
@@ -27,4 +28,23 @@ void memcopy(void* dest, void* src, size_t size) {
for (size_t i=0;i<size;i++) {
((uint8_t*)dest)[i] = ((uint8_t*)src)[i];
}
}
void kpanic(char* msg) {
for (uint16_t x=0;x<320;x++) {
for (uint16_t y=0;y<200;y++) {
VGA_setpix(x,y,(VGA_pixel){0x00,0xFF,0x00});
}
}
size_t x=0;
size_t y=0;
while (*msg != 0) {
if (*msg == '\n') {
y ++;
x = 0;
msg ++;
continue;
}
_VGA_renchar(x++,y,*msg++,(uint8_t[]){0xFF,0xFF,0xFF},(uint8_t[]){0x00,0xFF,0x00});
}
while (1) {}
}