Forgot to add these to the previous commit.
This commit is contained in:
+23
-2
@@ -1,5 +1,26 @@
|
||||
#include "../includes/io.h"
|
||||
|
||||
void kmain()
|
||||
void write_screen(unsigned int, char, unsigned char, unsigned char);
|
||||
void move(unsigned short);
|
||||
|
||||
extern void kmain()
|
||||
{
|
||||
asm("hlt");
|
||||
write_screen(0, 'A', 2, 8);
|
||||
move(80);
|
||||
//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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user