Yet Another MIPS Debugger
JavaScript Assembly HTML Shell
Latest commit 9b712fe Nov 17, 2016 @zodiac committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
src
.flowconfig
.gitignore
README.md
VarAccessN=2.mc
decode.js
deploy.sh
index.html
mips.asm
mips.mc
package.json
test.js

README.md

yamd

http://yamd.xuanji.li/

Yet Another MIPS Debugger

screenshot

Usage

Copy and paste your program into the text box beside the "load" button. Your program should be represented as a single line of comma-separated words, where each word is a MIPS instruction encoded as a binary string (hence 32 characters wide). Click "load". You will see 3 columns

  • Registers and Program Counter, on the left
  • High Memory, in the middle
  • Low Memory, on the right

Although there is no actual division between high and low memory in hardware, in CS241E code is loaded starting from address 0 and the stack is placed at the highest possible address. Your code should appear in low memory (annotated with a version decoded into assembly).

Click step forward to execute one instruction and step backwards to undo.

Click on a memory cell to toggle the colour (in the screenshot, I use this to identify stack frames as well as stack-allocated closures). You may drag over multiple memory cells to group them together; clicking on a grouped cell will change its colour and set the colour of all cells in the same group to the same value

MIPs dialcet

We use Waterloo MIPS as defined in https://www.student.cs.uwaterloo.ca/~cs241e/current/mipsref.pdf. This is not actually implemented in any piece of hardware; it seems the LIS (load immediate and skip) instruction does not exist in any "real" MIPS dialects.

Due to lazyness, some instructions are not supported; these are listed in https://github.com/zodiac/yamd/blob/master/src/cpu.js and will log an error to the console if encountered.