Epson S5U1C63000A User Manual page 80

Cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

CHAPTER 4: ASSEMBLER
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
#define
Xlow XL
ldb
• 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
#define
L
ldb
ldb
• 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
ld
#define
NUM2
ld
• 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.
66
%xl
... Expanded to "ldb [%xl],%ba".
[Xlow],%ba
[INT_F1],0 ;tst [0xfff1],0? ... Specification like this is invalid.
LABEL
... Replaced with "ldb %ext,LABEL@h".
%ext,L@h
... Replaced with "ldb %xl,LABEL@l".
%xl,L@l
1+1
... Expanded as "ld %a, 1+1*2" (=3).
%a,NUM1*2
(1+1)
... Expanded as "ld %a, (1+1)*2" (=4).
%a,NUM2*2
EPSON
S5U1C63000A MANUAL
(S1C63 FAMILY ASSEMBLER PACKAGE)

Advertisement

Table of Contents
loading

Table of Contents