A Programmed GTO Instruction

The GTO label instruction (press label line number) transfers the execution of a running program to the specified program line. The program continues running from the new location, and never automatically returns to its point of origination, so GTO is not used for subroutines.

For example, consider the "Curve Fitting" program in chapter 16. The   instruction branches execution from any one of three independent initializing routines to LBL Z, the routine that is the common entry point into the heart of the program:

  

 

Can start here.

.

 

 

 

.

 

 

.

 

 

  

1

Branches to Z001.

  

 

Can start here.

.

 

 

 

.

 

 

.

 

 

  

1

Branches to Z001.

  

 

Can start here.

.

 

 

 

.

 

 

.

 

 

  

1

Branches to Z001.

  

1

Branch to here.

 

.

.

.

Using GTO from the Keyboard

You can use to move the program pointer to a specified label line number without starting program execution.

Programming Techniques 14-5

Page 215
Image 215
HP 35s Scientific manual Programmed GTO Instruction, Using GTO from the Keyboard