Directives Reference

Use as the argument to use the default value of a parameter. An empty string is used if the argument is omitted.

In a macro that uses several internal labels, it is useful to define each internal label as the base label with a different suffix.

Use a dot between a parameter and following text, or a following parameter, if a space is not required in the expansion. Do not use a dot between preceding text and a parameter.

Macros define the scope of local variables (see LCLA, LCLL, and LCLS on page 7-6).

Macros can be nested (see Nesting directives on page 7-26).

Examples

; macro definition

 

 

 

MACRO

 

; start macro definition

$label

xmac

$p1,$p2

 

 

; code

 

 

$label.loop1

; code

 

 

 

; code

 

 

 

BGE

$label.loop1

 

$label.loop2

; code

 

 

 

BL

$p1

 

 

BGT

$label.loop2

 

 

; code

 

 

 

ADR

$p2

 

 

; code

 

 

 

MEND

 

; end macro definition

; macro invocation

 

 

abc

xmac

subr1,de

; invoke macro

 

; code

 

; this is what is

abcloop1

; code

 

; is produced when

 

; code

 

; the xmac macro is

 

BGE

abcloop1

; expanded

abcloop2

; code

 

 

 

BL

subr1

 

 

BGT

abcloop2

 

 

; code

 

 

 

ADR

de

 

 

; code

 

 

7-28

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 310
Image 310
ARM VERSION 1.2 manual Bge