www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/16/21:15:38

From: "Patrick Smith" <patricks AT travsoft DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: pmode selectors
Date: 16 Dec 1996 17:02:54 GMT
Organization: Traveling Software
Lines: 21
Message-ID: <01bbeb73$4aa64e40$be7f10ac@ps.travsoft.com>
References: <19961216 DOT 052713 DOT 8263 DOT 0 DOT aclemmer AT juno DOT com>
NNTP-Posting-Host: t1.travsoft.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Aaron,

The protected mode selector for any buffer in conventional (dos) memory is
the global variable, _dos_ds.  In order to use the transfer buffer (__tb),
simply use _dos_ds for the selector and the value of (__tb & 0x000FFFFF) as
the offset.  Note:  The reason you mask off the upper 12-bits is because
real-mode dos only uses 20-bit adresses...

Hope that helps,

Patrick Smith
Traveling Software

Aaron m Clemmer <aclemmer AT juno DOT com> wrote in article
<19961216 DOT 052713 DOT 8263 DOT 0 DOT aclemmer AT juno DOT com>...
> 	How do you get the protected mode selector and offset of __tb, or
> any buffer in conventional memory?  I thought you could just use the
> address of __tb as a selector, and leave the offset as 0, but that just
> GPFed...  I tried looking in the faq, but it wasn't very clear about
> anything but getting rmode segs and offs...
> 

- Raw text -


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