[英]Assigning a Label to a Fixed Memory Location in MSP430 Assembly
I have been trying but could not figure out how to assign a label to a fixed memory location in assembly programming of MSP430. 我一直在尝试,但无法弄清楚如何在MSP430的汇编编程中将标签分配给固定的存储位置。 I want to create two pointers (eg, xPtr and yPtr) which point to fixed memory locations in MSP430 address space.
我想创建两个指针(例如xPtr和yPtr),它们指向MSP430地址空间中的固定内存位置。 Then using the absolute mode, I want to perform instructions (eg, Mov.b &xPtr, &yPtr).
然后使用绝对模式,我要执行指令(例如Mov.b&xPtr,&yPtr)。
As shown in sections 4.8.4 and 5.10 of the MSP430 assembler manual (SLAU131) , you can use the .set
or .equ
directives to assign a value to a symbol: 如MSP430汇编程序手册(SLAU131)的 4.8.4和5.10节所示,可以使用
.set
或.equ
伪指令为符号分配值:
xPtr .set 1234h
yPtr .set 5678h
MOV.B &xPtr, &yPtr
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.