Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIPS simulator does not support subtraction command #382

4 tasks done
JackMorganNZ opened this issue Aug 31, 2016 · 0 comments
4 tasks done

MIPS simulator does not support subtraction command #382

JackMorganNZ opened this issue Aug 31, 2016 · 0 comments


Copy link


The text for the MIPS assembly and simulator interactives recommend trying to do subtraction of two numbers for advanced students. However when using the sub (also tried subu) command, the result when running the commands in the MIPS simulator is:

Unsupported R-type instruction

The simulator interactive should either handle the sub command, or the text should be altered.

To replicate this issue:

  1. Go to MIPS simulator.
  2. Enter the following text and click 'Simulate Execution':
00400000: <main>    ; <input:1> main:
00400000: 20080019  ; <input:5> li $t0, 25 # You can change the 10
00400004: 20090014  ; <input:6> li $t1, 20 # You can change the 20
00400008: 01092022  ; <input:10> sub $a0, $t0, $t1
0040000c: 20020001  ; <input:14> li $v0, 1
00400010: 0000000c  ; <input:18> syscall
00400014: 20020000  ; <input:21> li $v0, 0
00400018: 03e00008  ; <input:22> jr $ra

It may be worth contacting the original author of the interactive for help if needed.


Put an x in the boxes that apply. You can also fill these out after creating the issue.

  • I have linked any relevant existing issues/suggestions in the description above (include #??? in your description to reference an issue, where ??? is the issue number)
  • I have applied relevant labels

If this is a code related issue, please include the following in your description:

  • Steps to reproduce the behavior
  • The behavior you expect to see, and the actual behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

1 participant