The Museum of HP Calculators

HP Forum Archive 17

 35s Polar to rectangular programmingMessage #1 Posted by Craig Ormandy on 23 Sept 2007, 11:29 p.m. Hi AllI recently misplaced my 48g+ and have just got hold of a 35s so am very new to the programming scene.Apologies if the questions I am asking are rather mundane but being new to this I am still trying to get my head around it.I am trying to programme the 35s with a surveying missing line programme that I have which utilises the polar to rectangular function. I have managed to find the steps on this but am unsure on a few of the symbols used to input it.The part I am looking at is the following extract: Quote: Re: Program format from 33s to 35s Message #11 Posted by Paul Dale on 16 Sept 2007, 5:02 p.m., Report post, in response to message #1 by romeo_charlie For a long article on rectangular to polar conversions look at this discussion. By the end, the programs for doing the conversion were pretty good. I've submitted the "best" to the museum for inclusion in the software library. I've also included them here:```P001 LBL P P002 FS? 10 P003 GTO P011 P004* Rv P005 Rv 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* Rv R005 Rv 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``` Both routines preserve the Z and T registers and return their results in the X and Y registers. The are also independent of the settings on the calculator and honour the current trig mode. - Pauli and in particular the asterix symbol (*) in a number of the lines. Could someone maybe explain to me how this is inputed and what it means?Is it a multiply symbol or something else and what does it mean after the likes of R012? Also how is it inputed in the equation part of R006 for example?From reading through and my very basic knowledge it is steps missed out by the programme if other parts are carrying out by the prior lines? However I could be totally wrong...Also is there a difference between EQN and eqn (lines R006 and R010)? And does the text after the eqn word need to be typed in as I am sure I read somewhere that it is not needed but am also sure it would be or how is the line executed? After reading my message my questions do sound rather silly and probably very basic to the majority of you but if someone could help me out I would be most grateful.CheersCraig

 Re: 35s Polar to rectangular programmingMessage #2 Posted by Paul Dale on 23 Sept 2007, 11:48 p.m.,in response to message #1 by Craig Ormandy Quote: and in particular the asterix symbol (*) in a number of the lines. Could someone maybe explain to me how this is inputed and what it means? This means that that line is the target of a branch. You don't input it. Quote:Also how is it inputed in the equation part of R006 for example? In equations it is a multiplication sign. After the line number it is ignored. Quote:Also is there a difference between EQN and eqn (lines R006 and R010)? Nope, both are algebraic equations. Quote:And does the text after the eqn word need to be typed in as I am sure I read somewhere that it is not needed but am also sure it would be or how is the line executed? Yes it needs to be typed in. All apart from the "eqn " or "EQN ". These expressions evalulate and the result is pushed onto the RPN stack. - Pauli

 Re: 35s Polar to rectangular programmingMessage #3 Posted by Jeff O. on 24 Sept 2007, 7:52 a.m.,in response to message #2 by Paul Dale Quote: Yes it needs to be typed in. All apart from the "eqn " or "EQN ". Just to clarify (in case it is not obvious), it does not have to be typed in letter by letter. If you need LASTx in an equation, just press blue-shift ENTER, if you need the SIN function, just press SIN, etc. The REGT, REGZ etc. functions are entered by pressing the Roll-down key, selecting the stack register you want with the left-right cursor keys, then pressing ENTER.

Go back to the main exhibit hall