The DMA 8237 controller is capable of transferring from RAM to RAM, from I / O to RAM and from RAM to an I / O device.
Please note that you can copy up to 64 KB of data. If you want to copy more than 64 KB, you will need more than one transfer operation.
Assuming you are using the same environment as the IBM PC, and you can set the address of the destination memory segment in a separate latch, you need to:
Normalize the destination segment: offset so that the offset is below 16. Normalization is performed in this way (DIV - integer division, MOD - module):
normalized_segment = segment + offset DIV 16
normalized_offset = offset MOD 16
Load the segment value into the high-order bit latch belonging to the channel you want to use (page address register)
- Load the offset address into the start address register of the DMA channel you want to use.
- Continue to configure DMA (transmission length, mode, interrupt on EOC, etc.)
source share