HPlogo HP Assembler Reference Manual: HP 9000 Computers > Chapter 4 Assembler Directives and Pseudo-Operations

Introduction

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

Table 4-1 “Assembler Directives” lists the Assembler directives. Table 4-2 “Pseudo-Operations” lists the pseudo-operations. The directives include those that establish the procedure-calling convention, declare common, and define spaces and subspaces. The pseudo-operations reserve and initialize data areas.

The remainder of this chapter lists the Assembler directives and pseudo-operations in alphabetic order. Several of the descriptions include sample assembly code sequences. You can enter these short code sequences, assemble them using the -l option of the as command, then inspect the offsets and field values to see how that particular directive controls the assembly environment.

This chapter also includes Table 4-3 “Predefined Subspace Directives ” under “Programming Aids ”, which lists the predefined directives that establish standard spaces and subspaces.

Table 4-1 Assembler Directives

Directive

Function

.ALIGN

Forces location counter to the next largest multiple of the supplied alignment value.

.ALLOW

Used with a .LEVEL directive, it temporarily allows the use of features in the architecture specified in the .LEVEL directive.

.CALL

Specifies that the next statement is a procedure call.

.CALLINFO

Provides information for generating Entry/Exit code sequences and for creating stack unwind descriptors.

.COMM

Requests common storage for a specified number of bytes.

.COPYRIGHT

Inserts a string into the object module as a copyright notice.

.END

Terminates an assembly language program.

.ENDM

Marks the end of a macro definition.

.ENTRY

Marks the entry point of the current procedure.

.EQU

Assigns an expression to an identifier.

.EXIT

Marks the return point of the current procedure.

.EXPORT

Makes a specified symbol available to other modules.

.IMPORT

Specifies that the definition of the given symbol occurs in another module.

.LABEL

Permits a label definition to appear within a sequence of directives that occur on a single line.

.LEVEL

Makes the object file a PA-RISC 1.1, 2.0, or 2.0W file.

.LISTOFF

Controls listing of expanded Assembler instructions.

.LISTON

Controls listing of expanded Assembler instructions.

.LOCCT

Selects a location counter.

.MACRO

Marks the beginning of macro definitions.

.ORIGIN

Advances the location counter to a relative location from the beginning of the current subspace.

.PROC

Marks the first statement in a procedure.

.PROCEND

Marks the last statement in a procedure.

.REG

Attaches a type and number to a user-defined register name.

.SHLIB_VERSION

Inserts a date string into the object module as a shared-library version identifier.

.SPACE

Declares a new space or switches back to a previous space.

.SUBSPA

Declares a new subspace or switches back to a previous subspace.

.VERSION

Inserts the specified string into the current object module as a user-defined version identification string.

 

Table 4-2 Pseudo-Operations

Directive

Function

.BLOCK

Reserves a block of data storage.

.BLOCKZ

Reserves a block of data storage.

.BYTE

Reserves 8 bits (a byte) of storage and initializes it to the given value.

.DOUBLE

Initializes 64 bits (a double-word) of storage to a floating-point value.

.DWORD

Reserves 64 bits (a double word) of storage and initializes it to the given value.

.ENTER

Marks a procedure's entry point and generates standard entry code.

.FLOAT

Initializes a single-word of storage to a floating-point value.

.HALF

Reserves 16 bits (a half word) of storage and initializes it to the given value.

.LEAVE

Marks a procedure's exit point and generates standard exit code.

.SPNUM

Reserves and initializes a word of storage.

.STRING

Reserves the appropriate amount of storage and initializes it to the given string.

.STRINGZ

Reserves the appropriate amount of storage and initializes it to the given string.

.WORD

Reserves 32 bits (a word) of storage and initializes it to the given value.

 

© 1998 Hewlett-Packard Development Company, L.P.