The Museum of HP Calculators


→P and →R conversions for the HP-35s

This program is by Paul Dale and others and is used here by permission.

This program is supplied without representation or warranty of any kind. Paul Dale and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

The HP-35s is lacking the traditional polar to rectangular conversion routines, the only such conversion being for display purposes.

These two routines attempt to rectify this situation. The both take two arguments and return two results. Neither routine changes the values in the Z and T registers, neither uses any additional storage registers and there is no dependence on any flag settings. Unfortunately, LASTx isn't set as per the traditional operations.

XEQ P001 converts to polar coordinates. XEQ R001 converts to rectangular coordinates.

Both these routines are the result of a collaborative effort by participants on the MoHPC Forum.

Listing

P001  LBL P
P002  FS? 10
P003  GTO P011
P004* R↓
P005  R↓
P006  eqn REGZ+i×REGT
P007  ARG
P008  LASTx
P009  ABS
P010  RTN
P011* CF 10
P012  XEQ P004
P013  SF 10
P014  RTN

R001  LBL R
R002  FS? 10
R003  GTO R012
R004* R↓
R005  R↓
R006  eqn [REGZ×SIN(REGT),REGZ×COS(REGT)]
R007  [1,0]
R008  x⇔y
R009  ×
R010  EQN LASTx×[0,1]
R011  RTN
R012* CF 10
R013  XEQ R004
R014  SF 10
R015  RTN

Go back to the software library
Go back to the main exhibit hall