CODE call main,0 exit PROCBEGIN main alloc 29 move 1, _28 move 1, _27 sub _27, 1, _27 ; subtract array lower bound stor _28, _27, _2 move 1, _28 move 2, _27 sub _27, 1, _27 ; subtract array lower bound stor _28, _27, _2 move 3, _27 move _27, _23 0: ; Top of the while loop move _23, _28 ; moving i move 20, _27 cle _28, _27, _1 beq 0, _1, 1 ; Branch to the end of the while loop ; Start of the loop body move _23, _25 ; moving i move 1, _24 sub _25, _24, _25 sub _25, 1, _24 ; subtract array lower bound load _2, _24, _25 move _23, _26 ; moving i move 2, _24 sub _26, _24, _24 sub _24, 1, _24 ; subtract array lower bound load _2, _24, _24 add _25, _24, _25 move _23, _24 ; moving i sub _24, 1, _24 ; subtract array lower bound stor _25, _24, _2 move _23, _25 ; moving i move 1, _24 add _25, _24, _24 move _24, _23 goto 0 ; Jump to the top of the while loop 1: ; End of the while loop move 0, _27 move _27, _23 2: ; Top of the while loop move _23, _28 ; moving i move 0, _27 ceq _28, _27, _1 beq 0, _1, 3 ; Branch to the end of the while loop ; Start of the loop body print "Enter a number from 1 to 20 (0 to quit) : " inp _22 move _22, _27 ; moving response move 1, _26 clt _27, _26, _1 beq 1, _1, 4 ; Fall through to the else part move _22, _27 ; moving response move 20, _26 cgt _27, _26, _1 beq 1, _1, 5 ; Fall through to the else part print "Fib(" move _22, _26 ; moving response outp _26 print ") = " move _22, _26 ; moving response sub _26, 1, _26 ; subtract array lower bound load _2, _26, _26 outp _26 newl goto 6 ; Jump over then part 5: ; Start of then part print "I said ..." 6: ; End of if statement goto 7 ; Jump over then part 4: ; Start of then part move 1, _26 move _26, _23 7: ; End of if statement goto 2 ; Jump to the top of the while loop 3: ; End of the while loop free 29 PROCEND