subject
Engineering, 05.05.2020 01:10 potternatalie90

Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
Input:
A text file containing decimal (not Hex) machine code (not assembly code) for
MARIE's computer following instruction set described in chapter 4.
Instructions are in different lincs (no need for semicolon at the end of each
instruction)
Dec
LOL
Instruction Number
Binary Hex instauction Meaning
0001
Load contents of address X into AC.
0010
store X Store the contents of AC at address X.
0011
Add X Add the contents of address x to AC.
0100
subt x Subtraot the contents of address X from AC.
0101
Input Input a value from the keyboard into AC.
0110
Output Out put the value in AC to the display.
0111
Halt Terminate program.
1000
Skipcond Skip nert Instruction on condition.
1001
Jump X Load the value of x into PC.
Output:
Any output specified in the input file by 6000 will be displayed on screen
Computer specification:
Generally the same as in chapter 4:
•1000 memory address: 000—999
• Four digits decimal instruction or data in each memory slot.
•One PC, one AC, one IR, one MBR, one MAR
• The program in the input file needs to be loaded into memory first and
stored in consecutive slots starting from address 000
Instruction 5000 will ask user's input from keyboard, 6000 displays
content in calculator
• Instruction 8000 will skip next instruction if AC<0. Instruction 8100
will skip next instruction if AC=0. Instruction 8200 will skip next
instruction if AC>0
Other requirements:
Your program should accept any length of input program that can be fit in
MARIE's 1000 memory slots and generate correct result and/or output on
screen.
Submit the source code together with readme file with instruction to compile, build
and use your program
Example:
Input file contains following code (return positive difference):
5000
2011
5000
2012
4011
8000
9009
1011
4012
6000
7000
Running of the program with this input will ask the user to input 2 numbers, let's say 5 and 10, the program will output the positive difference on the screen, which is 5.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Condition monitoring is a major component of. (clo4) a)- predictive maintenance. b)-preventive maintenance c)-proactive maintenance d)-reactive maintenance.
Answers: 1
question
Engineering, 04.07.2019 18:20
An engine runs on the ideal diesel cycle. the cycle has a compression ratio of 20 and a cutoff ratio of 2. the highest temperature in the cycle is 1200 k. if the heat into the system is 300 kj/kg of working fluid and using variable specific heats determine the work produced per mass of working fluid
Answers: 3
question
Engineering, 06.07.2019 02:30
A75mm diameter shaft is supported in a journal bearing 75mm long with a diametral clearance of 0. 1mm. it supports a radial load of 1000 n and is lubricated with sae 50 oil at 70°c. find the friction torque and the power loss when the crankshaft rotates at 2900 rev/min.
Answers: 1
You know the right answer?
Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
...
Questions
question
History, 25.03.2021 17:50
question
Mathematics, 25.03.2021 17:50
question
Computers and Technology, 25.03.2021 17:50
question
Mathematics, 25.03.2021 17:50
question
Mathematics, 25.03.2021 17:50
Questions on the website: 13722363