Question: translate this Java code to MARIE simulator code: * Hints: * 1. Data storage acting as variables AND constants must be in your symbol *

translate this Java code to MARIE simulator code:

* Hints: * 1. Data storage acting as variables AND constants must be in your symbol * table; MARIE does not permit the use of immediate mode operands except * as provided in the LOADA extended opcode. I am not saying you need to use * LOADA. This is just a clarification.

* 2. Remember that comparisons of variables to numbers involves the * difference between those, and the use of 0 options * in SKIPCOND (000, 400 and 800, respectively)

* 3. MARIE has one peculiarity - on a long run, it may stop after some * fixed number of steps (instructions) regardless of breakpoint or * step settings. If the PC is not showing the last instruction * (which ought to be HALT) then choose Run -> Run again to continue * execution to its conclusion.

* 4. Don't forget to switch MARIE's output window to DEC mode for this * before you start execution. * If you don't, you'll get a bunch of blanks. */

* 5. At the end it should print 1550, in the output menu.

translate this Java code to MARIE simulator code: * Hints: * 1.

public class PP1 { public static void main(String[] args) { int sum = 0; for (int x = 1; x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!