Align SPC on a Boundary
.align/.even
4-27
Assembler Directives
Syntax
.align [
size]
.even
Description
The .align directive aligns the section program counter (SPC) on the next
boundary, depending on the
size parameter. The size may be any power of 2,
although only certain values are useful for alignment.
An operand of 128 aligns the SPC on the next page boundary, and this is the
default if no
size is given. The assembler assembles words containing null val-
ues (0) up to the next x-word boundary.
Operand of
1
aligns SPC to word boundary
2
aligns SPC to long word / even boundary
128 aligns SPC to page boundary
The .even directive aligns the SPC on a long word/even boundary. This direc-
tive is equivalent to the .align directive with an operand of 2.
Using the .align directive has two effects:
-
The assembler aligns the SPC on a boundary
within the current section.
-
The assembler sets a flag that forces the linker to align the section so that
individual alignments remain intact when a section is loaded into memory.
Example
This example shows several types of alignment, including .even, .align 4, and
a default .align.
1 000000 0004 .byte 4
2 .even
3 000002 0045 .string ”Errorcnt”
000003 0072
000004 0072
000005 006F
000006 0072
000007 0063
000008 006E
000009 0074
4 .align
5 000080 6000 .field 3,3
6 000080 6A00 .field 5,4
7 .align 2
8 000082 6000 .field 3,3
9 .align 8
10 000088 5000 .field 5,4
11 .align
12 000100 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: ......