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
Содержание TMS320C54x
Страница 38: ......
Страница 39: ......
Страница 40: ......
Страница 41: ......
Страница 42: ......
Страница 43: ......
Страница 44: ......
Страница 45: ......
Страница 46: ......
Страница 47: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 51: ......
Страница 52: ......
Страница 53: ......
Страница 54: ......
Страница 55: ......
Страница 56: ......
Страница 57: ......
Страница 58: ......
Страница 59: ......
Страница 60: ......
Страница 61: ......
Страница 62: ......
Страница 276: ......
Страница 277: ......
Страница 278: ......
Страница 279: ......
Страница 280: ......
Страница 281: ......
Страница 282: ......
Страница 283: ......
Страница 284: ......
Страница 285: ......
Страница 286: ......
Страница 287: ......
Страница 288: ......
Страница 289: ......
Страница 290: ......
Страница 291: ......
Страница 292: ......
Страница 293: ......
Страница 294: ......
Страница 295: ......
Страница 296: ......
Страница 297: ......
Страница 298: ......
Страница 299: ......
Страница 300: ......
Страница 301: ......
Страница 302: ......