This project implements a simple calculator using MIPS assembly language. It supports basic arithmetic operations including addition, subtraction, multiplication, division, modulo, and negation. Users can enter numbers via the keyboard, choose an operation from a menu, and see the result displayed on the screen.
- Input two integers via the keyboard.
- Menu with options for addition, subtraction, multiplication, division, modulo, and negation.
- Handle special cases such as division by zero.
- Display the calculation result on the screen.
- Option to exit the program.
- If the user tries to divide by zero, an error message is displayed and the program returns to the main menu.
- For negation, only the first number is used.
- A MIPS simulator like SPIM or QtSpim.
- A text editor for modifying the source code, if needed.
Throughout this project, I gained valuable experience in several areas:
- MIPS Assembly Programming: Understanding MIPS assembly language, including the use of registers, basic arithmetic and logic instructions, and syscall operations for input/output.
- Error Handling: Learning how to manage edge cases like division by zero and ensuring the program continues to function smoothly.
- User Interaction: Designing a simple user interface with a menu system, including reading input from the keyboard and displaying results on the screen.
- Problem-Solving: Developing the logic for a simple calculator, addressing challenges, and debugging issues along the way.
These experiences have helped me become more proficient in MIPS assembly programming and improved my problem-solving skills.
- Linkedin - Mohamed Abnoune
- GitHub - Mohamed Abnoune