Advances the current location counter until a boundary specified by the Number parameter is reached.
| .align | Number | |
The .align pseudo-op is normally used in a control section (csect) that contains data.
If the Number parameter evaluates to 0, alignment occurs on a byte boundary. If the Number parameter evaluates to 1, alignment occurs on a halfword boundary. If the Number parameter evaluates to 2, alignment occurs on a word boundary. If the Number parameter evaluates to 3, alignment occurs on a doubleword boundary.
If the location counter is not aligned as specified by the Number parameter, the assembler advances the current location counter until the number of low-order bits specified by the Number parameter are filled with the value 0 (zero).
If the .align pseudo-op is used within a .csect pseudo-op of type PR or GL which indicates a section containing instructions, alignment occurs by padding with nop (no-operation) instructions. In this case, the no-operation instruction is equivalent to a branch to the following instruction. If the align amount is less than a fullword, the padding consists of zeros.
The following example demonstrates the use of the .align pseudo-op:
                .csect   progdata[RW]
                .byte    1
                         # Location counter now at odd number
                .align   1
                         # Location counter is now at the next
                         # halfword boundary.
                .byte    3,4
                .
                .
                .
                .align   2       # Insure that the label cont
                                 # and the .long pseudo-op are
                                 # aligned on a full word
                                 # boundary.
cont: .long 5004381
The .byte pseudo-op, .comm pseudo-op, .csect pseudo-op, .double pseudo-op, .float pseudo-op, .long pseudo-op, .short pseudo-op.