Assembler Directives and Pseudo-Operations

.ALIGN Directive

.ALIGN Directive

The .ALIGN directive advances the current location counter to the next specified “boundary.”

Syntax

.ALIGN [ boundary]

Parameters

boundary

An integer value for the byte boundary to which you

 

want to advance the location counter. The Assembler

 

advances the location counter to that boundary.

 

Permissible values must be a power of 2 and can range

 

from one to 4096. The default value is 8 (double word

 

aligned).

Example

This sample program adds a 21 bit field to the data pointer. Then a branch is taken to the label “page” that has been page-aligned.

.CODE

ADDIL L’$WORDMARK$-$global$,%dp

Bpage

NOP

.ALIGN 4096

page

ADDI 1,%r1,%r1

.DATA

$WORDMARK$

.WORD 0x0FFF

.IMPORT $global$,DATA

Chapter 4

57

Page 57
Image 57
HP UX Developer Tools manual Align Directive, Syntax, Parameters, Example