ARM 体系结构与编程 - Label

参考资料:

https://developer.arm.com/documentation/100068/0616/Migrating-from-armasm-to-the-armclang-Integrated-Assembler/Labels

跳转

	MOV		R5, #1
	MOV		R6, #2
	BL		final	//LR = 0x0c
	MOV		R7, #3 //skipped
	MOV		R8,	#4 //skipped
final:

循环

loop:
	MOV		R5, #1
	MOV		R6, #2
	BL		loop
	MOV		R7, #3 //skipped
	MOV		R8,	#4 //skipped
final:

地址

cmd1:
	MOV		R0, #cmd1 //0x0
cmd2:
	MOV		R1, #cmd2 //0x04

寻址

.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
上一篇:STM32F407芯片介绍


下一篇:libev交叉编译过程记录