omos-tcnj2024/sys/drv/vga/video.c

25 lines
324 B
C
Raw Normal View History

2024-02-17 23:19:28 +01:00
#include <types.h>
#include <video.h>
2024-02-17 20:34:30 +01:00
2024-02-17 23:19:28 +01:00
void
vga_write(s8 *sequence, s8 flags)
{
u32 i = *vga_vidmem;
2024-02-17 21:18:12 +01:00
2024-02-17 23:19:28 +01:00
while (*sequence != '\0') {
vga_vidmem[i] = *sequence;
*sequence++;
i++;
vga_vidmem[i] = flags;
i++;
}
}
2024-02-17 23:22:21 +01:00
2024-02-18 01:16:13 +01:00
void
vga_clearscreen(void)
{
2024-02-17 23:22:21 +01:00
for (int i = 0; i <= SIZE; i++) {
2024-02-17 23:53:35 +01:00
vga_vidmem[i] = 0;
2024-02-17 23:22:21 +01:00
}
2024-02-17 23:53:35 +01:00
}