volatile not working ( i think )[FIXED]
Posted: Thu Mar 01, 2007 2:12 pm
hi all, ok, i have this: and when i run it on bochs it just locks up, so i started tracing and found this:i'm not sure what is going on, any help welcome
i'm using DJGPP
thx!
Code: Select all
volatile int irq6_state = 0;
void wait_irq6()
{
while(irq6_state == 0)
yield(); // give up prossesor
irq6_state = 0;
}
Code: Select all
mov eax, [ds:0xc000afcc] ; which is where irq6_state is
test eax, eax ; weird ???
jnz 0xc00023cd ; most likely out of the loop
call 0xc000442c ; yield();
i'm using DJGPP
thx!