EVEN - Force word alignment

Syntax
  EVEN
  
  
Synonym

None

Description

This directive forces the next instruction to the next even address relative to the start of the section. EVEN is an abbreviation for ALIGN 2. Some processors require word and long word operations to begin at even address boundaries. In such cases, the use of the EVEN directive ensures correct alignment. Omission of this directive can result in an error message.

Example

See the following listing for instances where the EVEN directive causes padding bytes to be inserted.

Listing: Using the Force Word Alignment Directive

 Abs. Rel.   Loc    Obj. code   Source line
 ---- ----   ------ ---------   -----------

    1    1   000000                   ds.b  4

    2    2                      ; location count has an even value

    3    3                      ; no padding byte inserted.

    4    4                            even

    5    5   000004                   ds.b  1

    6    6                      ; location count has an odd value

    7    7                      ; one padding byte inserted.

    8    8   000005                   even

    9    9   000006                   ds.b  3

   10   10                      ; location count has an odd value

   11   11                      ; one padding byte inserted.

   12   12   000009                   even

   13   13          0000 000A   aaa:  equ   10
See also

ALIGN - Align Location Counter assembly directive