CROSS ASSEMBLER ASM62XX

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.

4.5.1Data 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)
<Symbol>_EQU_<Expression>To define a symbol

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

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

 

 

 

 

 

 

 

<Symbol>_SET_<Expression>

To define a symbol

 

 

 

 

 

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

EQU

30H

 

 

BITSET

1

 

 

 

:

 

Redefinition possible

BIT

SET

2

 

:

BIT SHL 1

Previously-defined items can be referenced

BIT

SET

S1C62 FAMILY

EPSON

III-11

DEVELOPMENT TOOL REFERENCE MANUAL