HP Forums

Full Version: HP-71B and PILBox - How to transfer Program
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I finally got arround to building and connecting my PILBox.
It is a straight forward process and I am really greatfull that both PILBox and ILPer have been made available to us!

Now I am trying to find out how to do things. Printing to ILPer was straight forward. So it was easy to get a Program from the 71B to the PC. Now I would like to do the oposite. I have a listing of a program on the PC and I would like to transfer that to the 71B. How do I go about that?

And how do I transfer lex files?

Can anyone help me get started?

Cheers,
Harald
Until someone comes with a detailed how-to, you'll find here some instructions that should help you transferring your program listing to an executable program in your HP-71B.
Here is a thread where I use a USB GPIB along with the HPIB to HPIL interface to move files to my 71B. http://www.hpmuseum.org/forum/thread-3870.html
(10-12-2018 09:23 AM)Harald Wrote: [ -> ]And how do I transfer lex files?

Transferring a DOS text file to a 71B BASIC programs is possible, but it requires several steps, which I will try to detail later today.

But transferring a LEX file is very quick and easy, assuming the LEX file you have is in a 'LIF image' file, such as those found in the OLDP.

1. Connect 71B to PIL-Box
2. In ILPer, open the LIF image
3. Confirm the filename, etc. by listing the image file contents: CAT :TAPE(1), then down-arrow to step through the files
4. When you have found the file to transfer, copy it to the 71B: COPY FILENAME:TAPE(1) TO FILENAME:MAIN.
5. If you want to retain the same filename and copy the file to main RAM, you may shorten this to: COPY FILENAME:TAPE(1); the filename is retained and the default target location is main RAM.
6. If you wanted to copy the LEX file to an IRAM (e.g. in port-2), do this: COPY FILENAME:TAPE(1) TO :PORT(2)
7. You can also rename the file in the copy process: COPY OLDFILE:TAPE(1) TO NEWFILE:PORT(2).

The above process will also work to copy a text file, if the source file is already in a LIF image, but that is unlikely. Once this is done and FILENAME has been copied as a LIF text file, you would have to TRANSFORM FILENAME INTO BASIC, to have the 71B convert it. Lines with any syntax errors are converted into comments so you can correct them.
(10-12-2018 09:23 AM)Harald Wrote: [ -> ]So it was easy to get a Program from the 71B to the PC. Now I would like to do the oposite. I have a listing of a program on the PC and I would like to transfer that to the 71B. How do I go about that?
You will need EMU71.EXE, ASC71MAC.EXE and ILPER.EXE to do it, available here: Emu71 and Virtual-IL
  1. Download & install ...
  2. Type your macro or program to a plain text file, like this DEMO.TXT
    Code:
    edit
    purge
    10 for i=0 to 10
    20 disp i
    30 next i
    rename to "DEMO"
    run
  3. From the command line, convert your text file to a emu71 macro with the following command:
    Code:
    ASC71MAC.EXE <DEMO.TXT >DEMO.MAC
  4. Run EMU71.EXE and press ON button (if needed)
  5. Play Macro in Emu71
    • From the menu select: Tools -> Macros -> Play...
    • In the open dialog box, select your file (here DEMO.MAC) and press the OPEN button
    • You should see your macro being executed
  6. Save Emu71 program to a LIF file ( I am cutting some corners here)
    • Setup EMU71 HP-IL to use TCP/IP with the following parameters [host: localhost] [Out port: 60001] [In port: 60000]
    • Run ILPER.EXE
    • Setup ILPER HP-IL to use TCP/IP with the following parameters [host: localhost] [Out port: 60000] [In port: 60001]
    • On ILPER press the START BUTTON
    • Activate HP-IL link, on Emu71 type: RESTORE IO [ENDLINE]
    • Format virtual floppy, on Emu71 type: INITIALIZE :MASSMEM [ENDLINE] (a HP9114B.DAT file will be created)
    • Copy demo program to virtual floppy, on Emu71 type: COPY "DEMO" to :MASSMEM [ENDLINE]
    • List virtual floppy content, on Emu71 type: CAT :MASSMEM [ENDLINE]
et voila! Smile
(10-13-2018 12:29 AM)Sylvain Cote Wrote: [ -> ]You will need EMU71.EXE, ASC71MAC.EXE and ILPER.EXE to do it, available here...

Interesting solution Sylvain, something I never considered!

I've not explored the EMU71 macro language capability at all; can it process and convert an already complete BASIC program ('complete' here meaning with line numbers prefixed, and full 71B BASIC syntax) ?
(10-13-2018 12:44 AM)rprosperi Wrote: [ -> ]... can it process and convert an already complete BASIC program ('complete' here meaning with line numbers prefixed, and full 71B BASIC syntax) ?
The macro solution works at a lower level, the utility convert characters into equivalent keystrokes, then emu71 playback those keystrokes, nothing more.
Because it can be used anywhere (runtime, programs, etc) I use this facility to automate frequent tasks or like the demo macro, mix and match runtime commands with program entry.
(10-13-2018 01:19 AM)Sylvain Cote Wrote: [ -> ]
(10-13-2018 12:44 AM)rprosperi Wrote: [ -> ]... can it process and convert an already complete BASIC program ('complete' here meaning with line numbers prefixed, and full 71B BASIC syntax) ?
The macro solution works at a lower level, the utility convert characters into equivalent keystrokes, then emu71 playback those keystrokes, nothing more.
Because it can be used anywhere (runtime, programs, etc) I use this facility to automate frequent tasks or like the demo macro, mix and match runtime commands with program entry.

Thanks. So although intended for different goals, it can indeed be used to process an tire text file into a BASIC program as Harald is inquiring about. Very clever to see this solution hidden within the existing tools. I was dreading having to explain the alihdr utility and DOSLink import procedure. Not rocket science to be sure, but big steps when first beginning HP-IL use.

We'll wait for Harald to weigh-in on your solution.
(10-12-2018 09:23 AM)Harald Wrote: [ -> ]I have a listing of a program on the PC and I would like to transfer that to the 71B. How do I go about that?
And how do I transfer lex files?

The easiest is to get programs and LEX files from an archive LIF image. Just set the disc image file to one of the ILPer virtual drives and do a COPY as you would do with a legacy drive.

There is no immediate, built-in command to import a text file from an external device (your PC). You need to import the file line per line using ENTER statements and this is the purpose of the DOSLINK device. A short program can do it.
You can find an example of such program in this presentation (using Emu71 but the principle is the same with a HP71 and the PIL-Box - and ILPer of course):
http://www.jeffcalc.hp41.eu/hpil/files/doslink.pdf
The document also describes how to import a LEX file built on PC, but most of the time the need is to load LEX files from an existing archive as explained above.

There are other ways to import a text file, but this is my preferred solution (since I designed it :-)

J-F
Thank you for all your help on this, it is very much appreciated!
I got draged away from this by "real" work, but will try and work through all those solutions presented here as soon as possible.

Thanks again,
Harald
Reference URL's