How is this ruining the stack!?
Posted: Sat Jul 15, 2006 7:21 pm
I am making some floppy code but something is happening in it
can anyone tell me anything that might be happening to cause the stack to get empty?
this simple code
and if I comment out the wait then it all works good, and I have tested the wait function throughly so its not wait
if I call fdd_motoron in another function then I get "can not pop off of stack" and if I call it at a 1 function higher then I get just a triple fault(no stack error reported)
can anyone tell me anything that might be happening to cause the stack to get empty?
this simple code
Code: Select all
void FDD_MotorOn(drive){
if(drive==0){
outportb(DOR,0x14);
}else{
outportb(DOR,0x25);
}
wait(500);
}
if I call fdd_motoron in another function then I get "can not pop off of stack" and if I call it at a 1 function higher then I get just a triple fault(no stack error reported)