Directives That Align the Section Program Counter
4-15
Assembler Directives
4.5
Directives That Align the Section Program Counter
The .align directive aligns the SPC at a 1-word to 128-word boundary. This
ensures that the code following the directive begins on an x-word or page
boundary. If the SPC is already aligned at the selected boundary, it is not
incremented. Operands for the .align directive must equal a power of 2
between 2
0
and 2
16
(although directives beyond 2
7
are not meaningful). For
example:
Operand of 1
aligns SPC to word boundary
2
aligns SPC to long word / even boundary
128 aligns SPC to page boundary
The .align directive with no operands defaults to a page boundary.
The .even directive aligns the SPC so that it points to the next word boundary.
It is equivalent to specifying the .align directive with an operand of 1. Using
.even with an operand of 2 aligns the SPC to the next long word boundary. Any
unused bits in the current word are filled with 0s.
Figure 4–4 demonstrates the .align directive. Assume that the following code
has been assembled:
1 000000 4000 .field 2, 3
2 000000 4160 .field 11, 8
3 .align 2
4 000002 0045 .string ”Errorcnt”
000003 0072
000004 0072
000005 006f
000006 0072
000007 0063
000008 006e
000009 0074
5 .align
6 000080 0004 .byte 4
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......