It is a program for converting from the C language to the MIPS language. The program is designed in the C language and contains many features. It converts all arithmetic operations, if statements, and loops. You can refer to the usage instructions for a better understanding. Additionally, to facilitate and simplify the code, we have made some assumptions that you should take into consideration and read below in order to use the code correctly.
We are six students at the Faculty of Engineering in Port Said, studying Software Engineering. We have undertaken this project as an application for the Microprocessor course to facilitate the conversion of codes from C to MIPS.
to install mipsify
sudo make install
Follow the steps below to use MIPSify on your C code.
First, create your C code and place it in the /test
directory. For example:
touch tests/test.txt
Run the mipsify
script and provide your C file in the test directory as an argument. For example:
mipsify tests/test.txt
We have made some assumptions in the code conversion to facilitate the process. Please consider these assumptions while using the code.
-
Multiplication Operation:
- Assume that the multiplication operation is performed using the "mul" instruction.
mul $s0, $s1, $s2
- Assume that the multiplication operation is performed using the "mul" instruction.
-
"muli" Operation:
- Assume that there is an operation called "muli" that multiplies a constant by a value already present in memory.
muli $s0, $s1, 5
- Assume that there is an operation called "muli" that multiplies a constant by a value already present in memory.