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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Susan

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

Post 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.
Ramanan

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

Post 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
Post Reply