Alignment

Instructions and data objects are aligned on natural alignment boundaries within a section. To disable automatic alignment of data objects in data

allocation statements, add the .ua completer after the data allocation mnemonic, for example, data4.ua. Bundles are aligned at 16-byte boundaries, and data objects are aligned according to their size. The assembler does not align string data, since they are byte arrays.

Each section has an alignment attribute, which is determined by the largest aligned object within the section.

Section location counters are not aligned automatically. To align the location counter in the current section to a specified alignment boundary use the .align statement. The .align statement has the following format:

.align    expression

Where:

expression

Is an integer number that specifies the alignment boundary of the location counter in the current section. The integer must be a power of two.

 

The .align statement enables the assembler to reserve space in any section type, including a "nobits" section. During program execution time the contents of a "nobits" section are initialized as zero by the operating system program loader. When using the .align statement in any other section type, the assembler initializes the reserved space with zeros for non-executable sections, and with a NOP pattern for executable sections.

Note:

When the object file format is COFF32 (Windows NT) the section alignment boundary is limited to 8KB. The assembler does not guarantee alignment for requests above 8KB.