Mail Archives: djgpp/1995/01/10/00:08:39
> How do I map to the 0xd000 page of the low 1MB area then?
Use the conventional memory selector and #include <sys/farptr.h>
Example, to write an "A" in reverse video directly to the color screen:
_farpokew(_go32_info_block.selector_for_linear_memory, 0xb8000, 0x7041);
There are byte and word versions for peek and poke. If you compile with
optimization, they inline great. There are also even more optimal
versions if you do a lot of access, read the farptr.h for details.
These routines can also be used with the memory blocks returned from
DPMI for the extended memory device accesses, but you will need to
set up a selector to point to them. Use movedata() in go32.h to move
large blocks of data quickly.
- Raw text -