我正在研究 STM8S 微控制器,我需要通过使用汇编为我的变量保留绝对数据位置。
所以,我尝试“LD”指令,但我做不到。
在 PIC 程序集中,我有一部分代码是这样的:
ORG 0X40 ; origin set
cnt RES 1 ; 1 byte reserve at 0x040 address
cnt1 RES 1 ; 1 byte reserve at 0x041 address
test RES 2 ; 2 byte reserve at 0x042 address
test1 RES 1 ; 1 byte reserve at 0x044 address
这就是我需要的,我想在 STM8S 组装中做到这一点。