* better
[mascara-docs.git] / amd64 / bareMetalOS-0.5.2 / pure64.boot0 / kernel_c / kernel64.c
blob7cd57f5c9f1cf48f43a463c1edbd3b193ceb9f80
1 /* 64-bit C example kernel for Pure64 */
2 /* Written by Ian Seyler (www.returninfinity.com) */
5 unsigned int print(char *message, unsigned int line);
7 int main()
9 print("Welcome to your 64-bit OS written in C (Thanks to Pure64!).", 12);
10 while(1)
12 // infinite loop of doing nothing
14 return (0);
19 /* Kernel functions */
21 unsigned int print(char *message, unsigned int line)
23 char *vidmem = (char *) 0xb8000;
24 unsigned int i= 0;
26 i=(line*80*2);
28 while(*message!=0) // 24h
30 vidmem[i]= *message;
31 *message++;
32 i++;
33 vidmem[i]= 0x7;
34 i++;
37 return(1);