manuals.online logo
Brands
  1. Home
  2. •
  3. Brands
  4. •
  5. HP
  6. •
  7. Calculator
  8. •
  9. HP 35s User manual

HP 35s User manual

hp calculators
HP 35s Programming using line numbers
Programming the HP 35s
Using line numbers rather than labels
Example
hp calculators
HP 35s Programming using line numbers
hp calculators - 2 - HP 35s Programming using line numbers - Version 1.0
Programming the HP 35s
Doing a simple calculation once on the HP 35s is easy. Doing the same calculation many times, or doing a complicated
calculation, takes longer. It can be better to store all the steps needed for the calculation in a program. A program is a
set of instructions, stored all together. Once it is written, it can be tested to see if it works correctly. Then it can be used
many times, without the need to press every key of the calculation each time.
A simple program is just a set of keystrokes stored so that they can be carried out with one key. The HP 35s provides
many commands to let programs do more, for example stop and ask for input, or show an intermediate result. This
training aid concentrates on simple programming; it also shows a few of the more advanced programming commands.
Using line numbers rather than labels
The HP 35s has 26 labels for use to define programs or transfers to locations within programs. Unlike the HP 33s, the
HP 35s also includes the ability to transfer execution to specific line numbers within one of the 26 labels. This allows for
a much greater utilization of program memory without using labels excessively.
For example, the program line below illustrates how a goto instruction can now branch to a line number within a lettered
label. Step B010 tests whether the value in the X register is less than the value in the Y register. If true, step B011
transfers execution to step 018 of label B. On the HP 33s, step B011 would have required a goto instruction pointing to a
step with one of the 26 labels.
Figure 1
In the past, using line number GTO and XEQ instructions in programs was difficult if changes were made to the program
after these instructions were entered, since the program steps would have changed but the transfer instructions would
still have pointed at the old line numbers, making the program work incorrectly.
The HP 35s removes this constraint. When a program containing line number GTO or XEQ instructions has a step added
or deleted, the HP 35s dynamically changes the lines referred to by these instructions to point at the correct location.
For example, if in the program shown in figure 1 above, another step were added before step B010 such as an ABS
instruction, steps B010 would become step B011 and step B011 would become step B012. More importantly, the HP 35s
would change the new step B012’s GTO instruction to continue pointing at the same location within the program – step
B019 in this instance. This is shown in figure 2 below.
Figure 2
This dynamic renumbering allows for the use of line numbers in GTO or XEQ instructions without the drawbacks earlier,
less-advanced calculators may have had.
hp calculators
HP 35s Programming using line numbers
hp calculators - 3 - HP 35s Programming using line numbers - Version 1.0
In detail, the HP 35s handles changes in a program containing line number GTO and/or XEQ instructions as follows:
Edit performed HP 35s program dynamically changedso that
A step is inserted before a GTO or XEQ instruction All GTO and XEQ instructions are renumbered to point to
the revised (higher step number) location
A step is deleted before a GTO or XEQ instruction All GTO and XEQ instructions are renumbered to point to
the revised (lower step number) location
The step pointed to by a GTO or XEQ instruction is deleted Any GTO or XEQ instructions continue to point to the
same instruction. The instruction that now fills the
previous step number is the destination of the transfer
instruction.
The HP 35s now offers the ability to take advantage of a large program memory capacity, limited only by a user’s
imagination.
Example 1: Rewrite the program from page 14-4 of the HP 35s User’s Guide to use only one label. Useline numbers
for all transfer instructions.
Solution: The program as presented on page 14-4 looks like this:
S001 LBL S
S002 INPUT A
S003 INPUT B
S004 INPUT C
S005 INPUT D
S006 RCL D
S007 RCL C
S008 RCL B
S009 RCL A
S010 X2
S011 XEQ Q001
S012 XEQ Q001
S013 XEQ Q001
S014 SQRT
S015 RTN
Q001 LBL Q
Q002 X <> Y
Q003 X2
Q004 +
Q005 RTN
Steps S011 through S013 would need to be changed to point at the step after S015 RTN. Since we will be
removing the LBL Q instruction, steps previously labeled Q002 through Q005 will now be right after step
S015 RTN. They would now be labeled S016 through S019. The XEQ instructions found at steps S011
through S013 should now point to step S016. The revised program using only one label is shown below.
S001 LBL S
S002 INPUT A
S003 INPUT B
S004 INPUT C
S005 INPUT D
S006 RCL D
S007 RCL C
S008 RCL B
S009 RCL A
S010 X2
S011 XEQ S016
S012 XEQ S016
S013 XEQ S016
S014 SQRT
S015 RTN
S016 X <> Y
S017 X2
S018 +
S019 RTN
The program is not only one total line shorter but uses only one label. Consistent use of line number GTO
and XEQ instructions allows for better utilization of the 26 letter labels.

