delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/02/08:40:51

X-Apparently-From: <prashant?news AT yahoo DOT com>
Message-ID: <014a01bf3cb6$f7733420$3af838ca@home-computer>
From: "Prashant TR" <prashant_news AT yahoo DOT com>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: "Gareth Williams" <ghw2002tii AT hotmail DOT com>,
"DJGPP Mailing list" <djgpp AT delorie DOT com>
Subject: Re: Setting a variable's selector?
Date: Thu, 2 Dec 1999 16:41:56 +0530
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

Gareth Williams wrote:

> In order to get information from the PnP BIOS I need the data structure to
> reside in the same selector/segment as the BIOS entry point.

Does this mean that you need to store any data there? This is
what the confusion here seems to be.

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

>This is not necessarily true: in protected mode, at least in
>principle, you can set up a selector to span any range of addresses in
>the 4GB address space.  The code in ROM does have an address, so it
>can be inluded.

I meant that you cannot write something there in the ROM. If
you're trying to just point to it, yes, this is possible. I did mention
that if you need the PnP header in the ROM, you just have to use
nearptrs.

>> Don't think so. But you're mixing up segments and selectors. The
>> name "selector" is when you're referring to prot. mode and "segment"
>> when you're using real mode.

>Not entirely true: protected mode doesn't disable memory segmentation.
>You do have segments in a DJGPP program, and a selector is an index
>into the table of segment descriptors.  So a selector does specify a
>segment, albeit indirectly.

I wasn't referring to segment descriptors.There's a slight mistake
in my wordings. Instead of saying "you call ?S a segment register in
real mode and a segment selector in protected mode", I should
have said "?S contains a segment ....". I typed this in a hurry. So I
guess this is solved. Gareth, any comments on this?

And btw, Eli, are you talking about are the .text, .data and .bss
segments (or sections).

Prashant

------------------------------------------
One pound of knowledge requires ten pounds of
common sense to apply it.



__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com

- Raw text -


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