ISA DMA: Difference between revisions

m
no edit summary
[unchecked revision][unchecked revision]
m (Cross-Referencing Sound Blaster 16)
mNo edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 23:
 
== ISA DMA Background ==
'''ISA DMA''' (''Industry Standard Architecture Direct Memory Access''), like ISA itself, is an [https://en.wikipedia.org/wiki/Appendix_(anatomy) appendix] for modern PCs. It is used by the
internal floppy disk controller, ISA sound cards, ISA network cards, and parallel ports (if they support ECP mode). Whilst interrupt, keyboard
and timer interface circuits have obvious and relevant uses, the ISA DMA controller and its programming interface are still well and truly stuck in the
Line 496:
bus. Real code should separate the two "out 0x4" and "out 0x5" calls with an "out" to some other port.
 
<sourcesyntaxhighlight lang="asm">
initialize_floppy_DMA:
; set DMA channel 2 to transfer data from 0x1000 - 0x33ff in memory
Line 512:
out 0x0a, 0x02 ; unmask DMA channel 2
ret
</syntaxhighlight>
</source>
 
Once you have set up your start address and transfer length you do not need to touch it again, if you are using autoinit. Once reading or writing
is selected, you don't need to change that, either. To ''change'' selecting reading or writing you use the mode register.
 
<sourcesyntaxhighlight lang="asm">
prepare_for_floppy_DMA_write:
out 0x0a, 0x06 ; mask DMA channel 2 and 0 (assuming 0 is already masked)
Line 531:
out 0x0a, 0x02 ; unmask DMA channel 2
ret
</syntaxhighlight>
</source>
 
Some hardware, as well as VirtualPC do not support autoinit. You may want to set the Mode registers to 0x4A and 0x46 in the above routines, instead.