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, 21.06.2019 16:00
This statement accurately describes how headlines should be placed in business documents.
Answers: 3
question
Computers and Technology, 21.06.2019 17:00
In addition to using the icons to adjust page margins, a user can also use
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
You know the right answer?
Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
...
Questions
question
English, 19.02.2021 19:50
question
Mathematics, 19.02.2021 19:50
question
Mathematics, 19.02.2021 19:50
question
Chemistry, 19.02.2021 19:50
question
Mathematics, 19.02.2021 19:50
question
Mathematics, 19.02.2021 19:50