Mail Archives: djgpp/1994/08/19/16:57:06
I'm somewhat confused about dosmemget and linear addresses in go32...
dosmemget is defined as:
#include <go32.h>
void dosmemget(int offset, int length, void *buffer);
Description
-----------
This function transfers data from MS-DOS's conventional memory space to
the program's virtual address space. The OFFSET is a physical address,
which can be computed from a real-mode segment/offset pair as follows:
But go32_info_block has a number with begins with 0xe0000000 and there
is an example:
dosmemget(_go32_info_block.linear_address_of_primary_screen, 80*25*2, buf);
Wouldn't it be easier (and possible) to map in the 1Mbyte of dos memory
readonly?
(maybe go through a function to write, but always be able to read).
marty
Member of the League of Programming Freedom
leisner AT sdsp DOT mc DOT xerox DOT com leisner AT eso DOT mc DOT xerox DOT com
- Raw text -