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 17:20
When developing a stakeholder matrix, the portfolio manager must look at the portfolio governance in order to complete the stakeholder analysis. in your own words, what is the role, interest and expectations of the governance?
Answers: 3
question
Computers and Technology, 22.06.2019 07:00
Robots with telescoping arms are sometimes used to perform tasks (e.g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4ΞΈ) and the arm rotates according to the relationship ΞΈ=βˆ’Ο€4t2+Ο€t , where r is in feet, ΞΈ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≀ t ≀ 4s.
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
You know the right answer?
Project 2: A Program Simulating Modified MARIE's Computer
Language: Any computer language
...
Questions
question
Physics, 24.03.2021 19:50
question
Biology, 24.03.2021 19:50
question
Mathematics, 24.03.2021 19:50
question
Mathematics, 24.03.2021 19:50
Questions on the website: 13722363