Question: 6. Given the following Super Simple CPU program: LOD X ; Load X into accumulator ADD X Add the value in memory location X to
6. Given the following "Super Simple CPU" program: LOD X ; Load X into accumulator ADD X Add the value in memory location X to accumulator ADD X ; Add the value in memory location X to accumulator SUB Y ; Subtract the value in memory location Y from accumulator DONE STO Z ; Store accumulator in memory location 2 STP ; Stop the program DAT 3 ; A data value, the constant 3 Y DAT 5 ; A data value, the constant 5 Z DATO ; A data value, the constante a. [4] Trace the code, write the values of Accumulator, Memory (X), Memory (V), and Memory (2) in a table shown below (sample table). Assembly instruction Accumulator Y z LOD X 3 3 5 b. (4) Write a pseudocode that performs the same program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
