From: "Patrick Smith" 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 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 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... >