Mail Archives: djgpp/1994/01/08/18:15:20
A few days ago, I posted regarding a program which worked under DPMI, but
failed under VCPI. I found my problem, and though I'd post it since it is
an easy mistake to make. The guilty code was:
go32_regs.x.ax = 0x1680; /* give up time slice */
_go32_dpmi_simulate_int(0x2f, &go32_regs);
What's wrong? SS and SP registers are not initialized (the docs say to put
in zeroes if you don't want to provide your own stack space), so some random
bit of memory got used as stack space. OS/2 worked because I use different
code for releasing time slices there. I'm not sure why Windows worked;
perhaps I wasn't stomping on anything critical.
- Raw text -