4.8.4 Obtaining the DMA Offset of a Symbol – dsPIC33F Devices Only [DD]
The dmaoffset()
operator can be used to obtain the offset of a symbol within DMA memory. For example, to declare a buffer in DMA memory, and load its offset into a register, you could use:
.section *,bss,dma
buf: .space 256
.text
mov #dmaoffset(buf), W0
To construct a table of DMA offsets for several symbols, you could use:
.word dmaoffset(buf1)
.word dmaoffset(buf2)
.word dmaoffset(buf3)
...