subject

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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
...
Questions
question
Biology, 15.12.2020 06:50
question
Mathematics, 15.12.2020 06:50
question
Mathematics, 15.12.2020 06:50
question
Mathematics, 15.12.2020 06:50
question
Mathematics, 15.12.2020 06:50
Questions on the website: 13722361