Access a DMA buffer via the following arrays:
dma.byte[offset]; // 0 to 256 dma.word[offset]; // 0 to 65536 - takes up two bytes. dma.quad[offset]; // 0 to 4294967296 - takes up four bytes. dma.sbyte[offset]; // -128 to 127 dma.sword[offset]; // -32768 to 32767 - takes up two bytes. dma.squad[offset]; // -2147483648 to 2147483647 - takes up four bytes.
The latter three use a signed representation of the data for reading purposes. Quads cannot be read as unsigned, as they need to be converted into integers in order to be used (which are signed quads)
int buf = malloc(10); int ofs = 4; dma.byte[buf+ofs] = -1; messagebox(dma.byte[buf+ofs]); //will display 255 messagebox(dma.sbyte[buf+ofs]); //will display -1