The Museum of HP Calculators

HP Forum Archive 18

[ Return to Index | Top of Index ]

HP 71B: Input LEX files without HP-IL?
Message #1 Posted by Meenzer on 25 Nov 2007, 3:24 a.m.

Searching the forum and the web the past few days for things related to the HP 71B I found a way to type in LEX files. Very promising to me as I don't have other means of I/O on my 71B.

I understand I have to type the MAKELEX BASIC source code in the 71B, get a LIF file (i.e. LEXFL1.LIF), make a hex dump (with LIFUTIL) of the desired LEX file (i.e. RPNLEX) and type this hex data into the 71B by way of the MAKELEX program.

BUT - on my XP machine it seems, I'm not able to do the hex dump part with LIFUTIL (or any other program for that matter).

I would be pleased if someone could give me a step-by-step instruction or point me to a download of hex dumps ;-)

Thank you in advance!

EDIT: Well, I managed to get a hexdump of RPNLEX on a LINUX machine with lif_utils. But where do I get the checksums required by MAKELEX??? And what is the relevant part (minus header and trailer)?

Edited: 25 Nov 2007, 9:38 a.m.

      
Re: HP 71B: Input LEX files without HP-IL?
Message #2 Posted by Egan Ford on 25 Nov 2007, 6:58 p.m.,
in response to message #1 by Meenzer

Use EMU71 to run dumplex. This will work with XP, or any OS that can run dosbox.

            
Re: HP 71B: Input LEX files without HP-IL?
Message #3 Posted by Meenzer on 26 Nov 2007, 1:20 a.m.,
in response to message #2 by Egan Ford

Fortunately I have EMU71 already on my PC but didn't think of it this way. DUMPLEX seems not to be in lexfl1, jpc01-03 or one of the other pre-installed ROMs. I only have dumplex.t71 and dumplex.b71 - how can I run them on EMU71? I'm too dump(lex) to find it in any docs...

                  
Re: HP 71B: Input LEX files without HP-IL?
Message #4 Posted by Egan Ford on 26 Nov 2007, 2:05 a.m.,
in response to message #3 by Meenzer

.t71 files are plain text, just type it in:

dumplex:

10 INPUT "Filename: ";F$ @ A=HTD(ADDR$(F$)) @ T$=PEEK$(DTH$(A+16),2)
20 IF T$#"40" AND T$#"80" THEN DISP "Wrong Filetype" @ BEEP @ GOTO 10
30 N=HTD(REV$(PEEK$(DTH$(A+32),5)))+32 @ Y=MOD(N,16)
40 PRINT F$;TAB(11);"ID#"&REV$(PEEK$(DTH$(A+37),2));TAB(18);IP((N-31)/2);"bytes"
50 PRINT @ PRINT @ PRINT "     0123456789ABCDEF ck" @ PRINT
60 FOR X=0 TO N DIV 16-1
70 A$=PEEK$(DTH$(A),16)
80 PRINT DTH$(X)[3]&": "&A$&" "&FNS$(A$) @ A=A+16
90 NEXT X
100 IF Y=0 THEN 120
110 A$=PEEK$(DTH$(A),Y) @ PRINT DTH$(X)[3]&": "&A$;TAB(23);FNS$(A$)
120 PRINT @ END
130 DEF FNS$(A$) @ S=0 @ FOR Z=1 TO LEN(A$) @ S=IP(NUM(A$[Z,Z])*Z+S) @ NEXT Z
140 FNS$=DTH$(MOD(S,256))[4] @ END DEF

makelex:

