idk what this is but it works
This commit is contained in:
parent
fdd2244198
commit
60059ca578
|
@ -9,31 +9,31 @@ vga_write(s8 *sequence, s16 size, s8 flags)
|
|||
|
||||
for (s16 i = 0; i <= VGA_SIZE; i++) {
|
||||
vga_vidmem[i] = sequence[using_size + i];
|
||||
vga_vidmem[++i] = flags;
|
||||
}
|
||||
vga_vidmem[++i] = flags; }
|
||||
|
||||
unused = 2001;
|
||||
unused = 4001;
|
||||
return;
|
||||
}
|
||||
|
||||
s16 needed_space = (size + unused) * 2 - VGA_SIZE;
|
||||
s16 needed_space = size * 2 + unused - VGA_SIZE;
|
||||
if (needed_space >= 0) {
|
||||
for (s16 i = 0; i <= VGA_SIZE - needed_space; i++) {
|
||||
vga_vidmem[i] = vga_vidmem[i++ + needed_space];
|
||||
vga_vidmem[i] = vga_vidmem[((needed_space / 2) - (needed_space / 2) % 2) + i];
|
||||
}
|
||||
|
||||
unused = VGA_SIZE - needed_space;
|
||||
}
|
||||
|
||||
for (s16 i = 0; i < size; i++) {
|
||||
vga_vidmem[unused * 2] = sequence[i];
|
||||
vga_vidmem[(unused++ * 2) + 1] = flags;
|
||||
vga_vidmem[unused++] = sequence[i];
|
||||
vga_vidmem[unused++] = flags;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
vga_clearscreen(void)
|
||||
{
|
||||
unused = 0;
|
||||
for (s16 i = 0; i <= VGA_SIZE; i++) {
|
||||
vga_vidmem[i] = 0;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,11 @@ void
|
|||
sysinit(void)
|
||||
{
|
||||
vga_clearscreen();
|
||||
for (s16 i = 0; i < 100; i++) {
|
||||
vga_write("Om Smert.", 9, 0x0F);
|
||||
vga_write("Om Smarter.", 11, 0x0F);
|
||||
for (s16 i = 0; i < 99; i++) {
|
||||
vga_write("Om Smart.", 9, 0x0F);
|
||||
vga_write("Om Smarter.", 11, 0x0F);
|
||||
}
|
||||
vga_write("fish stick.", 10, 0x07);
|
||||
vga_write("fish stick", 10, 0x07);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue