Upload files to "include"

This commit is contained in:
2025-05-20 20:39:47 -05:00
parent 4c7550b75b
commit 0fa9658918
4 changed files with 369 additions and 0 deletions

30
include/panic.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef _KERNEL_PANIC_H
#define _KERNEL_PANIC_H
#include <stddef.h>
#include <tty.h>
void panic(const char* arr)
{
uint8_t color = 0x1F;
uint8_t blank = 0xFF;
for (size_t y = 0; y < VGA_HEIGHT; y++)
{
for (size_t x = 0; x < VGA_WIDTH; x++)
{
const size_t index = y * VGA_WIDTH + x;
VGA_MEMORY[index] = (uint16_t) ' ' | (uint16_t) blank << 8;
}
}
int i;
for (i = 0; i < 75; i += 2)
{
VGA_MEMORY[i] = arr[i];
VGA_MEMORY[i + 1] = color;
}
}
#endif