Category:MIPS Assembly: Difference between revisions

Content added Content deleted
Line 39: Line 39:
<lang mips>addiu $a0,1
<lang mips>addiu $a0,1
jal PrintString
jal PrintString
nop</lang>

Occasionally you'll be able to use the scenario like the first one to your advantage; however, you can guarantee that your code is executed correctly (albeit slightly inefficiently) if you use a <code>nop</code> after every branch or function call.
<lang mips>jal foo
nop
jal bar
nop</lang>
nop</lang>