VGA ORKSJREKWJFDCKLEJFK:JSDOIOIPIKJSLUDOU

This commit is contained in:
spikey 2024-02-18 08:39:13 -05:00
parent ec397c3b16
commit 83e9761925
2 changed files with 46 additions and 9 deletions

View File

@ -3,8 +3,46 @@
void void
sysinit(void) sysinit(void)
{ {
char *howdy = "Om Smart"; char *howdy = "Om Smart.";
char *howday = "Om Smarter.";
vga_clearscreen(); vga_clearscreen();
/*
for (s16 i = 0; i < 100; i++) {
vga_write(howdy, strlen(howdy), 0x1f); vga_write(howdy, strlen(howdy), 0x1f);
vga_write(howday, strlen(howday), 0x0f);
}
vga_write("sid", 3, 0x07);
vga_write("did", 3, 0x07);
vga_write("fid", 3, 0x07);
*/
vga_write(
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter.Om Smart.Om Smarter."
"bob", 2003, 0x0F);
} }

View File

@ -7,22 +7,21 @@ vga_write(s8 *sequence, s16 size, s8 flags)
if (size > VGA_TEXT_SIZE) { if (size > VGA_TEXT_SIZE) {
s16 using_size = size - VGA_TEXT_SIZE; s16 using_size = size - VGA_TEXT_SIZE;
for (s16 i = 0; i <= VGA_SIZE; i++) { for (s16 i = 0; i < VGA_TEXT_SIZE; i++) {
vga_vidmem[i] = sequence[using_size + i]; vga_vidmem[i * 2] = sequence[using_size + i];
vga_vidmem[++i] = flags; } vga_vidmem[i * 2 + 1] = flags;
}
unused = 4001; unused = 4000;
return; return;
} }
if (size * 2 + unused >= VGA_SIZE) { if (size * 2 + unused > VGA_SIZE) {
s16 needed_space = size * 2; s16 needed_space = size * 2;
for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) { for (s16 i = 0; i <= (unused = VGA_SIZE - needed_space); i++) {
vga_vidmem[i] = vga_vidmem[needed_space + i]; vga_vidmem[i] = vga_vidmem[needed_space + i];
} }
unused--;
unused--;
} }
for (s16 i = 0; i < size; i++) { for (s16 i = 0; i < size; i++) {