In this project, you need to implement a simple 32 bit calculator program in assembly language. Your calculator needs to perform the following 5 operations
Addition (+)
Subtraction(-)
Multiplication(*)
Division(/)
Modulo (%)
Requirements
The operation that needs to be performed is (operand A (operator) operand B)
Operand A and Operand B have to be signed 32 bit integers. So an operand can be a negative number. For example, if you input is (-1 + 3), it should return 2.
Operator must be one of the characters('+', '-', '*', '/', '%')
You need to accept the inputs from and display the outputs onto the command window.
The input expression, including both numbers and characters, must be processed by FSM. This means the program should accept one character at a time. This also means you cannot use ReadDec to receive the entire operand.
You need to validate user inputs. If it is not a valid expression, display an error message.
You need to handle all possible exceptions(Ex: Division by zero, invalid characters) and overflows and display appropriate messages.