The while-statement

  • High level programming languages provide loop-statements that repeatly execute a group of statements

  • The most commonly used loop-statement is the while-statement:

         while (condition)        
         {
            statement(s);
         }

  • Although loop-statements behaves diferently than if/if-else-statements, they are fundamentally the same:

      • The loop-statements and if/if-else-statements both alter (= change) the program flow

    We can use cmp + conditional branch instructions to translate any loop-statement !!!