Mail Archives: djgpp/1994/03/03/01:37:56
> The old way: set AX,BX,CX, etc...
> INT 10h (or whatever...)
> The DJGPP way: ?????
#include <dpmi.h>
#include <go32.h>
_go32_dpmi_registers go32_regs;
memset(&go32_regs, 0, sizeof(go32_regs));
go32_regs.x.ax=...;
_go32_dpmi_simulate_int(0x10, &go32_regs);
It is important to either zero out the registers or else set up a valid stack
to be used in real mode. If you forget, a few random bytes in DOS get
corrupted; makes for fun debugging. If the interrupt you are executing needs
to access memory, you need to allocate DOS memory and copy data to/from that
memory using dosmemget and dosmemput.
- Raw text -