10 SFLAG -1 @ ON ERROR GOTO 30 @ DESTROY ALL 
20 PURGE DUMMY
30 ON ERROR GOTO 220
40 INPUT '# of bytes: ';N
50 CREATE TEXT DUMMY,N
60 A=HTD(ADDR$('DUMMY')) @ A1=A @ P$="----------------"
70 Q=1 @ X=0 @ INPUT '000: ',P$;A$ @ C$=A$ @ GOSUB 200
80 Q=2 @ X=1 @ GOSUB 190
90 A$=A$&C$ @ A=A+37 @ N=N*2+31 @ Q=3 @ SFLAG 5
100 FOR X=2 TO N DIV 16-1
110 GOSUB 190
120 IF FLAG(5) THEN C$=C$[6]
130 POKE DTH$(A),C$ @ A=A+16-5*FLAG(5,0) @ NEXT X @ Q=4
140 DISP DTH$(X)[3]; @ INPUT ': ',P$[1,MOD(N,16)];C$
150 GOSUB 200
160 L=LEN(C$) @ IF C$[L,L]='-' THEN C$=C$[1,L-1] @ GOTO 160
170 POKE DTH$(A),C$ @ POKE DTH$(A1),A$
180 OFF ERROR @ CFLAG -1 @ END 
190 DISP DTH$(X)[3]; @ INPUT ': ',P$;C$
200 DISP DTH$(X)[3]; @ INPUT ' ck ','--';C1$
210 S=0 @ FOR Z=1 TO LEN(C$) @ S=IP(NUM(C$[Z,Z])*Z+S) @ NEXT Z
220 IF C1$=DTH$(MOD(S,256))[4] THEN RETURN 
230 DISP 'Checksum Error' @ BEEP @ POP @ ON Q GOTO 70,80,110,140
240 DISP 'Error:'&ERRM$ @ BEEP @ GOTO 180
                        
Re: HP 71B: Input LEX files without HP-IL?
Message #5 Posted by Meenzer on 26 Nov 2007, 2:20 a.m.,
in response to message #4 by Egan Ford

Thanks, did that even before you answered. How do I access the desired lex file now from the runing dumplex program? Sorry...

                              
Re: HP 71B: Input LEX files without HP-IL?
Message #6 Posted by Egan Ford on 26 Nov 2007, 2:42 a.m.,
in response to message #5 by Meenzer

Assuming that the LEX is on a LIF image add something like:

HDRIVE2 lexfl1.lif
to your emu71.ini file. (BTW lexfl1.lif has just about every LEX file you would want).

Then, run dumplex, when prompted for filename, type:

LEXFILENAME:HDRIVE2
BTW, the following lines added to dumplex may help you if you plan to read the dump on the emu71 screen while you type in 71B:
5 DESTROY ALL
55 C=0
85 C=C+1 @ IF C=10 THEN C=0 @ INPUT C$
This extra code will prompt for input after every 10 lines (just hit ENTER).

Edited: 26 Nov 2007, 2:48 a.m.

                                    
Re: HP 71B: Input LEX files without HP-IL?
Message #7 Posted by Meenzer on 26 Nov 2007, 2:56 a.m.,
in response to message #6 by Egan Ford

I have

HDRIVE1 lexfl1.lif

and prompted by dumplex I type in

RPNLEX:HDRIVE1

and I get

ERR L10:Invalid Filespec

Did I type the code at line 10/the filename wrong?

                                          
Re: HP 71B: Input LEX files without HP-IL?
Message #8 Posted by Egan Ford on 26 Nov 2007, 3:00 a.m.,
in response to message #7 by Meenzer

It works for me. I suspect a typo. Does this also error?

COPY RPNLEX:HDRIVE1
RUN DUMPLEX
Filename: RPNLEX
                                                
Re: HP 71B: Input LEX files without HP-IL?
Message #9 Posted by Meenzer on 26 Nov 2007, 3:12 a.m.,
in response to message #8 by Egan Ford

Thanks, that last one did it. Great help!

WOW! Not only the input works - but also the lex file as such. I just type RPN in BASIC mode and the 71B works as a very nice RPN calculator. GREAT! Thanks Egan!

Edited: 26 Nov 2007, 6:33 a.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall