The Museum of HP Calculators

HP Forum Archive 09

[ Return to Index | Top of Index ]

HP-71B programs?
Message #1 Posted by Todd Kessel on 22 Dec 2002, 2:08 p.m.

Is there anywhere I can download some programs for my HP-71B? user progs, etc..... The only one I found was the one on this site.

THanks

      
Re: HP-71B programs?
Message #2 Posted by Gordon Dyer on 22 Dec 2002, 3:08 p.m.,
in response to message #1 by Todd Kessel

This one for the 71B calculates PI to the number of decimal places you ask for. The result is written to a text file.
Crazy? Ok, you didn't say what sort of program you wanted!

10 ON ERROR GOSUB 'ERR'
20 DELAY 0
30 DESTROY ALL
40 L=11 @ H=10^L
50 INPUT "No. of DP? ";D0
60 T1=TIME @ T9=T1
70 B=INT(D0/L)+2 @ T0=1.66*D0
80 DIM P(B),T(B)
90 T(B-1)=H/2 @ P(B-1)=H/2
100 FOR N=1 TO T0
110 T8=INT((TIME-T9)*(T0-N+1)+TIME)
120 IF N=1 THEN 170
130 D9=INT(T8/(24*3600))
140 T8=MOD(T8,24*3600)
155 IMAGE "TERM:"ZZZZ,XDD"D ",ZZ":",ZZ":",ZZ
160 DISP USING 155;T0-N,D9,INT(T8/3600),MOD(T8/60,60),MOD(T8,60)
170 T9=TIME @ X=N+N-1 @ GOSUB 380 @ GOSUB 380
180 X=8*N @ GOSUB 430
190 X=N+N+1 @ GOSUB 430
200 GOSUB 480 @ NEXT N
210 C=0 @ FOR i=1 TO B
220 P(I)=P(I)*6+C
230 C=INT(P(I)/H)
240 P(I)=P(I)-C*H
250 NEXT I
260 'SHOW':
270 PURGE PI @ CREATE TEXT PI @ ASSIGN #1 TO PI
280 ! PRINT #1;STR$(P(B))&"."
290 FOR I=B-1 TO 1 STEP -1
300 A$="000000000000"&STR$(P(I))
310 PRINT #1;A$[LEN(A$)+1-L]
320 NEXT I
330 DELAY .5
340 OFF TIMER #1
350 T1=TIME-T1 @ T0$=TIME$ @ OFF
360 DISP "CPU TIME=";T1-60*O0
370 OFF TIMER #1 @ END
380 C=0 @ FOR I=1 TO B
390 T(I)=T(I)*X+C
400 C=INT(T(I)/H)
410 T(I)=T(I)-C*H
420 NEXT I @ RETURN
430 C=0 @ FOR I=B TO 1 STEP -1
440 Z=T(I)+C @ C=0
450 Q=INT(Z/X) @ T(I)=Q
460 C=H*(Z-Q*X)
470 NEXT I @ RETURN
480 C=0 @ FOR I=1 TO B
490 P(I)=P(I)+T(I)+C @ C=0
500 IF P(I)<H THEN 520
510 P(I)=P(I)-H @ C=1
520 NEXT I @ RETURN
530 'ERR': T0$=TIME$
540 OFF
550 DISP "ERROR:";ERRM$;" in line";ERRL;"at ";T0$
560 PAUSE
570 RETURN

            
Re: HP-71B programs?
Message #3 Posted by lowracer on 23 Dec 2002, 1:53 p.m.,
in response to message #2 by Gordon Dyer

Actually punched this whole thing in and ran it.

It seems to run fine but I don't know how to view the output file. Any hints? -mark.

                  
Re: HP-71B programs?
Message #4 Posted by Gordon Dyer on 26 Dec 2002, 9:52 p.m.,
in response to message #3 by lowracer

Here is a program to read the PI Text file.
It displays the value 11 digits at a time and then you need to press f CONT for the next 11.
When the end of file is reached you will get an error message. Sorry for the sloppy programing!

10 ASSIGN #1 TO PI
20 'READPI': READ #1;P$
30 DISP P$
40 PAUSE
50 GOTO 'READPI'

3.14159265358979323846255676732957345731783577961883

      
Re: HP-71B programs?
Message #5 Posted by Vassilis Prevelakis on 24 Dec 2002, 12:22 a.m.,
in response to message #1 by Todd Kessel

Try ftp://ftp.math.jyu.fi/pub/hpil

**vp


[ Return to Index | Top of Index ]

Go back to the main exhibit hall