[an error occurred while processing this directive] Node:DMA, Previous:Inline Asm, Up:Low-level

18.13 Using DMA with DJGPP

Q: How do I use DMA with DJGPP programs?

Q: I want to use DMA, but I don't know how to get the physical address of the buffer I allocate for that purpose.

A: The main problem in using DMA with DJGPP is how to get the physical address of a buffer, which is required to program the DMA controller. In protected-mode environment, memory addresses that your program manipulates are actually offsets from the base address of the data segment. You can obtain the base address of the data segment by calling the __dpmi_get_segment_base_address library function and add it to the address of your buffer, but the resulting address is a logical address, translated into a physical address by the memory-mapping unit which is part of the CPU.

You have several alternatives to get the physical address of your buffer:


[an error occurred while processing this directive]