Date: Wed, 10 Jul 1996 08:37:06 +0200 (IST) From: Eli Zaretskii To: Matthew Brendan Grantz 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: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 . (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.