EasyManua.ls Logo

Intel 8080 - B4_Page_08

Intel 8080
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter
5.
Macros
MAC3
MACRO
X,Y
IF X
EO
0
EXITM
ENDM
Special Macro Operators
5-10
In
certain special cases, the normal rules for dealing with macros do not work. Assume, for example,
that
you
want to specify three actual parameters, and the second parameter happens to
be
the comma character. To the
assembler, the list PARMl II,PARM3 appears to be a list
of
four parameters where the second and third param-
eters are missing. The list can
be
passed correctly by enclosing the comma
in
angle brackets: PARM1,<,),PARM3.
These special operators instruct the assembler to accept the enclosed character (the comma)
as
an
actual param-
eter rather than a
del
im
iter.
The assembler recognizes a number
of
operators that allow special operations:
&
<>
..
II
Ampersand.
Used
to concatenate (link) text and dummy parameters. See the further
discussion
of
ampersands below.
Angle brackets.
Used
to delimit text, such
as
lists, that contain other delimiters.
Notice that bfanks are usually treated
as
delimiters. Therefore, when
an
actual
parameter contains blanks (passing the instruction
MOV
A,M,
for example) the
parameter must be enclosed
in
angle brackets.
Th
is is
also true for any other de-
limiter that
isĀ·
to
be
passed
as
part of
an
actual parameter. To pass such text to
nested macro calls,
use
one set
of
angle brackets for each
level
of
nesting. (See
'Nested Macro Definitions,' below.)
Double semicolon.
Used
before a comment
in
a macro definition to prevent
inclusion
of
the comment
in
expansions
of
the macro and reduce storage
requirements. The comment still appears
in
the listing
of
the definition.
Exclamation point (escape character). Placed before a character (usually a
delimiter) to
be
passed
as
literalized text
in
an
actual parameter.
Used
primarily
to pass angle brackets as part
of
an
actual parameter.
To
pass a literalized
exclamation point, issue!!. Carriage returns cannot
be
passed
as
actual parameters.
The
'!'
is
always preserved while building an actual parameter. It
is
not
echoed when
an
actual parameter
is
substituted for a dummy parameter,
except when the substitution
is
being used to build another actual parameter.

Table of Contents

Related product manuals