Texas Instruments TMS320C54x User Manual page 200

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

Producing Messages in Macros
Example 5–14. Producing Messages in a Macro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 000000
1
1
1
1
1
1
1
1
1
000000 1002
1
000001 1101
1
000002 F500
1
17
18 000003
1
1
1
***** USER ERROR ***** – : ERROR –– Missing Parameter
1
1 Error, No Warnings
5-20
testparam
.macro x,y
.if ($symlen(x) == 0)
.emsg "ERROR –– Missing Parameter"
.mexit
.elseif ($symlen(y) == 0)
.emsg "ERROR == Missing Parameter"
.mexit
.else
LD y, A
LD x, B
ADD A, B
.endif
.endm
testparam 1,2
.if ($symlen(x) == 0)
.emsg "ERROR –– Missing Parameter"
.mexit
.elseif ($symlen(y) == 0)
.emsg "ERROR == Missing Parameter"
.mexit
.else
LD 2, A
LD 1, B
ADD A, B
.endif
testparam
.if ($symlen(x) == 0)
.emsg "ERROR –– Missing Parameter"
.mexit

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Table of Contents