23.10.2014 Views

RealView - ARM Information Center

RealView - ARM Information Center

RealView - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

编 写 <strong>ARM</strong> 和 Thumb 汇 编 语 言<br />

LDR r2, =Darea + 6000 ; => LDR R2, [PC, #offset into<br />

; Literal Pool 1]<br />

MOV pc,lr ; Return<br />

LTORG ; Literal Pool 1<br />

func2<br />

LDR r3, =Darea + 6000 ; => LDR r3, [PC, #offset into<br />

; Literal Pool 1]<br />

; (sharing with previous literal)<br />

; LDR r4, =Darea + 6004 ; If uncommented produces an error<br />

; as Literal Pool 2 is out of range<br />

MOV pc, lr ; Return<br />

Darea SPACE 8000 ; Starting at the current location,<br />

; clears a 8000 byte area of memory<br />

; to zero<br />

END<br />

; Literal Pool 2 is out of range of<br />

; the LDR instructions above<br />

2-38 © 2002、 2003 <strong>ARM</strong> Limited 版 权 所 有 。 保 留 所 有 权 利 。 <strong>ARM</strong> DUI 0204BSC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!