Skip to content

Instantly share code, notes, and snippets.

@brunsgaard
Last active August 15, 2017 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunsgaard/6528400 to your computer and use it in GitHub Desktop.
Save brunsgaard/6528400 to your computer and use it in GitHub Desktop.

Excecise 2.1 - Translate C to MIPS.

a: f = g - h
b: f = g - (h - 5)

Excecise 2.1.1

For the C like code above, what is the MIPS assembly code?

#a
sub f g h

#b
addi t0 h - 5
add f g t0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment