EasyManua.ls Logo

Intel 8080 - B4_Page_18

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
5-20
The
first
call
to
SBMAC
expands the
full
definition, including the
call
to and definition of
SUBR:
SBMAC
CALL
SUBR
LINK:
SUBR:
DUN:
IF
JMP
RET
ENDIF
FIRST
DUN
Because
FI
RST
is
TRUE when encountered during the first expansion
of
SBMAC,
all
the statements between
IF
and
ENDIF
are
assembled into the program.
In
subsequent calls, the conditionally-assembled code
is
skipped
so
that the subroutine
is
not regenerated. Only the following expansion
is
produced:
SBMAC
CALL
IF
Method #3: Conditional
Ass,embly
with
EXITM
SUBR
FIRST
The
third method
for
altering the expansion of
SBMAC
also
uses
conditional assembly, but
uses
the
EXIT
M
directive to suppress unwanted macro expansion after the first call.
EXITM
is
effective when
FI
RST
is
FALSE,
which
it
is
after the first
call
to
SBMAC.
TRUE
FALSE
FIRST
SBMAC
FIRST
SUBR:
DUN:
EQU
EQU
SET
MACRO
CALL
IF
EXITM
ENDIF
SET
JMP
RET
ENDM
OFFH
o
TRUE
SUBR
NOT
FIRST
FALSE
DUN

Table of Contents

Related product manuals