SourcePoint AMD Help

Table of Contents

do while

Group and conditionally execute emulator commands.


do {commands} while(bool-cond)



specifies one or more emulator commands. The braces are required when you enter multiple commands.


specifies that the loop ends when bool-cond is false. The bool-cond option specifies a number or an expression that must evaluate to true (non-zero) or false (zero).


Use the do while control construct to define a loop that is executed at least once. The test for continued execution (evaluation of bool-cond) comes after the command (or group of commands) is executed. Always enclose the loop body {commands} in braces when there is more than one command. The commands are re-executed while the expression evaluates to true. The include command is not executable inside the do while control construct.


The following example shows how to display uppercase alphabetic characters using a do while loop.

Command input:

define int4 a = 41h

define char c



   c = toascii(a)


   a += 1


while (a <= 5Ah)



Related Topics: