HP (Hewlett-Packard) HP 33s Calculator User Manual


 
13–4 Programming Techniques
File name 33s-English-Manual-040130-Publication(Edition 2).doc Page : 388
Printed Date : 2004/1/30 Size : 13.7 x 21.2 cm
In RPN mode,


Starts subroutine here.


Enters
A.


Enters
B.


Enters C.


Enters D.


Recalls the data.







A
2
.


1
A
2
+ B
2
.
2


3
A
2
+ B
2
+ C
2
4


5
A
2
+ B
2
+ C
2
+ D
2
6

2222
DCBA +++


Returns to main routine.


135
Nested subroutine




Adds x
2
.
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 program
label. It is not possible to branch to a specific line number during a program.