Directives That Initialize Constants
4-12
-
The .byte, .ubyte, .char, and .uchar directives place one or more 8-bit
values into consecutive words of the current section. These directives are
similar to .word and .uword, except that the width of each value is
restricted to 8 bits.
-
The .field directive places a single value into a specified number of bits
in the current word. With .field, you can pack multiple fields into a single
word; the assembler does not increment the SPC until a word is filled.
Figure 4–2 shows how fields are packed into a word. For this example,
assume the following code has been assembled; notice that the SPC
doesn’t change for the first three fields (the fields are packed into the same
word):
4 000000 6000 .field 3, 3
5 000000 6400 .field 8, 6
6 000000 6440 .field 16, 5
7 000001 0123 .field 01234h,20
000002 4000
8 000003 0000 .field 01234h,32
000004 1234
Figure 4–2. The .field Directive
0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0
0 1 1
15 14 13
15
12 11 10 9 8 7
6 5 4 3 2
0
0 1 1 0 0 1 0 0 0
15
6 bits
.field 8,6
.field 16,5
.field 3,3
5 bits
3 bits
0
0
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1
15
.field 01234h,20
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15
.field 01234h,32
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
15
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: ......