📄 ldrlabel.s
字号:
# AREA LDRlabel, CODE,READONLY
# ENTRY ; Mark first instruction
.text
start:
BL func1 /* Branch to first subroutine */
BL func2 /* Branch to second subroutine */
stop:
MOV r0, #0x18 /* angel_SWIreason_ReportException */
LDR r1, =0x20026 /* ADP_Stopped_ApplicationExit */
SWI 0x123456 /* Angel semihosting ARM SWI */
func1:
LDR r0, =start /* => LDR R0,[PC, #offset to
Litpool 1] */
LDR r1, =Darea +12 /* => LDR R1,[PC, #offset to
Litpool 1] */
LDR r2, =Darea + 6000 /* => LDR R2, [PC, #offset to
Litpool 1] */
MOV pc,lr /* Return */
# LTORG /* Literal Pool 1 */
.ltorg
#.long 0x20026
func2:
LDR r3, =Darea +6000 /* => LDR r3, [PC, #offset to */
/* Litpool 1] */
/* (sharing with previous literal) */
/* LDR r4, =Darea +6004 /* If uncommented will produce an */
/* error as Litpool 2 is out of range */
MOV pc, lr /* Return */
.ltorg
Darea:
.fill 8000 /* Clears a 8000 byte area of memory,
starting at the current location,
to zero. */
.end
# END /* Literal Pool 2 is out of
range of the LDR instructions
above */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -