Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Download the MARIE simulator from http://computerscience.jbpub.com/ecoa/2e/student_resources.cfm. From the .zip file copy the MarieSim.jar file to another directory (like the Desktop). Run Marie.jar (This can be

  1. Download the MARIE simulator from http://computerscience.jbpub.com/ecoa/2e/student_resources.cfm.
  2. From the .zip file copy the MarieSim.jar file to another directory (like the Desktop).
  3. Run Marie.jar (This can be done on any system with the Java Runtime Environment).
  4. Click on File, then Edit. This will bring up the MARIE editor. Type in the code from example 4.5 of the textbook. Do not include the Hex Addresses, but do include the comments. Click on File and Save As to save your Assembly file (.mas)
  5. In the Editor, click on Assemble and then Assemble Current File. Fix any errors in the error list. If there are no errors, the assembler will create a MARIE executable file (.mex). Back in the simulator, click File and Load. Select the newly created .mex file. This loads your assembled program. You can now click Run and Run. You can see if the program ran correctly by examining the memory at the locations X and Y (in this program that is locations 109 and 10A).
  6. If your program did not run correctly, you can debug it by Stepping through the program.
  7. Once it works, modify it so that instead of hard coding X and Y in the program, Input a number (call it X) using the Input instruction. Store the result of doubling X in Y and then Output Y. This means you only have to call Subr once.
  8. Upload your assembly file (.mas) to this activity.

Please help with part 7 of this assignment.

THIS IS THE CODE PROVIDED

Load X Store Temp JnS Subr Store X Load Y Halt X, Dec 20 Y, Dec 48 Temp, Dec 0 Subr, Hex 0 Load Temp Add Temp JumpI Subr

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions