Mail Archives: djgpp/1997/02/09/06:26:26
On Fri, 7 Feb 1997, JuneSmith wrote:
> "If you use int86x or intdosx for a DOS or BIOS function supported by
> them, then just put the address of your buffer into the register which
> expects the offset (regs.x.di) and forget about the segment. These
> functions are processed specially by the library, which will take care
> of the rest."
Use int86 and intdos instead of int86x and intdosx. That's what the FAQ
wants to say, but it doesn't tell this clearly enough. Thanks for
pointing that out, I will make it more explicit in the next release.
> However, the following code doesn't use the di register.
Come on, DI was only an example...
This should work (it works for me):
#include<dos.h>
int main(void)
{
union REGS pregs;
char Message[20] = "PC Intern$";
pregs.h.ah = 0x09;
pregs.x.dx = (int)Message;
intdos (&pregs, &pregs);
return 0;
}
Personally, I suggest you stay away from int86 and intdos; use __dpmi_int
instead. This way, you don't have to worry which functions of which
interrupts are or aren't supported.
- Raw text -