delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/01/03:34:30

Date: Wed, 30 Nov 1994 23:46:26 -0500 (EST)
From: john hoeschele <john AT umdsun2 DOT umd DOT umich DOT edu>
To: mailing list <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: DOS memory allocation

I am doing a school project rewriting an older program for an old maching 
and converting it into compatable code for Gnu C.  I have a buffer that 
needs to be in low(DOS) memory for the hardware to work with it.  I have 
looked in the dpmi documentation and it said to use:
 
int86()
0x0100->ax
bytes/16->bx

this would return:

if carry clear:
ax->segment
dx->selector  -DON'T USE- use dosmemX() instead

I am confused what this means.^^^^^^^^Do I just shift the segment over 
four bits and use that as the 20bit address or do I have to get some 
offset from the dosmemX() function to add to it?  Also, does the capital 
X in dosmemX() mean any of the functions of that type (dosmemget/dosmemput)
????  Or are they just used to transfer data around in memory??
Does Gnu C use some sort of virtual memory map that these functions 
would be necessary???

Also, the program uses the low memory buffer to transfer input data to 
another buffer in high memory for storage.  Would the dosmemget() and 
*put() function work for transfer memory faster than transfering data 
from the arrays in a loop?

Any help would be appreciated
Thanks 
John Hoeschele


- Raw text -


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