08.11.2014 Views

RealView Compilation Tools アセンブラガイド - ARM Information Center

RealView Compilation Tools アセンブラガイド - ARM Information Center

RealView Compilation Tools アセンブラガイド - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ARM</strong> アセン ブ リ 言 語 の 記 述<br />

BL func2 ; Branch to second subroutine<br />

stop<br />

MOV r0, #0x18 ; angel_SWIreason_ReportException<br />

LDR r1, =0x20026 ; ADP_Stopped_ApplicationExit<br />

SVC #0x123456 ; <strong>ARM</strong> semihosting (formerly SWI)<br />

func1<br />

LDR r0, =start ; => LDR R0,[PC, #offset into<br />

; Literal Pool 1]<br />

LDR r1, =Darea + 12 ; => LDR R1,[PC, #offset into<br />

; Literal Pool 1]<br />

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

; Literal Pool 1]<br />

BX 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 />

BX 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 />

<strong>ARM</strong> DUI 0204IJ Copyright © 2002-2008 <strong>ARM</strong> Limited. All rights reserved. 2-41<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!