www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/10/01:43:32

Date: Wed, 10 Jul 1996 08:37:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Matthew Brendan Grantz <brendan AT jove DOT acs DOT unt DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: dosmemput...Am I doing something wrong?
In-Reply-To: <4rttph$ao6@hermes.acs.unt.edu>
Message-Id: <Pine.SUN.3.91.960710082019.3598C-100000@is>
Mime-Version: 1.0

On 9 Jul 1996, Matthew Brendan Grantz wrote:

> I'm trying to set up a real mode function to use with some 
> software interrupts. I allocate the memory with 
> __dpmi_allocate_dos_memory, and I get a return value.

Unless the buffer required by that real-mode function is larger than 512 
bytes, you can freely use the DJGPP transfer buffer for this, instead of 
allocating DOS memory.  The linear address of the transfer buffer is in 
the variable `__tb' defined on <go32.h>.  (The transfer buffer is usually 
16KB long, but this can be changed; 512 is the minimum.)

> But when I 
> try to copy data/code into the allocated space, the DOS shell I'm 
> working under crashes. Every time. I have used the __dpmi and the 
> _go32_dpmi versions, and I have tried using dosmemput, memcopy 
> with nearptr, and a byte-by-byte farptr copy of the info. If I'm 

Please read the DJGPP FAQ list (ftp the file v2/faq201b.zip from the same 
place you get DJGPP), sections 18.2, 18.4 and 18.5, or point your Web 
browser to this URL:

  http://www.delorie.com/djgpp/v2faq/faq131.html#Pointer segment

You will probably find the cause of your problems there right away.  If 
not, please post the fragment of your code that allocates the DOS buffer 
and uses it to communicate to the interrupt function, and somebody will 
help you.

- Raw text -


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