.struct/.endstruct/.tag
Example 1
1
2
0000
3
0001
4
0002
5
6 000000 0001–
7
8
9 000000
Example 2
10
11
0000
12
0002
13
0004
14
15
16
17 000002
18
19 000001 0002–
20 000002 8002–
21
22 000003 0104–
Example 3
1
2
3
0000
4
0001
5
0002
6
0003
Example 4
1
2
0000
3
0040
4
0040
5
0041
6
0042
7
0043
8
9
10 000000 0040–
11 000001 f030
000002 007f
12
13 000000
4-86
Declare Structure Types
REAL_REC
.struct
NOM
.int
DEN
.int
REAL_LEN
.endstruct
ADD
.bss REAL, REAL_LEN
CPLX_REC
.struct
REALI
.tag REAL_REC
IMAGI
.tag REAL_REC
CPLX_LEN
.endstruct
COMPLEX
.tag CPLX_REC
.bss COMPLEX, CPLX_LEN
ADD
COMPLEX.REALI, A
STL
A, COMPLEX.REALI
ADD
COMPLEX.IMAGI, B
.struct
X
.int
Y
.int
Z
.int
.endstruct
BIT_REC
.struct
STREAM
.string 64
BIT7
.field
BIT9
.field
BIT10
.field
X_INT
.int
BIT_LEN
.endstruct
BITS
.tag BIT_REC
ADD
BITS.BIT7, A
AND
#007Fh, A
.bss BITS, BIT_REC
REAL + REAL_REC.DEN, A
7
9
10
; stag
; member1 = 0
; member2 = 1
; real_len = 2
; access structure element
; allocate mem rec
; stag
; member1 = 0
; cplx_len = 4
; assign structure attrib
; access structure
; allocate space
; no stag puts mems into
; global symbol table
; create 3 dim templates
; stag
; bits1 = 64
; bits2 = 64
; bits3 = 65
; x_int = 66
; length = 67
; move into acc
; mask off garbage bits
Need help?
Do you have a question about the TMS320C54x and is the answer not in the manual?