The following program will show the use of branch instructions to create a WHILE/ENDWHILE iteration (loop) structure in a program.
The WHILE/ENDWHILE iteration structure tests the condition at the beginning of a loop (in this program, the loop continues while value1 is not zero). This means that if this test result is false (value1 is zero) at the beginning of the loop then the instructions inside the loop are never carried out.
Running the program: when prompted, INPUT a number, if the number is 0 then the program just ends. If any other number is entered then the . . .
This content is restricted to subscribers