Message-Id: <200008040950.FAA10032@delorie.com> Date: Fri, 04 Aug 2000 12:53:21 +0200 To: trzy AT powernet DOT net X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b From: "Eli Zaretskii" CC: djgpp AT delorie DOT com In-reply-to: (message from Bart Trzynadlowski on Fri, 04 Aug 2000 04:45:27 GMT) Subject: Re: Buffers References: Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Bart Trzynadlowski > Newsgroups: comp.os.msdos.djgpp,comp.lang.asm.x86,alt.lang.asm > > I need to use certain interrupts in my assembler modules which I link in > with DJGPP, but there are problems when passing buffer addresses. > > mov ah, 9 > mov edx, msg > int 0x21 > > The above works great. Probably on Windows only. On plain DOS, it will not work. The reason is that the buffer where you put the message text is in protected-mode memory, above 1MB mark, whereas DOS real-mode addressing can only address the first MByte (give or take extra 64KB). Please read sections 18.1, 18.2, and 18.4 in the DJGPP FAQ list (v2/faq230b.zip from the same place you get DJGPP), it explains how to call real-mode services from DJGPP programs. Section 18.5 might also be a useful reading. If something is not clear after you read the FAQ, please post specific questions on comp.os.msdos.djgpp.