delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/04/05:50:20

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" <eliz AT is DOT elta DOT co DOT il>
CC: djgpp AT delorie DOT com
In-reply-to: <HTri5.9460$Z6.341057@newsread1.prod.itd.earthlink.net> (message
from Bart Trzynadlowski on Fri, 04 Aug 2000 04:45:27 GMT)
Subject: Re: Buffers
References: <HTri5.9460$Z6 DOT 341057 AT newsread1 DOT prod DOT itd DOT earthlink DOT net>
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

> From: Bart Trzynadlowski <trzy AT powernet DOT net>
> 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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019