delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/27/23:56:28

From: "John S. Fine" <johnfine AT erols DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Nasm and real-mode ISRs (bimodal)
Date: Tue, 27 Jul 1999 09:40:31 -0400
Lines: 39
Message-ID: <379DB6CF.532B@erols.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990727150836 DOT 25980C-100000 AT is>
Mime-Version: 1.0
X-Trace: 3Skrq3j2jCGmUdnE6FKLS1i31b0KFAVto6QCglFjc9A=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 27 Jul 1999 13:42:36 GMT
X-Mailer: Mozilla 3.01 (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

> > Either DJGPP or
> > its documentation, or my understanding of it, is limited because
> > it is not obvious how to create a "private" segment.
> 
> This issue has nothing to do with DJGPP per se.  The segment selectors in
> DJGPP are normal protected-mode selectors, and their descriptor format is
> like that of any other PM selector.

  But the issue has nothing to do with selectors.  The original
question was about including 16-bit real mode code within a
32-bit program in a way that allows that 16-bit code to be
moved and then executed in real mode.

  When executed the 16-bit code uses a real mode segment value,
not a selector.

  The issue was about making all the internal offsets of the 16-bit
code relative to the beginning of that code, rather than relative
to the "flat" zero of the rest of the program.  That should be
possible with something analogous to what other linkers call a
"private segment", one whose offsets are relative just to itself.

  That is a linker (LD) and COFF question.  Maybe that is an issue
for GNU documentation rather than for DJGPP documentation, but
from the original questioner's starting point, that isn't an
interesting distinction.

  Anyway, the whole question came up because he was pursuing the
wrong solution to a problem with a pmode ISR.  He really doesn't
need the real-mode ISR at all.  He needed to be told either the
register setup and use rules for pmode ISR's or the wrapper
functions to avoid needing special register setup and use rules.
At least part of that (I didn't read carefully) is in the FAQ
section 18.9
-- 
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/

- Raw text -


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