APPENDIX B CREATING PROCEDURE OF ASSEMBLY SOURCE FILE (Sub tool chain)
S5U1C88000C MANUAL II
EPSON
259
WORKBENCH/DEV TOOLS/OLD ASSEMBLER
macb
macro
x,y
macc
x,y
maca
x,y
endm
macc
macro
x,y
maca
x,y
macb
x,y
endm
maca r0,#2
macb r0,#2
macc r0,#2
maca r0,#2
macc r0,#2
maca r0,#2
maca r0,#2
macb r0,#2
macb r0,#2
macc r0,#2
maca r0,#2
When performing a conditional assembly using the IFC statement inside the body of the macro, the
judgment will be made at the time of the macro call. If an EXITM line occurs at this time, the macro
expansion will be suspended and the macro call will end at that moment.
For example :
xmac
macro
x,y
...
ifc
MODE == 2
exitm
endif
...
endm
MODE
set
2
xmac
#3,#4
When called as shown above, the macro expansion will end at the EXITM line.
MODE
set
1
xmac
#3,#4
When called as shown above, the macro expansion will be executed to the last.
It is possible to include a macro definition in the body of the macro. In this case, however, the macro
name of the MACRO line corresponding to the ENDM line will be required :
x
macro
...
y
macro
...
z
macro
...
z
endm
...
y
endm
...
endm
With the case shown above, the macro "y" definition will be executed at the time the macro "x" is
called. In this case, however, it is not necessary to specify a macro name for the outermost macro
definition ("x" in the above example) of the ENDM line. Nesting can be done to the depth of your
choice.
Related items:
EQU, IFC, IFDEF, IFNDEF, IRP, IRPC, PURGE, SET
Limitation:
This pseudo-instruction can only be used in the structured preprocessor sap88. It cannot be accepted
in the asm88 and will cause an error if used.