Page 1 of 1

My Kernel does a triple fault when I call a function with a

Posted: Sat Nov 01, 2003 12:00 am
by Susan
Hi
  
  I have a very simple kernel. I have wrote a simple printing function by directly writing on the video memory. But when I call this function with a string my kernel does a triple fault.

Here's my code

void main()
{
//Other initializations -- irrelevant to this problem
kprint("Kernel running");
}

void kprint(char *str)
{
//Writing to video memory
//Even if I remove the code within this function
// I still get Triple Fault.
}
I use djgpp's gcc and ld.

Thank you.

RE:My Kernel does a triple fault when I call a function with

Posted: Sat Nov 01, 2003 12:00 am
by Ramanan
What is the linking format r u using to link ur kernel? is it Binary or coff ?
Also on ur bootloader setup ut stack(SS) & data segment (DS) properly.
Make sure SS & DS selectors point to a segment which is nearly equal to the code segment.

rgds,
YogaRamanan.T