Section 9.4: A program with a loop (Frame 3)                     [prev][home][next]

A while loop in assembler consists of a first statement that has a label, usually TOP or WHILE to which an unconditional jump is taken at the bottom of the loop. Thus, we should see a JMP WHILE, and we do in line 10. At the top of the loop are the instructions which implement the continuation test, which is (x != y) in this program.