54
Chapter 8. Assembler Directives
8.58.
.list
Control (in conjunction with the
.nolist
directive) whether or not assembly listings are generated.
These two directives maintain an internal counter (which is zero initially).
.list
increments the
counter, and
.nolist
decrements it. Assembly listings are generated whenever the counter is greater
than zero.
By default, listings are disabled. When you enable them (with the
a
command line option; Chapter
3 Command Line Options), the initial value of the listing counter is one.
8.59.
.long expressions
.long
is the same as
.int
, Section 8.48
.int expressions
.
8.60.
.macro
The commands
.macro
and
.endm
allow you to define macros that generate assembly output. For
example, this definition specifies a macro
sum
that puts a sequence of numbers into memory:
.macro
sum from=0, to=5
.long
\from
.if
\to \from
sum
"(\from+1)",\to
.endif
.endm
With that definition,
SUM 0,5
is equivalent to this assembly input:
.long
0
.long
1
.long
2
.long
3
.long
4
.long
5
.macro macname
.macro macname macargs ...
Begin the definition of a macro called
macname
. If your macro definition requires arguments,
specify their names after the macro name, separated by commas or spaces. You can supply a
default value for any macro argument by following the name with
=deflt
. For example, these
are all valid
.macro
statements:
.macro comm
Begin the definition of a macro called
comm
, which takes no arguments.
.macro plus1 p, p1
.macro plus1 p p1
Either statement begins the definition of a macro called
plus1
, which takes two arguments;
within the macro definition, write
\p
or
\p1
to evaluate the arguments.
footer
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