Post Reply 
(35S) Fibonacci Fun for the HP35s and the number phi
01-23-2015, 07:34 AM
Post: #7
RE: Fibonacci Fun for the HP35s and the number phi
(01-23-2015 07:08 AM)MarkHaysHarris777 Wrote:  I am surprised at this undocumented REGX command.

See "Accessing Stack Register Contents" in the 35s User's Guide Appendix B (B-7), it describes how to access the stack registers in EQN mode but doesn't describe that you can do it out of EQN mode.

(01-23-2015 07:08 AM)MarkHaysHarris777 Wrote:  I finally realized that RDN means rolldown! [R|] duh. As it turns out, on the HP35s, the REGX REGY REGZ REGT commands can be accessed from *any* menu followed by a rolldown [R|]. This is huge under some circumstances, because it reduces the amount of storage required on many of my subroutines.

I like to use the Mem menu as it makes sense for accessing registers.

(01-23-2015 07:08 AM)MarkHaysHarris777 Wrote:  As is usually the case, there is a trade-off. I am not yet sure if its the inclusion of an equation EQN (REGX+REGY) in the loop, or the hidden stack commands themselves, but the new Fibonacci routine (although taking less storage steps) has a significantly longer runtime. The original stored program runs in just over 4 seconds (59th Fib #) while the new stored program with equation embedded runs in just under 7 seconds... a +75% increase in runtime!

This is the trade-off for using equations. For step F010 you can enter it in two different ways: starting with a menu (such as Mem) and then pressing Roll down, or starting with EQN and then pressing Roll down as documented in the user's guide. You will end-up in both cases with "F010 REGX" but if you entered starting with EQN, the EQN indicator will be on and if you look at the program you'll see that entering REGX as an EQN adds 4 bytes (7 bytes for EQN vs. 3 bytes for direct entry from Mem).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fibonacci Fun for the HP35s and the number phi - Didier Lachieze - 01-23-2015 07:34 AM



User(s) browsing this thread: 1 Guest(s)