.
Programmable calculatorsThe HIR Instruction
.

Author: Tito de Quadros Júnior (Curitiba city, Brasil)

This command is highly sophisticated; some programmers may experience difficulties understanding it well.

The Hierarchy’s Law

To access the hierarchy registers the programmer uses the HIR command, code 82.

This command may be inserted in a program as follows:

STO
82
BST
DEL

There is a two digit number, XY, that follows the 82 code. The X number is related to the operation in the hierarchy registers, the Y number is the register affected by the operation. Where:

X =  0 is STO
1 is RCL
3 is SUM
4 is PRD
5 is INV SUM
6 and 9 are INV PRD
Y =  1 Register 1
2 Register 2
3 Register 3
4 Register 4
...
8 Register 8

This XY number may be entered in the same manner:

STO
XY
BST
DEL

This example demonstrates this HIR command. In Learn mode, at position 000 press:

LBL
A
1
×
(
2
-
3
×
(
4
-
5
×
(
6
-
7
×
(
8
-
9
INV SBR

LBL
B
A
HIR
13
=
R/S

Press B and this sequence will be executed:

1 × (2 - 3 × (4 - 5 × (6 - 7 × (8 - 3 = -445

HIR 13 calls the contents (the number 3) of the 3 rd register and put it on the display register (i.e. changing the 9 on the LBL A sequence).

For another example, on line 031 press:

LBL
D
A
HIR
43
=
R/S

Press D and this sequence will be executed:

1 × (2 - 27 × (4 - 5 × (6 - 7 × (8 - 9 = 1649

HIR 43 multiplies the contents (3) of the 3rd hierarchic register by the contents of the display register (the number 9).

Using these techniques in your programs, is possible to expand the uses of the TI 58C/59 handheld calculators. This instruction may not work correctly on the TI-59C emulator. Use it at your own risk.

This article is a result of my own programming work and annotations on various types of hand held calculators and is intended only to help the developing of programming, any similarity with articles or programming languages is only coincidence.—© 2003, Tito de Quadros Júnior


*Though TI considered HIR codes invalid, users went on to discover some anyway. See for instance pp. 8-9 in V9N1 and pp. 24-25 in V11N1 of the TI PPC Notes. See also table IV in U.S. Patent 4,153,937 for a summary of the HIR instructions. Thanks to Palmer Hanson for these references.