Files
kernel3/kernel/kmain.c
T

29 lines
550 B
C

#include "../includes/io.h"
#include "../includes/screen.h"
void kmain()
{
clear_screen();
print_banner();
//draw_s("Hello, World!", 2, 9);
//row = 2;
///column = 80;
//draw_s("And 2nd Row. Now the 3rd row.", 2, 9);
asm("hlt");
}
void write_screen(unsigned int i, char c, unsigned char fg, unsigned char bg)
{
char *fb = (char *) 0x000B8000;
fb[i] = c;
fb[i + 1] = ((fg & 0x0F) << 4) | (bg & 0x0F);
}
void move(unsigned short pos)
{
outb(0x3D4, 14);
outb(0x3D5, ((pos >> 8 ) & 0x00FF));
outb(0x3D4, 15);
outb(0x3D5, pos & 0x00FF);
}