▼
Posts: 2,247
Threads: 200
Joined: Jun 2005
Hi All,
How can I read BASIC programs that I type with a regular text editor into the EMU71 emulator for the HP-71B?
I really aprpeciate your help.
Namir
▼
Posts: 1,830
Threads: 113
Joined: Aug 2005
I use one of two methods, both depending on a real 71B and an HP-IL ISA card in the PC. I transfer the program to the real 71B, then I write it to a virtual LIF disk under EMU71, or directly into the emulator.
AFAIK, what's lacking is a program to write LIF format files to a LIF disk image. The HP41UC program will do this for 41C data types, but that doesn't include the LIF text format. (What HP41UC does is wrap a LIF header around the given data, and then a LIF disk header around that.) I know that Tony Duell's LIF utilities ifor Linux nclude a program to put a LIF header around a LIF text file so it can be transferred over the serial port (via COPY FROM RS232C: on the 71B) but that doesn't put the disk header on the file. It shouldn't be too hard to do that for just one file. The tricky thing would be to write a LIF image create/add/modify/delete utility generalized for all the 41C/75C/71B/85/86/87/9816 and so forth file types.
I know that Vassilis gave something like that out as an assignment to his students recently. Did you get any good solutions that could be GPL'd, Vassilis? 8)
▼
Posts: 2,247
Threads: 200
Joined: Jun 2005
I am actually translating True BASIC programs to HP-71B Basic. There is some similarity between the two in the types of programs involved. So going from ASCII text to EMU71 format is good.
What seems to have potential is this process:
1. Translating the HP71B ASCII text source code into a special format that WINBATCH (Windows batch file program) can proces.
2. Run a WINBATCH file that reads the translated BASIC source code and sends the characters to EMU71.
WINBATCH's keystroke transmission to another windows app (or DOS box) has to follow special rules. For example, the + character has to be sent as a special character.
Namir
▼
Posts: 1,830
Threads: 113
Joined: Aug 2005
That sounds like a winner! You could probably can the translations you need in a Perl script or True BASIC program.
▼
Posts: 2,247
Threads: 200
Joined: Jun 2005
Howard,
I wrote a short VB.Net program to convert the HP-17B BASIC listing into keystrokes for WINBATCH to feed EMU71 in a DOS box. I tested it and it works. To make sure EMU71 accepts each character, I programmed the WINBATCH script to wait 2 seconds. As long as the WINBATCH script feeds each line to EMU71 correctly things are fine. I can always go back and edit the listing in EMU71 if I need to.
It's slow but it works!!!
I have several BASIC program that I want to prt to the HP71B and then post on my web sites. The next set s one that does best linear and multiple regression for 2 and 3 variables. The next set of programs deal with multivaribale optimization using some heavy duty algorithms.
Namir
Posts: 1,755
Threads: 112
Joined: Jan 2005
Hi,
To load a PC text file into Emu71, proceed as follows:
- Copy your text file, renaming it to "emu_in.dat", to Emu71's home directory.
- Enter this small program in Emu71 (where MYTEXT is any legal name you want
to give your PC text file when stored in the emulated 71B file system) exactly as written and RUN it:
10 DIM A$[100]
20 CREATE TEXT "MYTEXT"
30 ASSIGN #1 TO "MYTEXT"
40 ENTER :DOSLINK;A$
50 DISP A$ ! just to follow the process, you can omit it
60 PRINT #1;A$
70 GOTO 40
The program will stop (at ENTER statement) when there are no more lines
to ENTER from the PC text file.
- Now manually close the file by executing from the keyboard:
ASSIGN#1 to *
and there you are, your text file is now in the emulated HP-71B file system,
as a proper 71B TEXT file, and named "MYTEXT", say.
- If your text file is actually a well formatted, legal HP-71B program written
in syntactically correct HP-71B BASIC, with proper line numbers and all, you can now transform it from its text form
to a proper BASIC program by executing from the keyboard:
TRANSFORM MYTEXT INTO BASIC
which will convert it to a real, runnable HP-71B BASIC program.
- To do the reverse process, that is to list a program in Emu71 into a PC text
file, do the following from the keyboard:
ENDLINE CHR$(13)&CHR$(10)
PRINTER IS :DOSLINK
PLIST "MYPROGRM"
PRINTER IS * (or PRINTER IS :DISPLAY)
and you'll find a PC text file named "emu_out.dat" in Emu71's home directory,
which you can process with any Windows or MSDOS program or utility, such as
some editor or converter, or rename it and store it in some repository.
That's all. I think you'll find this approach both easy and quite fast. Notice it works for arbitrary text files, not just programs,
so you can also enter data files as well.
Best regards from V.
▼
Posts: 1,830
Threads: 113
Joined: Aug 2005
*slaps forehead* I forgot about DOSLINK!
Thanks, Valentin!
Posts: 2,247
Threads: 200
Joined: Jun 2005
Valenin,
THANK YOU SO VERY MUCH!!! You are a life saver and a PRO! Your method works and does the job much quicker than my hack using WINBATCH.
Namir
Edited: 15 Jan 2006, 3:58 a.m.
▼
Posts: 1,755
Threads: 112
Joined: Jan 2005
Hi, Namir:
Namir wrote:
"THANK YOU SO VERY MUCH!!!"
You're welcome. That's one of the main purposes of this unique MoHP Forum: to enjoy worthy discussions with other fellow HP fans, and to help each other by sharing info (and even goodies !) related to our beloved HP calcs. Matter of fact I've found your ingenious Winbatch approach highly interesting.
Best regards from V.
▼
Posts: 2,247
Threads: 200
Joined: Jun 2005
I have several numerical optimization programs to translate to the HP-71B BASIC. They are not very short, so I decided to run them on the EMU71 emulator instea of typing them on a physical HP-1B. Being able to transfer the listigs from DOSWindos text file to the EMU71's virtual RAM is a valuable time-saver.
Namir
Posts: 2,247
Threads: 200
Joined: Jun 2005
Valentin,
Do I have your permission to post these intructions on my web site (under the HP-71B eb page)? I thnk they will be very useful to mention.
Regards,
Namir
Edited: 16 Jan 2006, 8:24 a.m.
▼
Posts: 1,755
Threads: 112
Joined: Jan 2005
Hi, Namir:
Namir posted:
"Do I have your permission to post these intructions on my web site (under the HP-71B eb page)? I thnk they will be very useful to mention."
Yes, of course, permission granted. Spreading info that can be potentially useful to other HP fans will always have my full blessings.
Thanks for asking and for your generosity in making available the info at your web site.
Best regards from V.
|