Question: Computer design & architecture MIPS programming software named MARS need help in in English thank you all files are in the google drive:https://drive.google.com/open?id=1cZGJ3nz7c4IYd2mxGiW4bk3VIlveHUVP Negative transaction

Computer design & architecture

MIPS programming software named MARS

need help in in English

thank you

all files are in the google drive:https://drive.google.com/open?id=1cZGJ3nz7c4IYd2mxGiW4bk3VIlveHUVP

Negative transaction values correspond to checks drawn on the checking account and positive transactions values correspond to deposits into the checking account. The program terminates when a value of zero is read in. After each transaction the new calculated balance is displayed.

Run this program. Use the single step feature to observe the contents of the registers as the program executes. Set a few breakpoints in the program and observe the results. Notice that this program only works for integer values.

The program includes a heading with a place to insert your name. The program also includes to-do items like pseudo code explanation of newly added code with < > at different places within the code. This program provides an example of how all of your programs should be documented in this course. The syscall instructions are calls to system services to perform input\output functions.

Run this program and input two deposits in the amount of 1234567890. You will notice that this program does not contain any instructions to detect when overflow occurs so it produces an erroneous balance when overflow does occur. Your job for this programming assignment is to make improvements to this program so that whenever an overflow does occur in either the positive or negative domain the following specific announcement will be displayed: Overflow Occurred Transaction Ignored Next the correct previous balance should be displayed on the following line in the Balance column. Then the program should prompt the user for the next transaction. No message other than the one specified above is acceptable!

Be sure to place in-line comments within the program everywhere you have made changes to the initial program. Each of your comments should be preceded by #### to make it easy to find your modifications to the initial program.

------------------------------------------------------------------------------------------------------------

The grading rubric is as follows

Comments and style = 2 points

Program improvement 1. Detects overflow = 3 points 2. Prints announcement of overflow = 2 points 3. Displays correct previous balance = 3 points

all files are in the google drive:https://drive.google.com/open?id=1cZGJ3nz7c4IYd2mxGiW4bk3VIlveHUVP

what Ive have done so far

#####################################################################

# Programmer:

# Course:

#####################################################################

# Functional Description:

# This program can be used to balance your check book.

#

#####################################################################

# Pseudocode:

# Print Header;

# s0 = 0;

# loop: Prompt user for transaction;

# v0 << transaction amount;

# if (v0 = 0) done;

# s0 = s0 + v0;

#

# cout << s0

# go to loop

# done:

# cout << "Adios Amigo"

#

######################################################################

# Register Usage:

# $v0: Transaction Amount

# $s0: Current Bank Balance

#

######################################################################

.data # Data declaration section

Head: .ascii " \tThis program, written by ,"

.ascii " can be used to balance your check book."

.asciiz " \t\t\t\t\t\t\t\t\t Balance"

tabs: .asciiz "\t\t\t\t\t\t\t\t\t"

tran: .asciiz " Transaction:"

bye: .asciiz " **** Adios Amigo **** "

.text # Executable code follows

main:

li $v0, 4 # system call code for print_string

la $a0, Head # load address of Header message into $a0

syscall # print the Header

move $s0, $zero # Set Bank Balance to zero

loop:

li $v0, 4 # system call code for print_string

la $a0, tran # load address of prompt into $a0

syscall # print the prompt message

li $v0, 5 # system call code for read_integer

syscall # reads the amount of Transaction into $v0

beqz $v0, done # If $v0 equals zero, branch to done

addu $s0, $s0, $v0 # add transaction amount to the Balance

li $v0, 4 # system call code for print_string

la $a0, tabs # load address of tabs into $a0

syscall # used to space over to the Balance column

li $v0, 1 # system call code for print_integer

move $a0, $s0 # move Bank Balance value to $a0

syscall # print Bank Balance

b loop # branch to loop

done: li $v0, 4 # system call code for print_string

la $a0, bye # load address of msg. into $a0

syscall # print the string

li $v0, 10 # terminate program run and

syscall # return control to system

# END OF PROGRAM

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!