HP Forums

Full Version: Old Keys
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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

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.

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?

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.

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.