logo
+1-617-874-1011 (US)
+61-7-5641-0117 (AU)
+44-117-230-1145 (UK)
Live Chat

Simple Integer Calculator Assignment

Project: Simple Integer Calculator

Given this modified definition of the <assign> statement from the Compiler Modules grammar:

<assign> ::= Id = Int op Int

where Id = alphabetic variable name, 1 to 6 characters

Int = positive integer value < 1000

{`op = one of {+ add | - subtract | * multiply | / divide}`}

Write a correct program in MIPS - QtSpim assembly language that: 

  • Interprets the <assign> statement from the grammar.
  • Accepts as input a string of up to 20 characters.
  • Parses the string according to the grammar.
  • Calculates the correct integer arithmetic result.
  • Writes the calculated result value to the QtSpim display screen.

For Example:

input -- Total = 63 * 72 (entered by the program user)

output -- Total = 4536

Use the System Service calls on page A-44 of the textbook for the input and output.

Your program should display a message when it stops.

A loop to allow testing would be helpful.

The work products of this assignment are:

  • A copy of the source program text file.
  • Screen captures showing the multiple test output results.
Improve Your Grades with Custom Writing Help
Homework Help
Writing Help
Editing Services
Plagiarism check
Proofreading services
Research Project help
Custom writing services
scanner
E learning blogs

Disclaimer : The study tools and academic assistance/guidance through online tutoring sessions provided by AssignmentHelp.Net is to help and enable students to compete academically. The website does not provide ghostwriting services and has ZERO TOLERANCE towards misuse of the services. In case any user is found misusing our services, the user's account will be immediately terminated.