In RPN mode,

 



 

 

Starts subroutine here.

 



 

 

Enters A.

 



 

 

Enters B.

 



 

 

Enters C.

 



 

 

Enters D.

 



 

 

Recalls the data.

 



 

 

 

 



 

 

 

 



 

 

 

 



 

A2.

 



 

1

A2 + B2.

2



 

3

A2 + B2 + C2

4



 

5

A2 + B2 + C2+ D2

6



 

A2 + B2 + C2 + D2

 





 

Returns to main routine.

 



 

135

Nested subroutine

 





 

 

 



 

 

 



 

Adds x2.

246  

 

Returns to subroutine S.

Branching (GTO)

As we have seen with subroutines, it is often desirable to transfer execution to a part of the program other than the next line. This is called branching.

Unconditional branching uses the GTO (go to) instruction to branch to a specific program line (label and line number).