Question: & 131 Counting Loop) Write a pseudocode that performs example 5 of Super Simple CPU Applet. 9. [8] Given the following Super Simple CPU program,
& 131 Counting Loop) Write a pseudocode that performs example 5 of Super Simple CPU Applet. 9. [8] Given the following "Super Simple CPU" program, assume three different values for INPUT (1, 2 or 3). For each input value, trace the code by writing the values of Accumulator, Memory (ONE), Memory (Two). and OUTPUT in a table (shown below) and recording their changes after each instruction. You should have 3 trace tables for 3 different values of input INPUT ; Assume three different values for input (1,2,3) SUB ONE JZR ZERO SUB TWO ING NEG ADD TWO OUT STP NEG ADD TWO OUT STP ZERO OUT STP ONE DAT 1 ; A data value, the constant 1 TWO DAT 2 A data value, the constant 2 Assembly instruction Accumulator ONE TWO OUT INPUT 1 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
