delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/02/11:20:58

Message-ID: <19991202153739.53647.qmail@hotmail.com>
X-Originating-IP: [204.221.98.220]
From: "Gareth Williams" <ghw2002tii AT hotmail DOT com>
To: eliz AT is DOT elta DOT co DOT il, prashant_news AT yahoo DOT com
Cc: ghw2002tii AT hotmail DOT com, djgpp AT delorie DOT com
Subject: Re: Setting a variable's selector? - Clarification - I hope.
Date: Thu, 02 Dec 1999 09:37:39 CST
Mime-Version: 1.0
Reply-To: djgpp AT delorie DOT com

>I understood the original message to mean that some chunk of writable
>memory should be set up to be part of the same selector as the read-only
>code in ROM.

This is correct.  Because the PnP BIOS only uses 16-bit addressing, any data 
that it must access must be in its same (real mode) segment. Here's an exerp 
from the spec to which I am trying to adhere:

All Plug and Play BIOS Services which are accessible at runtime support a 
bi-modal interface.  The two modes supported are 16-bit REal Mode and 16-bit 
Protected MOde.  These two modes are sufficient to support a wide varity of 
operating environments.  Real MOde interfaces are define in terms of the 
segment and offset of the service entry point.
Protected MOde interfaces specify the code segment base address so the 
caller can constfuct the descriptor from the segment base address before 
calling the interface from protected mode.  The offset value is the offset 
of the entry point.  It is assumend that the 16-bit Protected MOde interface 
issufficient for 32-Bit Protected Mode callers.  However, it is important to 
note that Plug and Play BIOS functions will access arguments on the stack as 
a 16-bit stack frame.  Therfore, the caller must ensure that the function 
arguemtnsa re pushed onto the stack as 16-bit values and not 32-bit values.  
For  function arguments that are pointers, the pointer offset and data 
should be contained within the first 64K bytes of the segment.  REfer to 
section 4.4 Plug and Play Installation Check for a complete description of 
the bi-modal interface.    (taken from PnP BIOS Spec)



So...  If you made it through all that.  I think that should give you a 
better idea of what i'm trying to attempt.  I've got the 16bit values pushed 
onto the stack with no problem.  I can call the BIOS entry point.  I just 
have no way of ensuring that the pointer I'm passing points to memory that 
is within the first 64K of that segment.

Thanks for your help,
Gareth.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

- Raw text -


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