Reference Guide
Chapter 4 101
Assembler Directives and Pseudo-Operations
.ORIGIN Directive
.ORIGIN Directive
The .ORIGIN directive advances the location counter to the specified
location.
Syntax
.ORIGIN [ location]
Parameters
location The integer value used to advance the location counter
to that absolute location. The location counter value
may not decrease during this process; that is, the value
specified cannot be less than the value of the current
location counter.
The default value is zero.
Discussion
When the Assembler encounters an .ORIGIN directive, it issues a
.BLOCK pseudo-operation of a size calculated to advance the location
counter to the requested origin. See “.BLOCK and .BLOCKZ
Pseudo-Operations” on page 60 in this chapter.
Example
This sample program performs an exclusive OR, advances the location
counter to 64 bytes, and branches to the label idx.
.CODE
XOR %r21,%r22,%r23
B idx
NOP
.ORIGIN 64
idx LDWX %r23(%sr0,%sr0),%r3
.END