Define a Function
.func/.endfunc
B-5
Symbolic Debugging Directives
Resulting assembly language code:
8
.global _power
9
.sym _power,_power,36,2,0
10
.func 3
11
12
;***************************************************************
13
;* FUNCTION DEF: _power *
14
;***************************************************************
15
000000
_power:
16
000000 eefd
FRAME #–3
17
000001 f495
nop
18
;* A
assigned to _x
19
.sym _x,0,4,17,16
20
.sym _n,4,4,9,16
21
.sym _x,0,4,1,16
22
.sym _i,1,4,1,16
23
.sym _p,2,4,1,16
24
.line 3
25
000002 8000
STL A,*SP(0)
26
.line 5
27
000003 7602
ST #1,*SP(2)
000004 0001
28
.line 6
29
000005 7601
ST #1,*SP(1)
000006 0001
30
000007 f7b8
SSBX SXM
31
000008 f495
nop
32
000009 1004
LD *SP(4),A
33
00000a 0801
SUB *SP(1),A
34
00000b f843
BC L3,ALT
00000c 0018’
35
; branch occurs
36
00000d
L2:
37
.line 7
38
00000d 4400
LD *SP(0),16,A
39
00000e 3102
MPYA *SP(2)
40
00000f 8102
STL B,*SP(2)
41
.line 6
42
000010 6b01
ADDM #1,*SP(1)
000011 0001
43
000012 f7b8
SSBX SXM
44
000013 f495
nop
45
000014 1004
LD *SP(4),A
46
000015 0801
SUB *SP(1),A
47
000016 f842
BC L2,AGEQ
000017 000d’
48
; branch occurs
49
000018
L3:
50
.line 8
51
000018 1002
LD *SP(2),A
52
.line 9
53
000019 ee03
FRAME #3
54
00001a fc00
RET
55
; return occurs
56 .endfunc 9,000000000h, 3
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: ......