Date: Wed, 15 Jan 97 09:42:52 GMT Message-Id: <9701150942.AA14567@leopard.proteon.com> From: Neil Jarvis To: salvador AT natacha DOT inti DOT edu DOT ar Cc: Neil DOT Jarvis AT proteon DOT com, djgpp AT delorie DOT com, hotpulp AT netidea DOT com In-Reply-To: (salvador AT natacha DOT inti DOT edu DOT ar) Subject: Re: DMA buffer in protected mode Reply-To: Neil DOT Jarvis AT proteon DOT com Mime-Version: 1.0 (generated by tm-edit 7.43) Content-Type: text/plain; charset=US-ASCII >>>>> "SET" == Salvador Eduardo Tropea (SET) writes: >> The trick about using memory above 1M is getting the physical address >> to program the DMA with. If you are interested I have a piece of code >> that lets me malloc() the DMA buffer and then work out its the >> physical address. SET> You MUST use the DPMI services, because you never know SET> where your program will be loaded so even if you are using SET> a 16 bits DMA channel you can't suppose that part of your SET> program will be loaded in the first 16Mb, so malloc doesn't SET> work. Or, are you talking about a "malloc" that calls to SET> the DPMI services? I'm talking about the malloc() provided by the djgpp libc, which in turn calls sbrk, which in turn calls DPMI. This still doesn't guarantee that the memory is in the first 16M, but I never said that my trick didn't have some provisos ... such as disabling virtual memory, and not installing more that 16M in your machine :-) These restrictions are actually requirements for other reasons in my system, so the trick works for me. -Neil -- *********************************************************************** Neil Jarvis Proteon International Ltd, R&D, York, UK. Tel: (+44) 1904 693409 Neil DOT Jarvis AT proteon DOT com http://tom.proteon.com:8080/~naj/ *********************************************************************** Thought of the day: Give me ambiguity or give me something else. ***********************************************************************