Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use MARIEs instruction set to write a program following Language : Any computer language Input : A text file containing decimal (not Hex) machine code

Use MARIEs instruction set to write a program

following

Language: Any computer language

Input:

A text file containing decimal (not Hex) machine code (not assembly code) for MARIEs computer following instruction set described in chapter 4. Instructions are in different lines (no need for semicolon at the end of each instruction)

Output:

Any output specified in the input file by 6000 will be displayed on screen

Computer specification:

1000 memory address: 000999

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 users 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 MARIEs 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

Instruction Number
Binary Dec Instruction meaning

0001

0010

0011

0100

0101

0110

0111

1000

1001

1

2

3

4

5

6

7

8

9

Load X

Store X

Add X

Subt X

Input

Output

Halt

Skipcond

Jump

Load contents of address X into AC

Store the contents of AC

Add the contents of address X to AC

Subtract the contents of address X from AC

Input a value from the keyboard into AC

Output the value in AC to the display

Terminate Program

Skip next Instruction on condition

Load the value of X into PC

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is the purpose of an interface? IN JAVA

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

3.What are the Importance / Role of Bank in Business?

Answered: 1 week ago

Question

What did they do? What did they say?

Answered: 1 week ago