Mail Archives: djgpp/1996/02/26/01:26:10
Hello everyone:
I have a problem calling a real-mode interrupt vector.
Here's the code I use:
__dpmi_regs r;
memset (&r, NULL, sizeof (__dpmi_regs));
r.x.bx = 1;
r.x.flags = 0x0202;
__dpmi_simulate_real_mode_interrupt (vector, &r);
This call fails, not crashing the machine or anything, but the real-mode
TSR indicates that it failed to do my bidding (gives some bogus reason
from a set of predefined errors).
But this code works:
char cvec[10];
itoa (vector, cvec, 10);
return (spawnlp (P_WAIT, "idrm", "idrm", cvec, NULL));
The command "idrm" shown above does the same thing as my previous code,
except it's a real-mode program I compiled with Turbo-C. Apparently, the
real-mode TSR has a problem being called this way from DPMI... (it's an
initialize call). However, once the initialization gets through, all
other calls work. Could this be a stack problem? the default DPMI
realmode stack is 0x200 bytes.
Any ideas would be welcome.
Thanks.
------------------------
Orlando A. Andico
oandico AT eee DOT upd DOT edu DOT ph
------------------------
- Raw text -