The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

HP-34C Storage Register Arithmetic & Programming
Message #1 Posted by Matt Agajanian on 7 May 2012, 10:29 p.m.

Hello all.

I'm a little rusty on my HP-34C programming so, please fill me in.

I tried to record STO x 2 and STO x .2 into program memory. STO x 2 recorded properly BUT STO x .2 only recorded the . (decimal point). I don't remember my HP-34C limitations but, was this restriction of addressing registers .0 to .9 only for storage/recall program instructions (thus, register arithmetic for address .0-.9 is not available in program memory)?

Edited: 7 May 2012, 10:31 p.m.

      
Re: HP-34C Storage Register Arithmetic & Programming
Message #2 Posted by Luiz C. Vieira (Brazil) on 7 May 2012, 10:55 p.m.,
in response to message #1 by Matt Agajanian

Yep, that is correct: register arithmetic limited to R0 to R9, does not apply to R.0 to R.9. On the other hand, it also applies to RI and R(i) (indirect addressing), so if you use STO (+,-,×,÷) (i), you can access R.0 to R.9 with values from 10 to 19 stored in RI.

Cheers.

Luiz (Brazil)

      
Re: HP-34C Storage Register Arithmetic & Programming
Message #3 Posted by M. Joury on 7 May 2012, 10:56 p.m.,
in response to message #1 by Matt Agajanian

One quote from the manual (from the Museum DVD):

Storage Register Arithmetic. Registers Ro through Rg in your HP-34C are used for the direct storage register arithmetic operations described in Solving Problems With Your Hewlett-Packard Calculator. However, all storage registers (Ro through Rg, R.o through R.g, and I) can be used to perform indirect storage register arithmetic (we'll cover this subject later, in section 7).

So, to answer your question, you can't use .0 - .9 for storage register arithmetic. Either in program mode or in manual mode.

Cheers,

-Marwan

      
Re: HP-34C Storage Register Arithmetic & Programming
Message #4 Posted by Gerson W. Barbosa on 7 May 2012, 10:57 p.m.,
in response to message #1 by Matt Agajanian

From the HP-34C Owner's Manual, page 22*:

Storage Register Arithmetic. Registers R0 through R9 in your HP-34C
are used for the direct storage register arithmetic operations described in
Solving Problems With Your Hewlett-Packard Calculator. However, all
storage registers (R0 through R9, R.0 through R.9, and I) can be used to
perform indirect storage register arithmetic (we'll cover this subject later,
in section 7).

* You can find it in the Museum's DVD #1.

            
Re: HP-34C Storage Register Arithmetic & Programming
Message #5 Posted by M. Joury on 7 May 2012, 11:03 p.m.,
in response to message #4 by Gerson W. Barbosa

HA! Pretty funny. All posting at the same time. Gerson and I even provided the same reference! Although my cut and paste did not come out as cleanly as his (edited?) version.

Edit: We both even mention the Museum DVD.

Cheers,

Marwan

Edited: 7 May 2012, 11:04 p.m.

                  
Re: HP-34C Storage Register Arithmetic & Programming
Message #6 Posted by Gerson W. Barbosa on 7 May 2012, 11:43 p.m.,
in response to message #5 by M. Joury

Quote:
Although my cut and paste did not come out as cleanly as his (edited?) version.

It did require some editing like formatting and replacing a few 'g' amd 'o' with '9' and '0', respectively. The searcheable and editable PDFs starting from the Museum DVDs version 7.00 are a blessing, despite the occasional need for minor manual adjustments. (Thanks, Dave!)

Cheers,

Gerson.

                  
Re: HP-34C Storage Register Arithmetic & Programming
Message #7 Posted by Luiz C. Vieira (Brazil) on 8 May 2012, 2:41 a.m.,
in response to message #5 by M. Joury

I was in advantage, but in the wrong circumstances: I wrote by heart. 8^(

Cheers.

Luiz (Brazil)

Edited: 8 May 2012, 2:42 a.m.

                        
Re: HP-34C Storage Register Arithmetic & Programming
Message #8 Posted by Gerson W. Barbosa on 8 May 2012, 7:48 a.m.,
in response to message #7 by Luiz C. Vieira (Brazil)

Hello Luiz,

I only quoted the manual, so did Marwan who also added some words to answer Matt's question. Your concise reply, however, is complete and need not be complemented by any quotation from the manual. But you are a teacher! :-)

Cheers,

Gerson.

                              
Re: HP-34C Storage Register Arithmetic & Programming
Message #9 Posted by M. Joury on 8 May 2012, 10:00 a.m.,
in response to message #8 by Gerson W. Barbosa

Too true! I learn far more on this forum than I ever have the opportunity to contribute. Thank you to everyone for that!

Cheers,

-Marwan

            
Re: HP-34C Storage Register Arithmetic & Programming
Message #10 Posted by Matt Agajanian on 7 May 2012, 11:30 p.m.,
in response to message #4 by Gerson W. Barbosa

Hello all.

Sorry if I'm not posting this under the correct heading. Thanks to all of you for the recap!

                  
Re: HP-34C Storage Register Arithmetic & Programming
Message #11 Posted by M. Joury on 7 May 2012, 11:53 p.m.,
in response to message #10 by Matt Agajanian

Nothing wrong with where you posted. An you are welcome.

Cheers,

-Marwan

                        
Re: HP-34C Storage Register Arithmetic & Programming
Message #12 Posted by Matt Agajanian on 7 May 2012, 11:59 p.m.,
in response to message #11 by M. Joury

Thanks!

      
Re: HP-34C Storage Register Arithmetic & Programming
Message #13 Posted by Eric Smith on 8 May 2012, 3:23 a.m.,
in response to message #1 by Matt Agajanian

The reason for the limitation is that they use a single byte for each program line, so there can only be 256 instructions, including merged codes. Offering register arithmetic for more registers would have pushed them over the limit. They used 255 of the 256 codes, with one left over.

The 41C went to two-byte instructions for many of the register operations to avoid having this limitation.

            
Re: HP-34C Storage Register Arithmetic & Programming
Message #14 Posted by Valentin Albillo on 8 May 2012, 4:18 a.m.,
in response to message #13 by Eric Smith

Quote:
The 41C went to two-byte instructions for many of the register operations to avoid having this limitation.

Same with the HP-15C, most instructions need just one byte, a few others need two (generally the most specialized or infrequently used ones).

Regards from V.

            
Re: HP-34C Storage Register Arithmetic & Programming
Message #15 Posted by Matt Agajanian on 8 May 2012, 11:04 a.m.,
in response to message #13 by Eric Smith

Excellent point. That per-instruction byte count is the item I usually overlook.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall