garbage code

This commit is contained in:
spikey 2024-02-17 20:16:03 -05:00
parent 9edd683394
commit 1841db88b1
4 changed files with 7 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include <types.h>
#define VGA_SIZE 4000
#define VGA_TEXT_SIZE 2000
s32 unused = 0;
s8 *vga_vidmem = (s8 *)0xb8000;

View File

@ -4,17 +4,18 @@
void
vga_write(s8 *sequence, s32 size, s8 flags)
{
if (size > VGA_SIZE) {
if (size > VGA_TEXT_SIZE) {
s32 using_size = size - VGA_SIZE;
for (s32 i = 0; i <= VGA_SIZE; i++) {
vga_vidmem[i] = sequence[using_size + i];
vga_vidmem[++i] = flags;
}
unused = 4001;
return;
}
while (*sequence != '\0') {
vga_vidmem[unused++] = *sequence;
*sequence++;

View File

@ -1,4 +1,4 @@
#ifndef MEMORY_H
8 ifndef MEMORY_H
#define MEMORY_H
#include <types.h>

View File

@ -2,5 +2,6 @@ void
sysinit(void)
{
vga_clearscreen();
vga_write("Om Smart.", 0x0F);
vga_write("Om Smart.", 9, 0x0F);
vga_write("Om Smarter.", 11, 0x0F);
}