c6678。
ccs5.
引用变量:
.global _a
LDB *+DP(_a),B0 ;将C文件中定义的变量a的值存到B0寄存器中
那么怎样在汇编文件中引用C中定义的数组?
比如说C中定义
int a[8];
怎么将a[2]的值存到B0寄存器中?
谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
c6678。
ccs5.
引用变量:
.global _a
LDB *+DP(_a),B0 ;将C文件中定义的变量a的值存到B0寄存器中
那么怎样在汇编文件中引用C中定义的数组?
比如说C中定义
int a[8];
怎么将a[2]的值存到B0寄存器中?
谢谢!
xiangzhong kong
您好!
你需要将c的基地址 加上偏移量,获得才c[2] 的地址,再将该地址的值得load到寄存器中
Hi xiangzhong kong,
Examples:
.global a
...
MVKL a, B3;
MVKH a, B3;
LDW *+B3[2], B0;
You can find details in the section 2.7.1 of <<TMS320C6000 Assembly Language Tools>>.
Here is the link of this documents: www.ti.com.cn/.../spru186v.pdf
Thanks!