Figure 4-5. Operations Used For Programmed Decisions - HP -65 Owner's Handbook Manual

Hide thumbs Also See for HP-65:
Table of Contents

Advertisement

. Decrement and Skip on Zero. Subtracts 1 from an
integer in register R, then skips two program memory
locations if Ry contains zero. = The decrement opera-
tion is suppressed outside the limits: 1<|r| <10 =
Useful for looping.
E21.E=1 . E=1 Bl Relational tests of x and y. Each
test compares the values in the X and Y registers, and
skips two memory locations if the test condition is not
met. The tests use R, and alter the contents.
No Operation. Useful as a filler in tests = [f]
in W/PRGM mode clears the entire memory to [8l
(merged code 35 01).
,[SF2] . Set Flag 1, Set Flag 2. = [
sets flag 1
on while [f| [SF1] sets it off. = [f] [SF2] performs similarly,
but using flag 2. Initially turned off when the calculator
is turned on, flags retain their settings until changed by
these operations.
,[TF2]. Test Flag 1, Test Flag 2. = [f]
tests flag
1, skipping 2 memory locations if flag 1 is off, while [&
skips if flag 1 is on. = [l
performs similarly,
but uses flag 2.
Figure 4-5. Operations Used in Programmed Decisions
Relational Test Operations
The four relationaltests allow you to program a decision based
on the relationship of x to y. This can be valuable in iterative
calculations or in simpler applications such as the following.
Sample Case: Relational Test. Create a function B to calculate
the arc sine of an input value x (x must be within the limits of
—1 and +-1). If the resulting angle in decimal degrees is nega-
tive or zero, add 360 degrees to it.

Advertisement

Table of Contents
loading

Table of Contents