Tool/software: Code Composer Studio
If the indirect addressing mode is used, how to assign the starting address of the global array defined by the C language program to the auxiliary register? For example, the array Uint32 Xp [80] is defined in C program. Because Xp is a pointer variable, my understanding is to assign the starting address of the array to the auxiliary register XAR5 with the following statement:
MOVW DP, #_Xp
MOVL XAR5, @_Xp
Then access the data Xp [60] through the following statements:
MOV @AR0, #60
ADDUL ACC, *+XAR5[AR0]
Is the assembly statement correct? When addressing indirectly with XAR5 auxiliary registers, do I need to set the ARP field to 5 in the program?
If multiple auxiliary registers are used to address at the same time, how to set the value of the field ARP?