The Museum of HP Calculators

HP Forum Archive 17

 HP35S vesion of existing HP41 prgm: an exampleMessage #1 Posted by Vieira, Luiz C. (Brazil) on 29 Oct 2007, 6:41 a.m. 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.

Go back to the main exhibit hall