05-30-2018, 08:42 PM
Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
(05-30-2018 08:42 PM)Matt Agajanian Wrote: [ -> ]Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
(05-30-2018 08:42 PM)Matt Agajanian Wrote: [ -> ]Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
RCL 3
STO I
RCL(i)
RCL 4
STO I
R↓
RCL(i)
x
(05-30-2018 09:44 PM)Dieter Wrote: [ -> ](05-30-2018 08:42 PM)Matt Agajanian Wrote: [ -> ]Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
There is one obvious solution: Use the registers you want and store them into I before the indirect command.
Example: multiply the contents of the registers indexed by R3 and R4.
Code:
RCL 3
STO I
RCL(i)
RCL 4
STO I
R↓
RCL(i)
x
Don't like this? Get a 35s (two index registers). Or an HP41/42 (essentially any register can be used for indirection).
Dieter
(05-30-2018 08:42 PM)Matt Agajanian Wrote: [ -> ]Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
(05-31-2018 05:41 PM)Csaba Tizedes Wrote: [ -> ](05-30-2018 08:42 PM)Matt Agajanian Wrote: [ -> ]Hi there. Given that the HP-67 and 34C used only one I register, what are your tips & techniques for using the I register for multiple indirect registers? Thanks in advance.
Hi, interesting question, but I can not understand exactly. Can you post an example? Have you any practical application on it?
Thanks,
Csaba
(05-31-2018 06:09 PM)Matt Agajanian Wrote: [ -> ]For example, consider how matrix operations are calculated given that the elements for say, inversion or martrix multiplication are using elements in different matrix positions and thus, different register locations.
(05-31-2018 06:58 PM)Dieter Wrote: [ -> ](05-31-2018 06:09 PM)Matt Agajanian Wrote: [ -> ]For example, consider how matrix operations are calculated given that the elements for say, inversion or martrix multiplication are using elements in different matrix positions and thus, different register locations.
Yes, matrices are a truly classic application for multiple index registers. That's why I didn't start writing such programs before I had an HP-41. ;-)
Here you can easily code such things as
RCL IND 03
RCL IND 04
x
ST– IND 05
Dieter
(05-31-2018 07:20 PM)Matt Agajanian Wrote: [ -> ]I wonder how (if the HP-67 was HP’s comeback to the 52), the 67 answered the challenge of the SR-52’s multiple indirect registers and the EXC (TI’s Exchange memory) commands.
(05-31-2018 07:59 PM)Valentin Albillo Wrote: [ -> ]...as well as assisting him in passing some difficult engineering exams at the time. ...
(05-30-2018 09:44 PM)Dieter Wrote: [ -> ]Example: multiply the contents of the registers indexed by R3 and R4.
Code:
RCL 3
STO I
RCL(i)
RCL 4
STO I
R↓
RCL(i)
x
RCL 2
X<>I
RCL(i)
X<>I
R↓
X<>I
RCL(i)
x
(06-01-2018 11:21 AM)Dieter Wrote: [ -> ](05-30-2018 09:44 PM)Dieter Wrote: [ -> ]Example: multiply the contents of the registers indexed by R3 and R4.
Code:
RCL 3
STO I
RCL(i)
RCL 4
STO I
R↓
RCL(i)
x
If only two index registers are required, one of them may be "I". So only when the second index register is used it has to be temporarily get swapped with "I".
Example: mulitply the contents of the registers indexed by R2 and RI:
Code:
RCL 2
X<>I
RCL(i)
X<>I
R↓
X<>I
RCL(i)
x
This method has an advantage if in the most cases "I" is used as the index register so that the second one (here R2) that requires the above code is used much less.
Dieter
(05-31-2018 06:58 PM)Dieter Wrote: [ -> ](05-31-2018 06:09 PM)Matt Agajanian Wrote: [ -> ]For example, consider how matrix operations are calculated given that the elements for say, inversion or martrix multiplication are using elements in different matrix positions and thus, different register locations.
Yes, matrices are a truly classic application for multiple index registers. That's why I didn't start writing such programs before I had an HP-41. ;-)
Dieter
Quote:Nested loops
Message #9 Posted by Tizedes Csaba on 11 July 2003, 11:00 a.m.,
in response to message #8 by Tizedes Csaba
Hi All!
I wrote this program about four years ago.
General method:
Code:
--------
LBL 0
1
STO I
--------
LBL 1
RCL RR2
STO 2
1
STO + I
--------
LBL 2
RCL RR3
STO 3
1
STO + I
--------
.
.
.
--------
LBL n-1
RCL RRn
STO n
1
STO + I
--------
LBL n
#######################
# #
# Loop's instructions #
# #
#######################
ISG (i)
GTO I
--------
LBL decrement
DSE I
GTO jump
RTN
--------
LBL jump
ISG (i)
GTO I
GTO decrement
--------
RR2, RR3, ..., RRn contains original value of loop counters (2nd, 3rd, ..., nth registers of calculator) Before running it must be set.
An example: Calculate how many 3*4*5:
Code:
LBL 1
RCL 5
STO 2
1
STO + I
LBL 2
RCL 6
STO 3
1
STO + I
LBL 3
1
STO + 0
ISG (i)
GTO I
LBL 8
DSE I
GTO 9
RCL 0
RTN
LBL 9
ISG (i)
GTO I
GTO 8
For running:
1.003 STO 1
1.004 STO 5
1.005 STO 6
1 STO I
GSB 1
(06-03-2018 06:15 PM)Csaba Tizedes Wrote: [ -> ]Hi, I found something from the past: nested loops with one index register for HP-15C (I have not checked I am sure it can be optimize, but maybe it give some idea for somebody):