Chapter 8. Assembler Directives
55
.macro reserve_str p1=0 p2
Begin the definition of a macro called
reserve_str
, with two arguments. The first argu 
ment has a default value, but not the second. After the definition is complete, you can call
the macro either as
reserve_str a,b
(with
\p1
evaluating to
a
and
\p2
evaluating to
b
), or as
reserve_str ,b
(with
\p1
evaluating as the default, in this case
0
, and
\p2
evaluating to
b
).
When you call a macro, you can specify the argument values either by position, or by keyword.
For example,
sum 9,17
is equivalent to
sum to=17, from=9
.
.endm
Mark the end of a macro definition.
.exitm
Exit early from the current macro definition.
\@
as
maintains a counter of how many macros it has executed in this pseudo variable; you can
copy that number to your output with
\@
, but only within a macro definition.
LOCAL name [ , ... ]
Warning:
LOCAL
is only available if you select "alternate macro syntax" with
 alternate
or
.altmacro
. Section 8.61
.altmacro
.
8.61.
.altmacro
Enable alternate macro mode, enabling:
LOCAL name [ , ... ]
One additional directive,
LOCAL
, is available. It is used to generate a string replacement for
each of the
name
arguments, and replace any instances of
name
in each macro expansion. The
replacement string is unique in the assembly, and different for each separate macro expansion.
LOCAL
allows you to write macros that define symbols, without fear of conflict between separate
macro expansions.
String delimiters
You can write strings delimited in these other ways besides
"string"
:
'string'
You can delimit strings with single quote charaters.
string
You can delimit strings with matching angle brackets.
single character string escape
To include any single character literally in a string (even if the character would otherwise have
some special meaning), you can prefix the character with
!
(an exclamation mark). For example,
you can write
4.3 !
5.4!!
to get the literal text
4.3
5.4!
.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

canadian web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved