HP 71B: Input LEX files without HP-IL?



#10

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.


#11

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


#12

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...


#13

.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

#14

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


#15

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.


#16

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?


#17

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

COPY RPNLEX:HDRIVE1
RUN DUMPLEX
Filename: RPNLEX

#18

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.


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to copy files from 9114B to hard drive via PIL-box? Joe Horn 23 3,957 12-14-2013, 11:57 PM
Last Post: Geoff Quickfall
  How to update PRIME Firmware using Files on PC Harold A Climer 2 715 12-04-2013, 12:05 PM
Last Post: Erwin Ried
  [HP-41][HP-71B][HP-75C/D][HP-IL] Found a mother-lode of programs on ftp.stak.tk rdj 2 647 11-26-2013, 05:31 PM
Last Post: rdj
  INPUT for HP Prime Eddie W. Shore 3 574 11-17-2013, 04:46 PM
Last Post: Michael de Estrada
  HP Prime Tutorial #4 is up (CASE/CHOOSE/INPUT) Eddie W. Shore 1 505 11-15-2013, 07:32 AM
Last Post: Davi Ribeiro de Oliveira
  HP Prime Programming Tutorial #3: WHILE, INPUT, KILL, REPEAT, GETKEY Eddie W. Shore 5 881 11-07-2013, 12:25 AM
Last Post: Han
  Loading .prgm files to the Prime Thomas Chrapkiewicz 8 1,018 10-25-2013, 09:34 AM
Last Post: Eddie W. Shore
  Proper location for files on the PC for Connectivity Kit ,etc. Harold A Climer 8 1,096 10-23-2013, 02:43 AM
Last Post: Marcus von Cube, Germany
  How to move lexfiles from PC to 71 w/o HP-IL? Joe Horn 9 1,172 10-18-2013, 03:50 PM
Last Post: Christoph Giesselink
  minor visual bug in INPUT Han 0 340 10-03-2013, 01:13 PM
Last Post: Han

Forum Jump: