Explain this simple MIPS translation Like I'm Five

pbouillon profile image Pierre Bouillon Jan 12, 2018

Hey everyone!

Lately, I started to study MIPS at my school.
Last work we had to do, was simply to translate this to MIPS:

First three lines are quiet easy, but I didn't succeed for the last.
Could someone explain me how $sp works and how to manipulate it to use the last two variables and subtract one?

Thanks a lot !