beautypg.com

5 pseudo-instructions, 1 data definition pseudo-instructions, Data definition pseudo-instructions – Epson S1C62 Family User Manual

Page 41

background image

CROSS ASSEMBLER ASM62XX

S1C62 FAMILY

EPSON

III-11

DEVELOPMENT TOOL REFERENCE MANUAL

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 . See
Section 4.6 for macro functions.

4.5.1

Data definition pseudo-instructions

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)

_EQU_

To define a symbol

The EQU pseudo-instruction defines (written in the label field) as having the value of
(written in the operand field).
If a value greater than 13 bits is specified in , 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

EQU

30H

ONE

EQU

ZERO+1

ONE

EQU

31H

P-error because ONE has been defined more than twice

FOUR

EQU

TWO*2

U-error because TWO has not been defined

SET

_SET_

To define a symbol

Like EQU, the SET pseudo-instruction defines the value of as being . The SET
pseudo-instruction allows a symbol to be redefined.

Examples:

ZERO

EQU

30H

BIT

SET

1

:

BIT

SET

2

Redefinition possible

:

BIT

SET

BIT SHL 1

Previously-defined items can be referenced