I have made changes to both programs to improve usability and fix bugs. Please download and use my versions instead of the ones listed on their respective websites.
MARS
This is the MIPS simulator we’ll be using for the first half of the course. Lab 0 will show you how to install it.
- Windows users: Mars_2254_0111-4.5.54111.exe (MD5 hash:
dab63b6b7e0f2cabd6b98b78d8662b6e
) - Mac users: go to > About This Mac and look at the “Processor” or “Chip”. If you see Intel, download the x86 version. If you see Apple, download the ARM version.
- ARM (Apple silicon, M1/M2/M3/M4) Mars_2254_0111-4.5.22540111-arm.dmg (MD5 hash:
717f01ae5f0c4ff1135f770616fb9ea7
) - x86 (Intel Core CPUs) Mars_2254_0111-4.5.22540111-x86.dmg (MD5 hash:
64b30fe4ae5ab554f7ad600f54c13377
)
- ARM (Apple silicon, M1/M2/M3/M4) Mars_2254_0111-4.5.22540111-arm.dmg (MD5 hash:
- Linux/Chromebook users: Mars_2254_0111.jar (MD5 hash:
182a4a1346569a06c61ead96f0d46543
)
Changes to MARS
Green ones are new for this version.
- Backwards-compatible changes:
- Adds the “Keypad and LED Display Simulator” tool which you will be using for your projects/labs.
- Allows you to write registers without the dollar signs
- Looks much more reasonable
- Fixes display order of ASCII strings in memory view
- Added “Clear Run IO on Assemble” setting
- Other tiny UI improvements
- Added push/pop pseudo-ops so macros are no longer needed
- Added binary number literals, like 0b100101
- Sets the default settings to something more reasonable
- You can now write
.globl
or.global
. They do the same thing. - Added a “File > Recent Files” menu!!!!! 🎉🎊
- LEDKeypad: now non-resizable, black is blacker, added ZXC keys and 8 more colors, and added options to show pixel grid and zoom in.
- Displays MARS icon in taskbar on modern OSes.
- Function-local labels: when enabled in Settings, code labels that start with an underscore are local to the function. No more coming up with globally-unique labels for every piece of control flow! 🎉🎊
- You can now indent/dedent selected code with tab/shift+tab!!!!! 🎉🎊
- The editor will tell you not to use the spacebar to indent if you try to use the spacebar to indent. You should never use the spacebar to indent. That’s what the tab key is for.
- Much improved window layout re: registers pane and the entire execute tab. No more disappearing stuff on the execute tab, giant registers pane etc.
- Totally new (but still backwards-compatible) LEDKeypad v2. LOTS more features. Very cool. Honest.
- No longer gives needless truncation warnings in
.byte
and.half
directives when the value is in the upper part of the unsigned range (e.g. 128-255 for bytes). - Tabs in the editor are displayed as 4 spaces by default instead of 8.
- On macOS, Cmd+Shift+Left/Right now select to start/end of line.
- Ctrl/Cmd+Shift+Z now does a redo (as an alternative to Ctrl/Cmd+Y).
- Ctrl+/ or Cmd+/ comments and uncomments one or more lines of code intelligently! 🎉🎊
- Display plugin enhanced mode now hides mouse cursor by default; but it can be controlled by writing to the
display_mouse_visible
variable. - New
nb
command-line option that disables stdout buffering to ease autograding of interactive programs. - You can now drag and drop files from a folder onto MARS to open them!! 🎉🎊
- Non-backwards-compatible changes:
- Removed several la pseudo-ops which confused everyone
- Changed some syscalls (time, random, some input ones) so that they return their results in
v0
instead ofa0
for some bizarre reason - Removed some weird two-operand bitwise instruction pseudo-ops (e.g.
and t0, 3
) that I have no idea why they were there - The
break
instruction now acts as a breakpoint (just like the “Bkpt” column in the Text Segment view) instead of crashing the program. Now inserting a breakpoint is as easy as typingbreak
in your code!- (and this will also hopefully teach you that
break
in MIPS is not the same asbreak
in Java) - (also updated some pseudoinstructions that used
break
to use trap instructions instead)
- (and this will also hopefully teach you that
- Trying to
lb/lh/lw
from aCONSTANT
that isn’t a memory address now gives an assembler error.
- Bugfixes:
- Assembler gives an error if it finds instructions in the data segment - no more forgetting .text
- If you have “Initialize PC to global main” enabled, but don’t have a global main, it will now give an error
- Fixed bug where single-stepping would cause execution to really slow down
- Sleep syscall can no longer softlock the program.
- Greatly improved performance/compatibility of MIDI syscalls.
- Greatly improved performance of the output pane, preventing softlocks if you output in a tight loop.
- No more pointless runtime error if you hit stop when syscall 12 is waiting for input.
- Fixed a LONG-standing bug where the messages pane could disappear if you tried to resize it!!!!! 🎉🎊
- Changed error highlighting in messages pane to hopefully make errors readable no matter if the text is black or white (I have no idea why it’s white for some people)
- MUCH better error message when you try to jump to address 0 (e.g. with
jr
) - Toolbar can no longer be dragged out of the window/put after the run speed slider.
- Labels window highlighting no longer makes it impossible to read text on some platforms.
- “Jump target word address beyond 26-bit range” error now gives correct location.
- Runtime errors in
.include
d files no longer give the right line but wrong filename! 🎉🎊 - …fixed the deadlock that happened when you tried to open/close the display while an input syscall was waiting for input! Yay!
- Storing into addresses
0xFFFF5C00-0xFFFF5CFF
with the display plugin connected no longer crashes the simulator thread necessitating a MARS restart. Oops. - Display plugin will now never report mouse coordinates outside the range [-1, 127].
- Clicking reset on the display plugin when in classic mode while an input syscall is in progress no longer hangs MARS.
- No more screen tearing in the enhanced display plugin mode.
- Display plugin enhanced mode default palette is now properly reflected in RAM after writing to
display_reset
. - Message for loading from an unaligned address now says “load address” instead of the misleading “fetch address”.
- Mac-specific bugfixes:
- Fixed a bug where using Cmd+Q could exit without asking to save changes.