Programming in assembly language involves the following activities.
Usually, the last five activities are repeated several times.
In addition programmers may want to
Each of the above activities is supported in the Mars user interface.
You can create a new MIPS assembly language file clicking on the "New" toolbar button.
After creating a new file a new tab appears in the editor pane. It is automatically given a new name by the Mars program. This name can be changed when you save the MAL program using the "Save As ..." menu item in the "File" menu or using the "Save As" toolbar button.
You can open a MIPS assembly language file clicking on the "Open" toolbar button. Then you can use the file browser dialog to navigate to and select the file you want.
After opening a new file a new tab appears in the editor pane. It displays the selected file.
The editor supports operations supported by most editors: cut, copy, paste, undo, redo, find, and replace. To support writing code, it has an auto-indent feature.
A MAL program is assembled by clicking on the "Assemble" button.
After assembling the program, the Messages/Run I/O pane displays errors if there are any.
If assembly is successful the Messages/Run I/O pane displays a message indicating that assembly was successful. Also the "Execute" tab of the Edit/Execute pane is automatically selected. This tab has three sub-panes shown below.
A MAL program is run by clicking on the "Go" button.
Most programs prompt the user for input. When this happens the Run I/O tab of the Messages/Run I/O pane is automatically selected and the prompt appears there. The program gets input from the user when the user hits the "Enter" key.
After the user types in a response to the prompt, the program continues execution. After all input has been gathered the program completes its execution.
If you want to run the program again without reassembling it: