14 equ — equate symbol value, Equ — equate symbol value – Motorola HC12 User Manual

Page 177

Advertising
background image

Assembler Directives

EQU — Equate Symbol Value

MCUez HC12 Assembler

User’s Manual

MOTOROLA

Assembler Directives

177

8.14 EQU — Equate Symbol Value

Syntax:

<label>:

EQU

<expression>

Description:

The

EQU

directive assigns the value of the <expression> in the

operand field to <label>. The <label> and <expression> fields
are both required, and the <label> cannot be defined anywhere
else in the program. The <expression> cannot include a symbol
that is undefined or not yet defined.

The

EQU

directive does not allow forward references.

Example:

0000 0014 MaxElement: EQU 20

0000 0050 MaxSize: EQU MaxElement * 4

000000 Time: DS.W 3

0000 0000 Hour: EQU Time ; first word addr

0000 0002 Minute: EQU Time+2; second word addr

0000 0004 Second: EQU Time+4; third word addr

Advertising