Section 3: Assembler
281
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
BREAK
—
Terminate Loop Execution
Syntax
BREAK[.
extent
]
Description
extent
Specifies the
extent
of the generated forward branch. The legal
values are shown below; if omitted, the branch extent is
determined by the current default forward branch size (see
OPT
BRB/BRS/BRW
directive).
B
8-bit forward branch
S
8-bit forward branch
W
16-bit forward branch
The
BREAK
macro is analogous to the
break
statement in C
—
i.e., it terminates
execution of the smallest enclosing loop. It is used to exit a
FOR
,
REPEAT
, or
WHILE
loop before the loop’s termination condition is met.
The
BREAK
macro expands into an unconditional branch to the
assembler-generated label that immediately follows the smallest enclosing loop.
Using this macro outside a loop results in an error.