www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/19/16:57:06

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: reading dos memory
Date: Fri, 19 Aug 1994 11:42:22 PDT
From: "Marty Leisner" <leisner AT sdsp DOT mc DOT xerox DOT com>

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019