i want to boot my C Kernel from GRUB. I have installed grub on my floppy. at this stage my C Kernel is just a 'hello world' (typical) kernel .
Since i am booting my kernel from grub i have to include 'multiboot header' in my kernel so that grub recognizes it as valid kernel.
So where in my kernel m i suppose to keep this header????
In what format should i compile and link my C file????
I don't want to write a small assembly function which typically loads the C Kernel! So can i load my C Kernel from GRUB without any initial assembly code???
Following is my C Kernel code with Multiboot header :
int main(void)
{
//*******Multiboot Header for Kernel*********
long unsigned int Magic = 0x1BADB002;
long unsigned int Flags = 0x00000000;
long unsigned int Checksum = 0xE4524FFE;
//*******Multiboot Header for Kernel*********
char *str = "IOS v1.0",*ch;
unsigned short *vidmem = (unsigned short*) 0xb8000;
unsigned i;
for(ch = str, i = 0; *ch; ch++,i++)
{
vidmem = (unsigned char) *ch | 0x0700;
}
for(;

return 0;
}
One more question what sould be my checksum value? how m i suppose to calculate it??
my parameters to gcc are :
gcc -c kernel.c -o kernel.o
my parameters to ld are :
ld -Ttext=0x1000000 --oformat coff-go32-exe -o kernel.exe kernel.o
I really don't wanna use any assembly to load my C Kernel main function!!!!
And at last : if i want to use intel syntax assembly in my C code inline assembly is there any way i can do this in gcc???[/quote]