1. 参考资料
- https://developer.arm.com/documentation/100068/0616/Migrating-from-armasm-to-the-armclang-Integrated-Assembler/Labels
- https://sourceware.org/binutils/docs-2.20/as/Labels.html#Labels
2. Label 实验
指令跳转
MOV R5,
MOV R6,
BL final // jump to label "final"
MOV R7,
MOV R8,
final:
指令循环
loop:
MOV R5,
MOV R6,
BL loop //jump to label “loop”
MOV R7,
MOV R8,
final:
指令地址
cmd1:
MOV R0,
cmd2:
MOV R1,
内存寻址
.global _start
_start:
cmd_1:
ldr r0, data1 //[data1]
cmd_2:
ldr r0, data2 //[data2]
cmd_3:
ldr r0, data3 //[data3]
data1:
.word cmd_1
data2:
.word cmd_2
data3:
.word cmd_3
|