© Thomas Kunz 2000
SCE 574
96
   Returning from a Jump
äWhat do we do? How do we branch back to another part of our code?
äCan hard code a finite state machine into our assembly language program
ä
ä
ä
ä
ä
ä
äBut what if we want to branch back to where we came from, and we can come from many places?
äCould store a return address in a chosen register, branch to its address at the end of the call
äThis would be a calling convention
äMore general support is available from subroutine CALL and RET operations
A: goto B
B: If X >0
goto C
Else Goto D
C: goto A
D: goto B