Please post answer in MARIE 1. Download the MARIE simulator from http://computerscience.jbpub.com/ecoa/2e/student_resources.cfm. 2. From the zip file copy the MarieSimjar 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 below. 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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

dont post existing answer else direct dislike

Нех
Address
Instruction
100
Load
/Load the first number to be doubled
101
Store
Temp
/Use Temp as a parameter to pass value to Subr
102
Jns
Subr
/Store return address, jump to procedure
103
Store
/Store first number, doubled
104
Load
Y
/Load the second number to be doubled
105
Store
Тemp
/Use Temp as a parameter to pass value to Subr
106
JnS
Subr
/Store return address, jump to procedure
107
Store
Y
/Store second number, doubled
108
Halt
/End program
109
х,
Dec
20
10A
Y,
Dec
48
10B
Temp, Dec
10C
Subr, Hex
/Store return address here
10D
Load
Temp
/Ssubroutine to double numbers
10E
Add
Temp
10F
JumpI
Subr
END
Transcribed Image Text:Нех Address Instruction 100 Load /Load the first number to be doubled 101 Store Temp /Use Temp as a parameter to pass value to Subr 102 Jns Subr /Store return address, jump to procedure 103 Store /Store first number, doubled 104 Load Y /Load the second number to be doubled 105 Store Тemp /Use Temp as a parameter to pass value to Subr 106 JnS Subr /Store return address, jump to procedure 107 Store Y /Store second number, doubled 108 Halt /End program 109 х, Dec 20 10A Y, Dec 48 10B Temp, Dec 10C Subr, Hex /Store return address here 10D Load Temp /Ssubroutine to double numbers 10E Add Temp 10F JumpI Subr END
Please post answer in MARIE
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 below. 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 Xin Y and then Output Y. This means you only
have to call Subr once.
Transcribed Image Text:Please post answer in MARIE 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 below. 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 Xin Y and then Output Y. This means you only have to call Subr once.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Avoiding deadlock
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education