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.
Subjects List
Database (48)
Accounting (39)
Economics (34)
Finance (54)
Programming (122)
Management (69)
Marketing (25)
Report Writing (52)
Engineering (79)
Statistics (39)
Business Studies(45)
Case Studies (15)
Networking (26)
UML (9)
Science (23)
Nursing (11)
MATLAB (17)
Psychology (6)
Math (20)
Data Structure (9)
Python (15)
HRM (25)
IT (21)
Computer Science (57)
Law (4)
Essay (3)
Data Analysis (2)
Big Data (3)
Philosophy (2)
History (1)