SPRUI03E June 2015 – January 2023
These directives align the section program counter (SPC) or reserve space in a section:
Figure 6-3 demonstrates the .align directive. Using the following assembled code:
1
2 00000000 00AABBCC .field 0AABBCCh,24
3 .align 2
4 00000000 0BAABBCC .field 0Bh,5
5 00000004 000000DE .field 0DEh,10
1
2 00000000 00000100 .word 100h, 200h
00000004 00000200
3 00000008 Res_1: .space 17
4 0000001c 0000000F .word 15
5 00000033 Res_2: .bes 20
6 00000034 000000BA .byte 0BAh
Res_1 points to the first byte in the space reserved by .space. Res_2 points to the last byte in the space reserved by .bes.