garbage code
This commit is contained in:
parent
9edd683394
commit
1841db88b1
@ -4,6 +4,7 @@
|
|||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
#define VGA_SIZE 4000
|
#define VGA_SIZE 4000
|
||||||
|
#define VGA_TEXT_SIZE 2000
|
||||||
s32 unused = 0;
|
s32 unused = 0;
|
||||||
|
|
||||||
s8 *vga_vidmem = (s8 *)0xb8000;
|
s8 *vga_vidmem = (s8 *)0xb8000;
|
||||||
|
@ -4,17 +4,18 @@
|
|||||||
void
|
void
|
||||||
vga_write(s8 *sequence, s32 size, s8 flags)
|
vga_write(s8 *sequence, s32 size, s8 flags)
|
||||||
{
|
{
|
||||||
if (size > VGA_SIZE) {
|
if (size > VGA_TEXT_SIZE) {
|
||||||
s32 using_size = size - VGA_SIZE;
|
s32 using_size = size - VGA_SIZE;
|
||||||
|
|
||||||
for (s32 i = 0; i <= VGA_SIZE; i++) {
|
for (s32 i = 0; i <= VGA_SIZE; i++) {
|
||||||
vga_vidmem[i] = sequence[using_size + i];
|
vga_vidmem[i] = sequence[using_size + i];
|
||||||
|
vga_vidmem[++i] = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unused = 4001;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while (*sequence != '\0') {
|
while (*sequence != '\0') {
|
||||||
vga_vidmem[unused++] = *sequence;
|
vga_vidmem[unused++] = *sequence;
|
||||||
*sequence++;
|
*sequence++;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#ifndef MEMORY_H
|
8 ifndef MEMORY_H
|
||||||
#define MEMORY_H
|
#define MEMORY_H
|
||||||
|
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
@ -2,5 +2,6 @@ void
|
|||||||
sysinit(void)
|
sysinit(void)
|
||||||
{
|
{
|
||||||
vga_clearscreen();
|
vga_clearscreen();
|
||||||
vga_write("Om Smart.", 0x0F);
|
vga_write("Om Smart.", 9, 0x0F);
|
||||||
|
vga_write("Om Smarter.", 11, 0x0F);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user