CHAPTER 4: ASSEMBLER
66 EPSON S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)
Precautions
• The assembler only permits backward reference of a Define name. Therefore the name definition must
precede the use of it.
• Once a Define name is defined, it cannot be canceled. However, redefinition can be made using
another Define name.
Example:
#define XL %xl
#define Xlow XL
ldb [Xlow],%ba ... Expanded to "ldb [%xl],%ba".
• When the same Define name is defined duplicatedly, a warning message will appear. Until it is
redefined, it is expanded with the original content, and once it is redefined, it is expanded with the
new content.
• No other characters than delimiters (space, tab, line feed, and comma) can be added before and after a
Define name in the source, unless they are enclosed in [ ] or [ ]+. However, an operator or a symbol
mask (@..) can be added to a Define name string without delimiters.
Examples:
#define INT_F 0xfff
tst [INT_F1],0 ;tst [0xfff1],0? ... Specification like this is invalid.
#define L LABEL
ldb %ext,L@h ... Replaced with "ldb %ext,LABEL@h".
ldb %xl,L@l ... Replaced with "ldb %xl,LABEL@l".
• When using an expression in a #define statement, it will be expanded as is. Pay attention when a
number is defined using the #define pseudo-instruction.
Examples:
#define NUM1 1+1
ld %a,NUM1*2 ... Expanded as "ld %a, 1+1*2" (=3).
#define NUM2 (1+1)
ld %a,NUM2*2 ... Expanded as "ld %a, (1+1)*2" (=4).
• The internal preprocess part of the assembler does not check the validity of a statement as the result of
the replacement of the character string.