Mail Archives: djgpp/1995/02/08/11:11:39
> please what do I use as the argument of _farsetsel()
> and what do I use as the `offset' argument of _farns*()?
You should call _farsetsel(_go32_conventional_mem_selector()),
then call _farns*() with the linear address of the memory
location you want to peek/poke. The linear address is given
by lin_addr = 16*segment + offset, where segment and offset
are from the real-mode segment:offset pair of a far pointer.
Confused? Here are some examples:
> (1) the color text screen
lin_addr = 0xb8000 + <offset of character from start of video buffer>
> (2) the monochrome text screen
Likewise, but the base address is 0xb0000
> (4) the lower end of the RAM (real addresses 0 to (say) 0x10000),
lin_addr = 0 to 0x10000
The case of graphics screen is explained in my FAQ, question 10.5.
- Raw text -