Code: Select all
// main.c -- Defines the C-code kernel entry point, calls initialisation routines.
// Made for JamesM's tutorials <www.jamesmolloy.co.uk>
static void putpixel(unsigned char* screen, int x,int y, int color)
{
unsigned where=x*3+y*2400;
screen[where]=color&255; // BLUE
screen[where+1]=(color>>8)&255; // GREEN
screen[where+2]=(color>>16)&255; // RED
}
int main(struct multiboot *mboot_ptr)
{
char *sc = (char*)0xA0000;
putpixel(sc, 0,0, 0xFF0000);
}