1.2.1 $A or $ALIGN : Align Data

The {$ALIGN directive can be used to select the data alignment strategy of the compiler for records. It takes a numerical argument which can be 1, 2, 4, 8, 16 or 32, specifying the alignment boundary in bytes. For these values, it has the same effect as the {$PACKRECORDS} directive (see section 1.2.60, page 153).

Thus, the following

{$A 8}

is equivalent to


and specifies to the compiler that all data inside a record should be aligned on 8 byte boundaries.

In MACPAS mode, additionally it can have the following values:

Specifies alignment following the m68K ABI.
Specifies alignment following the PowerPC ABI.
Specifies alignment following the PowerPC ABI.
Resets the default alignment.
Same as specifying 4.
Same as specifying 1.

These values are not available in the {$PACKRECORDS} directive.