Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Align Data and Code
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   ALIGN [number]
 
            EVEN
 
  See also: ORG, SEGMENT, STRUCT, Data Declaration Directives
 
  Description:
 
     ALIGN aligns the next variable or instruction on an offset address
     that is a multiple of <expression>. The <number> parameter must be
     a power of 2 (1,2,4,8,...) less than or equal to the alignment of
     the current segment. If <number> is omitted, the alignment is
     determined by the align field of the preceding SEGMENT directive.
 
     In a segment containing no instructions, the assembler pads each
     skipped byte with nulls (00h). In a code segment, the assembler
     inserts a no-operation sequence (not necessarily NOP instructions)
     to fill the gap.
 
     This directive is useful for optimizing data and instruction
     fetches on processors with 16- or 32-bit data paths.
 
     EVEN is a synonym for ALIGN 2.
                                    -♦-