Question: Project 2 : A Program Simulating Modified MARIE s Computer Language: Python Input: A text file containing decimal ( not Hex ) machine code (
Project : A Program Simulating Modified MARIEs Computer
Language: Python
Input:
A text file containing decimal not Hex machine code not assembly code for MARIEs computer following instruction set described in chapter Instructions are in different lines no need for semicolon at the end of each instruction
Output:
Any output specified in the input file by will be displayed on screen
Computer specification:
Generally the same as in chapter :
memory address:
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
Instruction will ask users input from keyboard, displays content in calculator
Instruction will skip next instruction if AC Instruction will skip next instruction if AC Instruction will skip next instruction if AC
Other requirements:
Your program should accept any length of input program that can be fit in MARIEs memory slots and generate correct result andor 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:
Running of the program with this input will ask user to input numbers, let's say and the program will output the positive difference on the screen, which is
Address Content Comment
Input the first number
Save the first number to address
Input the second number
Save the second number to address
Second number First number, result in AC
If AC jump to address
Jump to address
Load the first number to AC
First number second number, result in AC
Print ACs value
Halt
Storage for first number
Storage for second number
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
