Mail Archives: djgpp/1997/02/08/18:53:06
I'm pretty much an absolute beginner but here goes:
Having read the FAQ and the appropriate info files, I'm still unable
to convert the following Borland format code (from the book "PC INTERN")
to a DJGPP format. I understand that DJGPP doesn't have or require the
macros FP_OFF and FP_SEG. Section 18.2 of the FAQ reads:
"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."
However, the following code doesn't use the di register. Any
help would be appreciated. Code follows at the bottom...
Thanks in advance,
June Smith.
#include<dos.h>
void main(void)
{
union REGS pregs;
struct SREGS sregs;
char Message[20] = "PC Intern$";
pregs.h.ah = 0x09;
sregs.ds. = FP_SEG ( Message ); /* Get the var. */
pregs.x.dx = FP_OFF ( Message ); /* addresses */
intdosx (&pregs, &pregs, &sregs);
}
- Raw text -