From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Using "far" pointers Date: Thu, 25 Sep 1997 09:11:07 +0200 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 30 Message-ID: <342A0E8B.903E8F95@LSTM.Ruhr-UNI-Bochum.De> References: NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk firewind wrote: [...] Lots of helpful stuff deleted > At this point, it is valid to write the following: > > indos = _farpeekb(_dos_ds, es*16+bx); > > 'es' (the real mode selector, AFAIK) must be multiplied by 16 to be valid > (I don't know why, but the info page for _far* says so, so I do it :), and > then the offset ('bx') is added to that, resulting in a valid address in > the _dos_ds segment. Just for the record: _farpeek() takes physical address locations, and those you get by multiplying the segment with 16 and add the offset. That's why the info page says it. Theses are the segmented braindead issues lurking through that protected mode usually overcomes. Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************