Question: Create a simulated MARIE cpu + memory that can run the following MARIE assembler instructions: LOAD X , STORE X ADD X , SUBT X
Create a simulated MARIE cpumemory that can run the following MARIE assembler instructions:
LOAD X STORE X
ADD X SUBT X
SKIPCOND SKIPCOND SKIPCOND
JUMP X
OUTPUT, INPUT
HALT.
You do not need to create assembler program, you can directly use an array eg int M
How?
Allow the OPCODE in an single integer, and the OPERATOR in the next integer.
Consider, for example, we want to write a simple MARIE program to load
the accumlator with X and then display it and halt.
M LOAD, M load X into AC
M OUTPUT; display AC
M HALT;
M; X
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
