#define VIDEO_BASE	((unsigned char*)0xb8000)
#define COLOR_BLACK	COLOR(0x0)
#define COLOR_BLUE	COLOR(0x1)
#define COLOR_GREEN	COLOR(0x2)
#define COLOR_CYAN	COLOR(0x3)
#define COLOR_RED	COLOR(0x4)
#define COLOR_MAGENTA	COLOR(0x5)
#define COLOR_BROWN	COLOR(0x6)
#define COLOR_GRAY	COLOR(0x7)
#define COLOR_BRIGHT	COLOR(0x8)

static void putc(char c)
{
	static char *pos = (char*)0xb8000;
	static int x = 0;
	static int y = 0;

	*pos = c;
	pos++;

	// Background: black
	// Foreground: white
	*pos = 0x0F;
	pos++;

	x++;
	if(x >= 80)
	{
		x = 0;
		y++;
	}

	if(y >= 25)
	{
		y = 0;
		pos = (char*)0xb8000;
	}
}

void kmain(void* mbd, unsigned int magic )
{
	char c = 'A';
	int x, y;

	for(y = 0; y < 25; y++)
	{
		for(x = 0; x < 80; x++)
		{
			putc(c);
		}

		c++;
	}
}
