Assign Character Strings to Substitution Symbols
.loop/.break/.endloop
4-65
Assembler Directives
Syntax
.loop [
well-defined expression]
.break [
well-defined expression]
.endloop
Description
Three directives enable you to repeatedly assemble a block of code.
The .loop directive begins a repeatable block of code. The optional expression
evaluates to the loop count (the number of loops to be performed). If there is
no expression, the loop count defaults to 1024, unless the assembler first
encounters a .break directive with an expression that is true (nonzero) or
omitted.
The .break directive is optional, along with its expression. When the expres-
sion is false ( 0 ), the loop continues. When the expression is true ( nonzero),
or omitted, the assembler breaks the loop and assembles the code after the
.endloop directive.
The .endloop directive terminates a repeatable block of code; it executes
when the .break directive is true (nonzero) or when number of loops performed
equals the loop count given by .loop
Example
This example illustrates how these directives can be used with the .eval
directive.
1 .eval 0,x
2 COEF .loop
3 .word x*100
4 .eval x+1, x
5 .break x = 6
6 .endloop
1 000000 0000 .word 0*100
1 .eval 0+1, x
1 .break 1 = 6
1 000001 0064 .word 1*100
1 .eval 1+1, x
1 .break 2 = 6
1 000002 00C8 .word 2*100
1 .eval 2+1, x
1 .break 3 = 6
1 000003 012C .word 3*100
1 .eval 3+1, x
1 .break 4 = 6
1 000004 0190 .word 4*100
1 .eval 4+1, x
1 .break 5 = 6
1 000005 01F4 .word 5*100
1 .eval 5+1, x
1 .break 6 = 6
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: ......