The Museum of HP Calculators

HP Forum Archive 15

[ Return to Index | Top of Index ]

Question about using the EMU71
Message #1 Posted by Namir on 14 Jan 2006, 11:26 a.m.

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

      
Re: Question about using the EMU71
Message #2 Posted by Howard Owen on 14 Jan 2006, 12:57 p.m.,
in response to message #1 by Namir

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)

            
Re: Question about using the EMU71
Message #3 Posted by Namir on 14 Jan 2006, 4:22 p.m.,
in response to message #2 by Howard Owen

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

                  
Re: Question about using the EMU71
Message #4 Posted by Howard Owen on 14 Jan 2006, 7:45 p.m.,
in response to message #3 by Namir

That sounds like a winner! You could probably can the translations you need in a Perl script or True BASIC program.

                        
Re: Question about using the EMU71
Message #5 Posted by Namir on 14 Jan 2006, 9:16 p.m.,
in response to message #4 by Howard Owen

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

      
Re: Question about using the EMU71
Message #6 Posted by Valentin Albillo on 14 Jan 2006, 10:51 p.m.,
in response to message #1 by Namir

Hi,

To load a PC text file into Emu71, proceed as follows:

  1. Copy your text file, renaming it to "emu_in.dat", to Emu71's home directory.

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

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

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

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

            
Re: Question about using the EMU71
Message #7 Posted by Howard Owen on 15 Jan 2006, 1:00 a.m.,
in response to message #6 by Valentin Albillo

*slaps forehead* I forgot about DOSLINK!

Thanks, Valentin!

            
Re: Question about using the EMU71
Message #8 Posted by Namir on 15 Jan 2006, 3:57 a.m.,
in response to message #6 by Valentin Albillo

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.

                  
Re: Question about using the EMU71
Message #9 Posted by Valentin Albillo on 15 Jan 2006, 6:43 p.m.,
in response to message #8 by Namir

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.

                        
Re: Question about using the EMU71
Message #10 Posted by Namir on 15 Jan 2006, 6:57 p.m.,
in response to message #9 by Valentin Albillo

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

            
Permission Requested
Message #11 Posted by Namir on 16 Jan 2006, 8:23 a.m.,
in response to message #6 by Valentin Albillo

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.

                  
Re: Permission Requested
Message #12 Posted by Valentin Albillo on 16 Jan 2006, 9:33 a.m.,
in response to message #11 by Namir

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.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall