Mail Archives: djgpp/1997/01/15/04:48:15
>>>>> "SET" == Salvador Eduardo Tropea (SET) <salvador AT natacha DOT inti DOT edu DOT ar> 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.
***********************************************************************
- Raw text -