The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

TVM Program for the 42s
Message #1 Posted by Jeff Kearns on 23 Apr 2009, 12:39 p.m.

The HP 41C Advantage Pac has a very user-friendly TVM program that, when executed, initially displays the 5 variables in the Alpha register. Has anyone come across, or written, a 42s program based on the Advantage Pac TVM code that displays the variables as a soft menu on the 42s, and would you mind sharing.

I am new to the 42s and would really like a TVM program for it. I have a great 39 step program for the 32sii/33s/35s that prompts for the 4 (or 5 if you consider payment at beginning or end of period) unknowns that I would like to convert to the 42s, but if there is one out there already that would be better. Thanks!

Jeff Kearns

      
Re: TVM Program for the 42s
Message #2 Posted by Dan Grelinger on 23 Apr 2009, 12:57 p.m.,
in response to message #1 by Jeff Kearns

Jeff,

I feel like a dummy asking the question, but...

The 42S is code compatible with the HP-41. Couldn't you just key in the HP-41 Advantage TVM program? Or are you looking for a version that is customized to the HP-42S. I've never actually used an HP-42S.

I like this program, too. I use it a lot. It is probably the program that I use most frequently on my HP-41.

Dan

            
Re: TVM Program for the 42s
Message #3 Posted by Jeff Kearns on 23 Apr 2009, 1:30 p.m.,
in response to message #2 by Dan Grelinger

Dan, I feel even dumber answering... but how would one even get the code off the Advantage Pac in order to convert it to the 42s? As for code being compatible, that may very well be but the interface sure isn't!

Jeff

                  
Re: TVM Program for the 42s
Message #4 Posted by Richard Garner on 23 Apr 2009, 2:12 p.m.,
in response to message #3 by Jeff Kearns

If I remember correctly on the 41C you enter the program you want to copy to RAM in the ALPHA register and then XEQ the COPY command. The 41C should copy that program from the module into the calculators RAM. From that point you can print, change or whatever you want to the program.

                  
Re: TVM Program for the 42s
Message #5 Posted by Dan Grelinger on 25 Apr 2009, 10:37 a.m.,
in response to message #3 by Jeff Kearns

Quote:
Dan, I feel even dumber answering... but how would one even get the code off the Advantage Pac in order to convert it to the 42s? As for code being compatible, that may very well be but the interface sure isn't!

Jeff


There is only one way to get code into an HP-42S, that I am aware of, no matter where the code comes from. Hand entering.

If you GTO "TVM", and into PGRM mode on the -41, you can single-step the TVM program, and enter each command into the -42S. I have not tried it, but it should work.

Dan

      
Re: TVM Program for the 42s
Message #6 Posted by Jeff O. on 23 Apr 2009, 1:02 p.m.,
in response to message #1 by Jeff Kearns

Jeff,
The listing below appears in the 42S manual, page 193. Start it from the Solver menu. Will it do what you want?

01 LBL "TVM"
02 MVAR "N"
03 MVAR "I%YR"
04 MVAR "PV"
05 MVAR "PMT"
06 MVAR "FV"
07 1
08 ENTER
09 ENTER
10 RCL "I%YR"
11 %
12 12
13 /
14 STO ST T
15 FC? 00
16 CLX
17 +
18 Rolldown
19 +
20 RCL "N"
21 +/-
22 Y^X
23 1
24 X<>Y
25 -
26 LASTX
27 RCLx "FV"
28 Rolldown
29 X<>Y
30 /
31 x
32 RCLx "PMT"
33 +
34 RCL+ "FV"
35 END

Flag 00 sets "Begin" mode (if set) and "End" mode (if clear)

...

            
Re: TVM Program for the 42s
Message #7 Posted by Jeff Kearns on 23 Apr 2009, 2:22 p.m.,
in response to message #6 by Jeff O.

Thanks! That's exactly what I needed. Before I ask any more questions, I will finish reading the excellent user's manual.

Jeff K.

                  
Re: TVM Program for the 42s
Message #8 Posted by Werner on 24 Apr 2009, 2:25 a.m.,
in response to message #7 by Jeff Kearns

This is the one I use.

- It doesn't do the division by 12 for the intrest rate, but that's easily added back in if you need it. - begin/end period is not controlled by a flag, but with an extra menu option - uses the E^X-1 and LN1+X functions for extra accuracy - works for i%=0 as well

00 { 78-Byte Prgm } 01*LBL "TVM" 02 MVAR "N" 03 MVAR "i%" 04 MVAR "PV" 05 MVAR "PMT" 06 MVAR "FV" 07 MVAR "BEG" 08 RCL "i%" 09 X=0? 10 1 E-99 11 1 12 X<>Y 13 % 14 ENTER 15 LN1+X 16 RCL* "N" 17 E^X-1 18 STO+ ST Z 19 RCL* "PMT" 20 X<>Y 21 1/X 22 RCL+ "BEG" 23 * 24 X<>Y 25 RCL* "PV" 26 + 27 RCL+ "FV" 28 END

                        
Re: TVM Program for the 42s
Message #9 Posted by Jeff Kearns on 24 Apr 2009, 1:19 p.m.,
in response to message #8 by Werner

...
15 LN1+X
16 RCL* "N"
17 E^X-1
...
For the life of me (perhaps an exaggeration ;-), I cannot figure out how to enter lines 15 and 17, above. Can you please explain how to do this?

Jeff K.

                              
Re: TVM Program for the 42s
Message #10 Posted by Marcus von Cube, Germany on 24 Apr 2009, 1:37 p.m.,
in response to message #9 by Jeff Kearns

Jeff,

you'll find them in the CATALOG->FCN menu.

            
Re: TVM Program for the 42s
Message #11 Posted by Karl Schneider on 24 Apr 2009, 3:08 a.m.,
in response to message #6 by Jeff O.

Jeff K and Jeff O --

This program is so compact because it relies on numerical iteration to solve each variable, not just "I%YR". The others could be solved by direct algebraic equations, but that would make for a longer program.

A time-saving step for entering this program: Create (store any value for) each variable in RUN mode beforehand. That way, it can be selected from a menu when needed in an instruction, instead of being typed in, letter-by-letter.

A former colleague of mine liked to run this program on his HP-42S a few years ago, but was frustrated by repeatedly and laboriously re-entering the program, each time memory was lost by a battery swap (a common HP-42S problem). He later got an HP-12C -- at my suggestion, I believe.

-- KS

Edited: 25 Apr 2009, 2:04 a.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall