CROSS ASSEMBLER ASM62XX
S1C62 FAMILY
EPSON
III-17
DEVELOPMENT TOOL REFERENCE MANUAL
4.6.3
Macro-calls
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
ORG 0200H
CTAS EQU 00H
CTAE EQU 02H
CAFSET EQU 0101B
CAFRST EQU 0000B
CTBS EQU 10H
CTBE EQU 08H
CBFSET EQU 0001B
CBFRST EQU 0100B
COUNT MACRO FSET,FRST,CTS,CTE
LOCAL LOOP1
SET F,FSET
RST F,FRST
LD A,0
LD X,CTS
LOOP1 ACPX MX,A
CP XL,CTE
JP NZ,LOOP1
ENDM
COUNTA COUNT CAFSET,CAFRST,CTAS,CTAE
RET
COUNTB COUNT CBFSET,CBFRST,CTBS,CTBE
RET
END
The assembly listing file after assembly is shown on the next page.
Summary of Contents for S1C62 Family
Page 1: ...MF599 06 Development Tool Reference Manual CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C62 Family ...
Page 4: ......
Page 6: ......
Page 8: ......
Page 10: ......
Page 18: ......
Page 20: ......
Page 22: ......
Page 26: ......
Page 28: ......
Page 30: ......
Page 54: ......
Page 56: ......
Page 58: ......
Page 70: ......
Page 72: ......
Page 74: ......
Page 82: ......
Page 84: ......
Page 86: ......
Page 98: ......
Page 100: ......
Page 112: ......
Page 206: ......
Page 208: ......
Page 210: ......