QuestionQuestion

Coding Assignment #1
Attached you will find a MIPS assembly language program that could be used to balance your checkbook (CodingAssignment1_NeedToModify.s). 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.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#####################################################################
# Programmer:
# Course:
#####################################################################
# Functional Description:
# This program can be used to balance your check book.
#### The program also checks for possible overflow and in that case
#### rejects the transaction
#####################################################################
# Pseudocode:
# Print Header;
# s0 = 0;
# loop: Prompt user for transaction;
# v0 << transaction amount;
# if (v0 = 0) done;
#### s1 = s0 + v0;
#### if (s0 >= 0) ch_pos;
#### if (v0 >= 0) not_overflow;
#### if (s1 >= 0) overflow;...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$50.00 $25.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Assembly Language Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats