delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/08/05:47:30

Date: Fri, 8 May 1998 12:46:51 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Fist1000 <fist1000 AT aol DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Converting Protected-Mode Addresses to Real-Mode SEG:OFS pairs
In-Reply-To: <1998050803552400.XAA26070@ladder03.news.aol.com>
Message-ID: <Pine.SUN.3.91.980508124350.9473M-100000@is>
MIME-Version: 1.0

On 8 May 1998, Fist1000 wrote:

> What is the math to nab the segment and offset from a protected-mode address?

None.  Real-mode seg:off addresses cannot address more than the first 1MB
of memory (they only have 20 bits).

I suspect that you need this to call some real-mode service which needs 
an address of a buffer.  If so, please read sections 18.2 and 18.4 of the 
DJGPP FAQ list (available as v2/faq210b.zip from the same place you get 
DJGPP).  It explains how to do these things from DJGPP programs, since 
that's quite different from what you are used to in real-mode programs. 

- Raw text -


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