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

例 2-2<br />

AREA subrout, CODE, READONLY ; Name this block of code<br />

ENTRY<br />

; Mark first instruction to execute<br />

start MOV r0, #10 ; Set up parameters<br />

MOV r1, #3<br />

BL doadd ; Call subroutine<br />

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

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

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

doadd ADD r0, r0, r1 ; Subroutine code<br />

BX lr ; Return from subroutine<br />

END<br />

; Mark end of file<br />

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

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!