Other manuals for 35s

27

Other HP Calculator manuals

HP 12C User manual

HP

HP 12C User manual

HP 12C User manual

HP

HP 12C User manual

HP 17BIIPLUS User manual

HP

HP 17BIIPLUS User manual

HP 10bII User manual

HP

HP 10bII User manual

HP 20b Business Consultant User manual

HP

HP 20b Business Consultant User manual

HP HP-33E User guide

HP

HP HP-33E User guide

HP 10B Operation instructions

HP

HP 10B Operation instructions

HP 49g+ User manual

HP

HP 49g+ User manual

HP 12C Manual

HP

HP 12C Manual

HP 35s Manual

HP

HP 35s Manual

HP LaserJet Pro 300 User manual

HP

HP LaserJet Pro 300 User manual

HP 17BIIPLUS User manual

HP

HP 17BIIPLUS User manual

HP 9g User manual

HP

HP 9g User manual

HP 10bII Manual

HP

HP 10bII Manual

HP Prime Graphing Calculator User manual

HP

HP Prime Graphing Calculator User manual

HP 35s Manual

HP

HP 35s Manual

HP 25 User guide

HP

HP 25 User guide

HP 39g+ Manual

HP

HP 39g+ Manual

HP 35s User manual

HP

HP 35s User manual

HP HP-42S User manual

HP

HP HP-42S User manual

HP HP-21S User manual

HP

HP HP-21S User manual

HP HP 30S User manual

HP

HP HP 30S User manual

HP F2227AA#ABA - Printcalc 100 Calculator User manual

HP

HP F2227AA#ABA - Printcalc 100 Calculator User manual

HP 17BII - Financial Calculator User manual

HP

HP 17BII - Financial Calculator User manual

Popular Calculator manuals by other brands

Citizen SDC-384II instruction manual

Citizen

Citizen SDC-384II instruction manual

Casio DC-810 Operation manual

Casio

Casio DC-810 Operation manual

Citizen CT-600J instruction manual

Citizen

Citizen CT-600J instruction manual

Calculated Industries 4065 Construction Master Pro v3.0 user guide

Calculated Industries

Calculated Industries 4065 Construction Master Pro v3.0 user guide

Texas Instruments TI-84 Plus CE Python Getting started

Texas Instruments

Texas Instruments TI-84 Plus CE Python Getting started

Casio DJ-120D plus user guide

Casio

Casio DJ-120D plus user guide

Hama Calculator Keypad operation instruction

Hama

Hama Calculator Keypad operation instruction

Calculated Industries Construction Master 5 reference guide

Calculated Industries

Calculated Industries Construction Master 5 reference guide

Sharp PC-1425 Service manual

Sharp

Sharp PC-1425 Service manual

Casio fx-CG50 Setting-up guide

Casio

Casio fx-CG50 Setting-up guide

Texas Instruments BA Real Estate user guide

Texas Instruments

Texas Instruments BA Real Estate user guide

Texas Instruments Titanium TI-89 user manual

Texas Instruments

Texas Instruments Titanium TI-89 user manual

Sharp ELSIMATE EL-341S Operation manual

Sharp

Sharp ELSIMATE EL-341S Operation manual

Casio FX-9750GII - SOFTWARE VERSION 2-00 Quick reference guide

Casio

Casio FX-9750GII - SOFTWARE VERSION 2-00 Quick reference guide

Educational Insights See N Slove Fraction Calculator manual

Educational Insights

Educational Insights See N Slove Fraction Calculator manual

Datexx DB-413 owner's manual

Datexx

Datexx DB-413 owner's manual

Casio ALGEBRA FX 2.0 Plus user guide

Casio

Casio ALGEBRA FX 2.0 Plus user guide

Casio FX-100W user guide

Casio

Casio FX-100W user guide

manuals.online logo
manuals.online logoBrands
  • About & Mission
  • Contact us
  • Privacy Policy
  • Terms and Conditions

Copyright 2025 Manuals.Online. All Rights Reserved.