Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started