HP Forums
TVM Program for the 42s - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: TVM Program for the 42s (/thread-150182.html)



TVM Program for the 42s - Jeff Kearns - 04-23-2009

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 - Dan Grelinger - 04-23-2009

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 - Jeff O. - 04-23-2009

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 - Jeff Kearns - 04-23-2009

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 - Richard Garner - 04-23-2009

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 - Jeff Kearns - 04-23-2009

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 - Werner - 04-24-2009

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 - Karl Schneider - 04-24-2009

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.


Re: TVM Program for the 42s - Jeff Kearns - 04-24-2009

...
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 - Marcus von Cube, Germany - 04-24-2009

Jeff,

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


Re: TVM Program for the 42s - Dan Grelinger - 04-25-2009

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