I know there are 3 ways to transmit the IO data: program mode,interrupt mode and DMA mode. And for the program mode, if I want to transmit a byte from IO to RAM, I should write like this
MOV PORT1,000AH # tell io the address
IN ACC,PORT2 # read data from this address
MOV [0x5566], ACC # mov this data to RAM
And if I want to transmit many bytes, I foreach this program. That's OK. But here is my question:
What if I want to use DMA mode,how to write my assembly language to transmit many bytes from IO to RAM?
I know how DMA works, but I am confused about who tells them to do this?I think cpu need to tell the IO start address, the data length, the RAM address. All of this, what the assembly language should be?
I found a lot but didn't find answer. Did I miss something important that make I confused about this? I hope someone's help.Thanks