Newsgroups: comp.os.msdos.djgpp Subject: Help passing pointers to intdosx. Message-ID: <32FB1913.457B@compuserve.com> From: JuneSmith <106363 DOT 3644 AT compuserve DOT com> Date: Fri, 07 Feb 1997 11:59:15 +0000 Reply-To: 106363 DOT 3644 AT compuserve DOT com Organization: n., the state of being organized. NNTP-Posting-Host: pgcm1.civeng.strath.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 31 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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 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); }