EMU71 text file via DOSLINK



#2

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.


#3

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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Cannot delete file Les Koller 4 1,059 11-07-2013, 12:17 AM
Last Post: Les Koller
  File Format: hpprgm Thomas Chrapkiewicz 6 1,411 10-30-2013, 09:32 PM
Last Post: Thomas Chrapkiewicz
  Prime 'CONTENT' section not retaining info text Geoff Quickfall 2 780 10-17-2013, 05:24 PM
Last Post: Geoff Quickfall
  HP-Prime File extension Paul D. Fox 6 1,157 10-07-2013, 01:45 AM
Last Post: cyrille de Brébisson
  Update of Emu71 to v1.05 Christoph Giesselink 0 519 09-24-2013, 04:22 PM
Last Post: Christoph Giesselink
  go71b 'lexs' or 'raws' file format? Christoph Giesselink 2 789 08-21-2013, 02:53 AM
Last Post: Christoph Giesselink
  [HP Prime CAS] No Pretty Print (Text Book) CompSystems 1 619 08-17-2013, 12:41 PM
Last Post: CompSystems
  EMU71 on a web page! hugh steers 13 2,041 07-14-2013, 12:47 PM
Last Post: Namir
  How to use XnView to create .gro4 file as in OpenFire? arturfeghali 2 745 06-27-2013, 05:57 PM
Last Post: jerome ibanes
  EMU71 to go71b--is there a way? Les Wright 12 1,985 06-25-2013, 07:08 AM
Last Post: Mike (Stgt)

Forum Jump: