The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

Old Keys
Message #1 Posted by mountain on 5 July 2006, 2:32 p.m.

What is the function of P<>S in HP programming?

      
Re: Old Keys
Message #2 Posted by Etienne Victoria on 5 July 2006, 2:46 p.m.,
in response to message #1 by mountain

Exchange the 10 Hp-67/97 primary register content (0-9) with the 10 secondary register content (S0-S9).

Edited: 5 July 2006, 2:49 p.m.

      
Re: Old Keys
Message #3 Posted by Kiyoshi Akima on 5 July 2006, 2:53 p.m.,
in response to message #1 by mountain

On the HP-67 and HP-97, P<>S swapped the Primary registers with the Secondary registers. In effect, it swapped registers R0-R9 with R10-R19. Register numbers were only one digit (or one letter), so R10-R19 could not be addressed directly.

Or are you referring to some other machine?

            
Re: Old Keys
Message #4 Posted by mountain on 5 July 2006, 3:17 p.m.,
in response to message #3 by Kiyoshi Akima

The first 10 registers could be used for a pressure calculation, while the second 10 could support a temperature calculation. Then all the user would have to do to switch between the two is P<>S. How convenient.

                  
Re: Old Keys
Message #5 Posted by K Akima on 5 July 2006, 3:23 p.m.,
in response to message #4 by mountain

I remember using them for a Life program. Put the current generation in R0-R9 and build the next generation in R10-R19. P<>S and repeat. VERY convenient for that. Not as convenient if you needed more than 10 directly addressable registers (indirect addressing worked fine for all 20 registers).

The stat registers were buried in the second bank. P<>S allowed you to maintain two separate sets of stat data, but the non-stat data also got swapped in/out.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall