HP 9100B Operating & Programming Manual page 93

Hide thumbs Also See for 9100B:
Table of Contents

Advertisement

PROGRAMMING THE 91008
PROGRAM KEYS- CONDITIONAL BRANCHING
Four keys located in the right hand block of the keyboard, are
used for conditional branching (see also Page 59). These are:
IF
x<
y, IF x
==
y, IF
X>
Y
and
IF FLAG
(which operates
in conjunction with SET
FlAG).
These three instructions compare the numbers contain-
ed in the X and Y registers. The indicated condition
(e.g. is X equal to Y?) is tested. lf the condition is met
(YES) the program continues with the next step. lf the
condition is not met (NO) the program skips the next
two steps and contin ues.
NOTE
The 'IF' instruct1ons compare all twelve (12)
digits
and the two-dig1t exponent of the numbers in the X
and
Y
registers when testing for the condition ind
i-
cated
.
However, if the principle value of a number
consists of d1g1t nine (9) in all twelve places then
that number is considered to be equal to the next
higher power of
10.
(e.g.
9.999 999 999 99 x
10
2
=
10
3
)
.
CONDITION MET: When an 'IF' qualifier is met (YES) a 'GO
TO' condition is set up. lf the steps following the 'IF' instruction
contain an address, the program will branch to that address. lf
the steps following the 'I F' contain operations, and not an
ad-
dress, then the 'GO TO' condition is cleared and the operations
are executed.
Any one of the instructions listed below, if contained in the step
following the 'IF', constitutes the start of an address so that the
next steps must contain the remainder of the address:
SUB/
RETURN,
(+
),
(-
),
any alphameric.
83

Advertisement

Table of Contents
loading

Table of Contents