Macro-Calls - Epson S1C62 Family Reference Manual

Cmos 4-bit single chip microcomputer development tool
Table of Contents

Advertisement

Macro-calls

4.6.3
The defined macro-name can be called from any location in the program by using the following format:
[<Label>]_<Macro-name>_ [<Actual-argument>, ...]
The MACRO can be called by using the macro-name.
When arguments are required, write actual arguments corresponding to the dummy arguments used in the
macro-definition. Multiple actual arguments must be separated by commas (,).
Actual and dummy arguments correspond sequentially from left to right. If the number of actual argu-
ments is greater than the number of dummy arguments, the excess actual arguments are ignored. If the
number of actual arguments is less than the number of dummy arguments, the excess dummy arguments
are replaced by nulls (00H).
Any label can be written before the macro-name.
Example:
Source file
CTAS
CTAE
CAFSET
CAFRST
CTBS
CTBE
CBFSET
CBFRST
COUNT
LOOP1
COUNTA
COUNTB
The assembly listing file after assembly is shown on the next page.
S1C62 FAMILY
DEVELOPMENT TOOL REFERENCE MANUAL
ORG
0200H
EQU
00H
EQU
02H
EQU
0101B
EQU
0000B
EQU
10H
EQU
08H
EQU
0001B
EQU
0100B
MACRO
FSET,FRST,CTS,CTE
LOCAL
LOOP1
SET
F,FSET
RST
F,FRST
LD
A,0
LD
X,CTS
ACPX
MX,A
CP
XL,CTE
JP
NZ,LOOP1
ENDM
COUNT
CAFSET,CAFRST,CTAS,CTAE
RET
COUNT
CBFSET,CBFRST,CTBS,CTBE
RET
END
EPSON
CROSS ASSEMBLER ASM62XX
III-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c62 series

Table of Contents