The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

EMU71 text file via DOSLINK
Message #1 Posted by Egan Ford on 3 July 2007, 11:58 p.m.

I am using the following BASIC program from (http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv015.cgi?read=85666):

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
And it does work (Thanks!), but I have a few problems:

  1. After receiving the last line it just hangs there. I have to hit ATTN ATTN twice, then type STOP, then type CONTROL ON to get HP-IL virtual display working again.
  2. I cannot use it again until exiting EMU71 and starting up again. It is as if there is an open file pointer at the end of the file. END, STOP, END ALL should close the file descriptor, but it appears it does not.
Can someone help me make this little program a bit more robust?

Thanks.

      
Re: EMU71 text file via DOSLINK
Message #2 Posted by J-F Garnier on 4 July 2007, 6:43 a.m.,
in response to message #1 by Egan Ford

You should use RESTORE IO, not CONTROL ON. Possibly RESET HPIL, then RESTORE IO.

When I'm importing large files (for instance large programs or large assembly source files I'm editing on PC), I add a final line like "*EOF", and check for A$="*EOF" to properly exit the loop and close the file.

J-F


[ Return to Index | Top of Index ]

Go back to the main exhibit hall