Programming Example
2-50 ADSP-21368 SHARC Processor Hardware Reference
.align 2;
.var source[100];
/* Main code section */
.global _main;
.section/pm seg_pmco;
_main:
r0=0x11111111;
i0=source;
/* Fill the source buffer */
lcntr=LENGTH(source), do fill until lce;
dm(i0,1)=r0;
fill: r0=rot r0 by 1;
/* Set the interrupt mask for MTMDMA */
bit set imask MTMI;
bit set mode1 IRPTEN;
/* Flush the MTMDMA FIFO */
r0=MTMFLUSH;
dm(MTMCTL)=r0;
/* Set up the source address to read */
r0=source;
dm(IIMTMR)=r0;
/* Set up the destination address to write */
r0=dest;
dm(IIMTMW)=r0;