Pseudo-Instructions; Data Definition Pseudo-Instructions - Epson S1C62 Family Reference Manual

Cmos 4-bit single chip microcomputer development tool
Table of Contents

Advertisement

4.5 Pseudo-Instructions

There are four types of pseudo-instruction: data definition, memory setting, assembler control, and macro.
These pseudo-instructions as well as operational expressions can be used to govern assembly, and are not
executed in the developed program.
In the subsequent explanations, the items enclosed by < > in the pseudo-instruction format must be written
in the statement (do not write the < > characters themselves). Symbol _ represents one or more blanks or
tabs. One or more symbols and constants or an operational expression can be used in <expression>. See
Section 4.6 for macro functions.

Data definition pseudo-instructions

4.5.1
There are three data definition pseudo-instructions: EQU, SET, and DW. The EQU and SET pseudo-
instructions each define a symbol, and the DW pseudo-instruction presets data in program memory.
EQU (Equate)
<Symbol>_EQU_<Expression>
The EQU pseudo-instruction defines <symbol> (written in the label field) as having the value of
<expression> (written in the operand field).
If a value greater than 13 bits is specified in <expression>, bit 14 and subsequent high-order bits are
ignored.
This definition must be made before the symbol is referenced in the program. A U-error occurs if an
attempt is made to reference a symbol that has not been defined.
The same symbol cannot be defined more than once. A P-error occurs if an attempt is made to define a
symbol that has already been defined.
Examples:
ZERO
ONE
ONE
FOUR
SET
<Symbol>_SET_<Expression>
Like EQU, the SET pseudo-instruction defines the value of <symbol> as being <expression>. The SET
pseudo-instruction allows a symbol to be redefined.
Examples:
ZERO
BIT
BIT
BIT
S1C62 FAMILY
DEVELOPMENT TOOL REFERENCE MANUAL
EQU
30H
EQU
ZERO+1
EQU
31H
EQU
TWO*2
EQU
30H
SET
1
:
SET
2
:
SET
BIT SHL 1
To define a symbol
P-error because ONE has been defined more than twice
U-error because TWO has not been defined
To define a symbol
Redefinition possible
Previously-defined items can be referenced
EPSON
CROSS ASSEMBLER ASM62XX
III-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c62 series

Table of Contents