.WHILE and .ENDW

Begin while loop.

.WHILEexpression [DO]

stmtlist

.ENDW

Remarks

The expression is tested before execution of stmtlist. While expression remains true, stmtlist is executed repeatedly. When expression evaluates false, advance to the instruction following the .ENDW statement.

If expression is false upon entry to the .WHILE loop, stmtlist is not executed; execution continues after the .ENDW directive.

The DO keyword is optional.

Example

.WHILE x:(r1)+ <GT> #0 ; loop until zero is found

. ..ENDW

Note: .WHILE and .ENDW directives are not supported by the DSP56800E/X compiler.