Question: For Problems 1 & 2, reference the following piece of assembly code: lw 0 1 pos1 lw 0 2 neg1 lw 0 3 count nor
For Problems 1 & 2, reference the following piece of assembly code: lw 0 1 pos1 lw 0 2 neg1 lw 0 3 count nor 1 1 4 loop beq 0 3 done //beq0 nor 3 3 5 nor 4 5 5 beq 0 5 even //beq1 add 6 1 6 beq 0 0 else //beq2 even add 7 1 7 else add 3 2 3 beq 0 0 loop //beq3 done halt count .fill 5 pos1 .fill 1 neg1 .fill -1 Problem 1: Out of Control (20 points) a) Write the sequence of branch decisions for each beq instruction. Let taken be denoted as T and not taken as N. For example, a beq that is taken twice and then not taken once would have a sequence TTN. The global sequence will be the for all branch instructions put together. For example, if beq0 executes as N, then beq1 as T, then beq0 as N, we would have a sequence NTN. [5]



For Problems 1 & 2, reference the following piece of assembly code lW nor loop beq posl negl count 4 done 1 //beqe nor3 nor 4 beq //beq1 even add6 beq e even add 7 else add 3 beq e else //beq2 1 loop //beq3 done halt count .fill 5 pos1 .fill 1 neg1 .fill -1 For Problems 1 & 2, reference the following piece of assembly code lW nor loop beq posl negl count 4 done 1 //beqe nor3 nor 4 beq //beq1 even add6 beq e even add 7 else add 3 beq e else //beq2 1 loop //beq3 done halt count .fill 5 pos1 .fill 1 neg1 .fill -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
