Mail Archives: djgpp/1997/09/25/05:00:25
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 *
*************************************************************
- Raw text -