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, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
Aplate clutch has a single pair of mating friction surfaces 250-mm od by 175-mm id. the mean value of the coefficient of friction is 0.30, and the actuating force is 4 kn. a) find the maximum pressure and the torque capacity using the uniform-wear model. b) find the maximum pressure and the torque capacity using the uniform-pressure model.
Answers: 3
question
Engineering, 04.07.2019 18:10
Carbon dioxide gas expands isotherm a turbine from 1 mpa, 500 k at 200 kpa. assuming the ideal gas model and neglecting the kinetic and potential energies, determine the change in entropy, heat transfer and work for each kilogram of co2.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
You know the right answer?
Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
...
Questions
question
Social Studies, 11.05.2021 01:00