MIPS Setup
Setting up the Code Editor
Introduction to MARS Simulator
MARS simulator will be the software on which we will be running our MIPS code.
Setting up JAVA SDK
(Please note this tutorial is to download SDK Ver 11)
Downloading Java SDK on MacOS:
- Open a web browser on your macOS computer.
- Go to the Oracle Java SE Downloads page at https://www.oracle.com/java/ technologies/javase-jdk11-downloads.html.
- On the Downloads page, locate the JDK (Java Development Kit) section.
- Click on the "Download" button for the version of Java you want to install. Make sure to select the version suitable for your macOS version (e.g., macOS x64).
- You may be prompted to log in or create an Oracle account. Follow the instructions on the screen to proceed.
- Once logged in, review and accept the license agreement.
- On the download page, locate the macOS version and click on the provided download link.
- The JDK installer package will be downloaded to your computer.
- Locate the downloaded package in your Downloads folder or the folder you specified for downloads.
- Double-click on the JDK installer package to launch the installation wizard.
- Follow the instructions in the installation wizard to complete the installation of the Java SDK on your macOS computer.
Downloading Java SDK on Windows:
- Open a web browser on your Windows computer.
- Go to the Oracle Java SE Downloads page at https://www.oracle.com/java/ technologies/javase-jdk11-downloads.html.
- On the Downloads page, locate the JDK (Java Development Kit) section.
- Click on the "Download" button for the version of Java you want to install. Make sure to select the version suitable for your Windows version (e.g., Windows x64).
- You may be prompted to log in or create an Oracle account. Follow the instructions on the screen to proceed.
- Once logged in, review and accept the license agreement.
- On the download page, locate the Windows version and click on the provided download link.
- The JDK installer executable file (e.g., jdk-11.0.x_windows-x64_bin.exe) will be downloaded to your computer.
- Locate the downloaded executable file, and double-click on it to launch the installation wizard.
- Follow the instructions in the installation wizard to complete the installation of the Java SDK on your Windows computer.
Downloading Java SDK on Windows:
- Open a web browser on your Linux computer.
- Go to the Oracle Java SE Downloads page at https://www.oracle.com/java/ technologies/javase-jdk11-downloads.html.
- On the Downloads page, locate the JDK (Java Development Kit) section.
- Click on the "Download" button for the version of Java you want to install. Make sure to select the version suitable for your Linux distribution.
- You may be prompted to log in or create an Oracle account. Follow the instructions on the screen to proceed.
- Once logged in, review and accept the license agreement.
- On the download page, locate the Linux version and click on the provided download link.
- The JDK archive file (e.g., jdk-11.0.x_linux-x64_bin.tar.gz) will be downloaded to your computer.
- Open the terminal on your Linux system. You can typically find it in the Applications menu or by using the shortcut Ctrl+Alt+T.
- Navigate to the directory where you downloaded the JDK archive file. For example, if it's in the Downloads folder, you can use the following command:
cd ~/Downloads
- Extract the contents of the JDK archive using the following command:
tar -xvzf jdk-11.0.x_linux-x64_bin
Setting Up MARS Simulator
Note: Is your MARS text unreadably small? Download and use a new release Java 9 or above which contains a fix to automatically scale and size AWT and Swing components for High Dots Per Inch (HiDPI) displays on Windows and Linux.
Downloading MIPS MARS Simulator on macOS:
- Open a web browser on your macOS computer.
- Go to the official website of MIPS MARS at [ http:// courses.missouristate.edu/kenvollmar/mars/]( http:// courses.missouristate.edu/kenvollmar/mars/).
- On the homepage, click on the "MARS 4.5" link under the "Download MARS" section.
- A ZIP file named "mars4_5.jar.zip" will be downloaded to your computer.
- Locate the downloaded ZIP file in your Downloads folder or the folder you specified for downloads.
- Double-click on the ZIP file to extract its contents. This will create a JAR file named "mars4_5.jar".
- Move the "mars4_5.jar" file to a suitable location on your computer, such as the Applications folder.
- Open Terminal on your macOS by going to Applications > Utilities > Terminal.
- In the Terminal window, navigate to the directory where you placed the "mars4_5.jar" file. For example, if you placed it in the Applications folder, you can use the following command:
cd/Applications
- Once you are in the correct directory, execute the following command to run the MIPS MARS simulator:
java -jar mars4_5.jar
- The MIPS MARS simulator should now launch on your macOS computer.
Downloading MIPS MARS Simulator on Windows:
- Open a web browser on your Windows computer.
- Go to the official website of MIPS MARS at [http://courses.missouristate.edu/ kenvollmar/mars/]([http://courses.missouristate.edu/ kenvollmar/mars/])
- On the homepage, click on the "MARS 4.5" link under the "Download MARS" section.
- A ZIP file named "mars4_5.jar.zip" will be downloaded to your computer.
- Locate the downloaded ZIP file in your Downloads folder or the folder you specified for downloads.
- Right-click on the ZIP file and select "Extract All" to extract its contents. This will create a JAR file named "mars4_5.jar".
- Move the "mars4_5.jar" file to a suitable location on your computer, such as the Program Files folder.
- Open the Command Prompt on your Windows computer by pressing the Windows key + R, typing "cmd," and hitting Enter.
- In the Command Prompt window, navigate to the directory where you placed the "mars4_5.jar" file. For example, if you placed it in the Program Files folder, you can use the following command:
cd "C:\Program Files"
- Once you are in the correct directory, execute the following command to run the MIPS MARS simulator:
java -jar mars4_5.jar
- The MIPS MARS simulator should now launch on your Windows computer.
Downloading MIPS MARS Simulator on Linux:
- Open a web browser on your Linux computer.
- Go to the official website of MIPS MARS at [http://courses.missouristate.edu/ kenvollmar/mars/](http://courses.missouristate.edu/ kenvollmar/mars/)
- On the homepage, click on the "MARS 4.5" link under the "Download MARS" section.
- A ZIP file named "Mars4_5.jar.zip" will be downloaded to your computer.
- Open the terminal on your Linux system. You can typically find it in the Applications menu or by using the shortcut Ctrl+Alt+T.
- Navigate to the directory where you downloaded the ZIP file. For example, if it's in the Downloads folder, you can use the following command:
cd ~/Downloads
- Unzip the ZIP file using the following command:
unzip Mars4_5.jar.zip
- This will extract the "Mars4_5.jar" file from the ZIP archive.
- Move the "Mars4_5.jar" file to a suitable location on your computer. For instance, you can move it to the /opt directory using the following command:
sudo mv Mars4_5.jar /opt
- To run the MIPS MARS simulator, open the terminal and navigate to the directory where you placed the JAR file. For example, if you moved it to the / opt directory, use the following command:
cd /opt
- Execute the following command to launch the MIPS MARS simulator
java -jar Mars4_5.jar
- The MIPS MARS simulator should now launch on your Linux computer.