Question: Hand - compile the following MARIE code where Clear is stored at address 2 0 8 and the variables X , Y , and SUM
Handcompile the following MARIE code where Clear is stored at address and the variables X Y and SUM are stored in this order immediately after Halt. You will have to figure out the memory locations for each of these as well as Top and Done to compile the instructions.
Clear
Store Sum
Top: Input
Store X
Skipcond
Jump Done
Load X
Subt Y
Skipcond
Jump Top
Load Sum
Add X
Store Sum
Jump Top
Done: Load Sum
Output
Halt
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
