Quiz 10

Trace through the execution of the following assembly language program when the input is 6.
1 (loadI 0 R0)
2 (loadI 1 R1)
3 (loadI 2 R2)
4 (input I1 R3)
5 (jumpEQ R3 R0 11)
6 (rem R3 R2 R4)
7 (output R4 O1)
8 (sub R3 R4 R3)
9 (div R3 R2 R3)
10 (jump 5)
11 (halt)
answer