CROSS ASSEMBLER ASM62XX
III-16
EPSON
S1C62 FAMILY
DEVELOPMENT TOOL REFERENCE MANUAL
4.6.2
Macro-definitions
The macro-definition should be done by using the MACRO and the ENDM instructions (pseudo-instruc-
tion).
■
MACRO ~ ENDM
<Macro-name>_ MACRO_ [<Dummy-argument>, ...]
Statement
:
ENDM
The statement block enclosed by a MACRO pseudo-instruction and an ENDM pseudo-instruction is
defined as a macro. Any name can be assigned to the macro as long as it conforms to the rules regard-
ing the characters, length, and label field.
A macro can have an argument passed to it when it is called. In this case, any symbol can be used as a
dummy argument in the macro definition where the actual argument is to be substituted and the same
symbol must be written after the MACRO pseudo-instruction. Multiple dummy arguments must be
separated by commas (,).
Be sure to write the ENDM statement at the end of a macro-definition.
Example:
This macro loads data from the memory location specified by ADDR into the A or B register specified
by REG. Sample call: LDM A,10H
LDM MACRO REG,ADDR
LD X,ADDR
LD REG,MX
ENDM
These dummy arguments are replaced by actual arguments when the macro is expanded.
■
LOCAL
If a macro having a label is expanded at multiple locations, the label duplicates, causing an error. The
LOCAL pseudo-instruction prevents this error occurring.
LOCAL_<Label-name>[,<Label-name>...]
The label specified by the LOCAL pseudo-instruction is replaced by "??nnnn" when the macro is
expanded. Field nnnn is a four-digit decimal field, to which values 0001 to 9999 are assigned
sequentially.
The LOCAL pseudo-instruction must be written at the beginning of the macro. The LOCAL pseudo-
instruction is ignored if another instruction precedes it.
Example:
WAIT MACRO CNT
LOCAL LOOP
LD A,CNT
LOOP SBC A,1
←
Replaces LOOP with ??nnnn at expansion.
JP NZ,LOOP
ENDM
Содержание S1C62 Family
Страница 1: ...MF599 06 Development Tool Reference Manual CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C62 Family ...
Страница 4: ......
Страница 6: ......
Страница 8: ......
Страница 10: ......
Страница 18: ......
Страница 20: ......
Страница 22: ......
Страница 26: ......
Страница 28: ......
Страница 30: ......
Страница 54: ......
Страница 56: ......
Страница 58: ......
Страница 70: ......
Страница 72: ......
Страница 74: ......
Страница 82: ......
Страница 84: ......
Страница 86: ......
Страница 98: ......
Страница 100: ......
Страница 112: ......
Страница 164: ...Format ICE CONTROL SOFTWARE ICS62XX VIII 50 EPSON S1C62 FAMILY DEVELOPMENT TOOL REFERENCE MANUAL ...
Страница 198: ...Format ICE CONTROL SOFTWARE ICS62XX VIII 84 EPSON S1C62 FAMILY DEVELOPMENT TOOL REFERENCE MANUAL ...
Страница 199: ...Format ICE CONTROL SOFTWARE ICS62XX S1C62 FAMILY EPSON VIII 85 DEVELOPMENT TOOL REFERENCE MANUAL 3 7 HELP Command ...
Страница 206: ......
Страница 207: ...IX MASK DATA CHECKER MDC62XX This part explains how to operate the MDC62XX Mask Data Checker for the S1C62 Family ...
Страница 208: ......
Страница 210: ......