HP35S vesion of existing HP41 prgm: an example



#2

Hi, all;

The listings below refer to two possible HP35S versions of a program designed to help analyzing the performance of (single stage?) transistor amplifiers. The original is a 169-step application program found in the HP41 User’s Library Solution, Electrical Engineering (pages 12 to 19). Indirect addressing and subroutines dedicated to complex operations were not used in these HP35S versions because the program could be shortened if using the original equations (instead of matrix operations) and I decided to take the advantage of using the HP35S built-in complex handling. I decided to post the listing because it might be of use as examples of writing your own HP35S versions from other calculators. Both listings are RPN-based, I actually did not try the algebraic ones.

Input and output data are as follows: (complex data can be directly input with [i] or [theta])

R#  Value
H hi
R hr
F hf
O ho
Z Zs
L Zl
A Ai
V Av
S Avs
N Zin
T Zout

The first listing uses equations and takes advantage over values already in the stack (REGX, REGY, etc). The one shown here is slightly different of the one I posted recently: some variables had their names changed.

H001  LBL H
H002 INPUT H
H003 INPUT R
H004 INPUT F
H005 INPUT O
H006 INPUT Z
H007 INPUT L
Z001 LBL Z
Z002 CF 10
Z003 -F÷(1+O×L)»A
Z004 VIEW A
Z005 RCL× L
Z006 ENTER
Z007 ENTER
Z008 ENTER
Z009 REGX×R+H»N
Z010 REGY÷(REGX+Z)»S
Z011 REGZ÷REGY»V
Z012 VIEW V
Z013 VIEW S
Z014 VIEW N
Z015 (H+Z)÷(0×H+O×Z-F×R)»T
Z016 VIEW T
The second listing does not use equations, only stack manipulation.
H001  LBL H
H002 INPUT H
H003 INPUT R
H004 INPUT F
H005 INPUT O
H006 INPUT Z
H007 INPUT L
Z001 LBL Z
Z002 RCL F
Z003 RCL O
Z004 RCL× L
Z005 1
Z006 +
Z007 ÷
Z008 +/-
Z009 STO A
Z010 VIEW A
Z011 RCL× L
Z012 ENTER
Z013 ENTER
Z014 ENTER
Z015 RCL× R
Z016 RCL+ H
Z017 STO N
Z018 ÷
Z019 STO V
Z020 R^ (roll up)
Z021 LASTx
Z022 RCL+ Z
Z023 ÷
Z024 STO S
Z025 VIEW V
Z026 VIEW S
Z027 VIEW N
Z028 RCL H
Z029 RCL+ Z
Z030 RCL O
Z031 RCL× H
Z032 LASTx
Z033 RCL× Z
Z034 +
Z035 RCL F
Z036 RCL× R
Z037 -
Z038 ÷
Z039 STO T
Z040 VIEW T
I’d suggest following the example in the original, HP41 version to test the program:

Keystrokes         LCD             comments
[XEQ] [H] H= (hi)
1100 [R/S] R= (hr)
250[E]6[+/-][R/S] F= (hf)
50[R/S] O= (ho)
25[E]6[+/-][R/S] Z= (Zs)
1000[R/S] L= (Zl)
10000[R/S] A=
-40.00 (Ai)
[R/S] V=
-400,00 (Av)
[R/S] S=
-200,00 (Avs)
[R/S] N=
1000,00 (Zin)
[R/S] T=
52,500.00 (Zout)
Although having different step numbers, both listings differ only in one byte concerning memory usage.

Please, let me know if there is anything wrong or that could be changed.

Hope it is useful.

Luiz (Brazil)

Edited: 29 Oct 2007, 6:43 a.m.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP35s Program Four Slings Lift Calculation Jean-Marc Biram (Australia) 2 1,158 12-16-2013, 07:21 PM
Last Post: Jean-Marc Biram (Australia)
  HP35s Calculator Max Rope Tension Program Jean-Marc Biram (Australia) 10 2,330 12-12-2013, 12:03 AM
Last Post: Jean-Marc Biram (Australia)
  Loading .prgm files to the Prime Thomas Chrapkiewicz 8 1,480 10-25-2013, 09:34 AM
Last Post: Eddie W. Shore
  Trouble entering a HP35s program line Arno 2 814 04-05-2013, 06:28 PM
Last Post: Arno
  HP35s scientific calculator GREG W THOMAS 4 990 03-22-2013, 06:49 AM
Last Post: Thomas Radtke
  HP35s "MEMORY CLEAR" flashes Mark Paris 1 679 08-31-2012, 07:35 PM
Last Post: Bart (UK)
  HP35S keyboard Nick R 8 1,453 08-01-2012, 01:27 PM
Last Post: Dave Shaffer (Arizona)
  go67c - cannot input "LBL a" in W/PRGM mode Federico Hanssen 7 1,169 05-07-2012, 08:15 PM
Last Post: Matt Agajanian
  HP-41CV Doesn't go into PRGM or USER mode Matt Agajanian 4 908 03-15-2012, 11:39 PM
Last Post: Matt Agajanian
  Where should I post new HP35s bugs Andres Capdevila 33 4,203 03-13-2012, 01:00 PM
Last Post: Jeff O.

Forum Jump: