Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Assembler Reference Manual: HP 9000 Computers > Chapter 4 Assembler Directives and Pseudo-Operations

.EQU Directive

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

The .EQU directive assigns an expression value to an identifier.

Syntax

symbolic_name .EQU value

Parameters

symbolic_name

The name of the identifier to which the Assembler assigns the expression.

value

An integer expression. The Assembler evaluates the expression, which must be absolute, and assigns this value to symbolic_name. If the expression references other identifiers, each identifier must be defined before the .EQU directive attempts to evaluate the expression.

NOTE: The Assembler prohibits the use of relocatable symbols (instruction labels) and imported symbols as components of an .EQU expression.

Example

This is a valid assembly program because the definition of val1 comes before the definition of val2. Reversing the first two statements, however, produces an error condition.

val1 .EQU  0
val2 .EQU val1+4
.SPACE $TEXT$
.SUBSPA $CODE$
LDW val1,%r1
STW %r1,val2
.END
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1998 Hewlett-Packard Development Company, L.P.