Mail Archives: djgpp/1999/07/27/23:56:28
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 -