main( ) { ... A( ); // Execute instructions in A and continue ... } A( ) { .... } |
We can implement the subroutine call as follows:
main: .... .... b A Ret: ... ... A: .... .... .... b Ret |
main( ) { ... A( ); // Execute instructions in A and continue ... A( ); // Execute instructions in A and continue } A( ) { .... } |
The implementation would be as follows:
main: .... .... b A Ret1: ... ... b A Ret2: ... ... ... A: .... .... .... b Ret1 |
Problem:
|
|
Analogy: Hansel and Gretel
|