improved vga driver

This commit is contained in:
spikey 2024-02-17 23:42:18 -05:00
parent 34aaee325b
commit b7925a9071
2 changed files with 9 additions and 6 deletions

View File

@ -12,7 +12,7 @@ vga_write(s8 *sequence, s16 size, s8 flags)
vga_vidmem[++i] = flags; vga_vidmem[++i] = flags;
} }
unused = 4001; unused = 2001;
return; return;
} }
@ -25,10 +25,9 @@ vga_write(s8 *sequence, s16 size, s8 flags)
unused = VGA_SIZE - needed_space; unused = VGA_SIZE - needed_space;
} }
while (*sequence != '\0') { for (s16 i = 0; i < size; i++) {
vga_vidmem[unused++] = *sequence; vga_vidmem[unused * 2] = sequence[i];
*sequence++; vga_vidmem[(unused++ * 2) + 1] = flags;
vga_vidmem[unused++] = flags;
} }
} }

View File

@ -4,5 +4,9 @@ void
sysinit(void) sysinit(void)
{ {
vga_clearscreen(); vga_clearscreen();
vga_write("fish stick.", 10, 0x07); for (s16 i = 0; i < 51; i++) {
vga_write("Om Smart.", 9, 0x0F);
vga_write("Om Smarter.", 11, 0x0F);
}
//vga_write("fish stick.", 10, 0x07);
} }