Post Reply 
Emu71 doslink hangs
05-18-2024, 04:15 PM
Post: #1
Emu71 doslink hangs
Hi, Jean-François and other HP-71B gurus,

I decided to give a try to Emu71 into Magic Dosbox on my Android Z Samsung Z fold 3 phone.

I tried to use doslink to import basic text files, following Valentin's clear instructions in this thread:

https://archived.hpcalc.org/museumforum/...85687.html

I renamed my text file emu_in.dat, placed it in Emu71 root directly, entered the small program as it is to read it...

Everythings goes fine, the read lines are displayed correctly, until the end of the file is reached. Instead of stopping at line 30 (the ENTER statement) because there is nothing more to be read, the programs gets stuck in this line. It does not loop forever, a PRINT statement added just after line 30 is never executed. It seems it hands in this line 30, trying to read forever. You can stop it by pressing ESC twice, but then things get corrupted. When I try to manually close the file as advertised with ASSIGN#1 to * and TRANSFORM MYTEXT INTO BASIC, I get various results, ranging from system error to corrupted display or even entering the debugger!

I thought it might be because the Android and the Windows text editors I used might not save files in pure original ASCII but in RTF 8. Those standard as supposed to be compatible, though... I tried to make sure line separators were CR + LF, as advised in the Emu71 doc, but no change. I thought it could be a Magic Dosbox bug, so I tried with another Dos Android emulator (Dosbox) with same results.

Any idea? Text files wrong EOF? Emu71 bug ? Dosbox incompatibility ?

Many thanks in advance and best regards,

Vincent
Find all posts by this user
Quote this message in a reply
05-18-2024, 04:33 PM
Post: #2
RE: Emu71 doslink hangs
(05-18-2024 04:15 PM)Vincent Weber Wrote:  I tried to use doslink to import basic text files, following Valentin's clear instructions in this thread:

https://archived.hpcalc.org/museumforum/...85687.html

I renamed my text file emu_in.dat, placed it in Emu71 root directly, entered the small program as it is to read it...

Everythings goes fine, the read lines are displayed correctly, until the end of the file is reached. Instead of stopping at line 30 (the ENTER statement) because there is nothing more to be read, the programs gets stuck in this line. It does not loop forever, a PRINT statement added just after line 30 is never executed. It seems it hands in this line 30, trying to read forever.

No bug here, it's the normal HP-71B HP-IL behaviour when trying to input data from an interface (remember: DOSLINK is an interface).
Since an interface can be much slower than the 71B, the 71B waits for data as long as you ask it to do enter something.
Pressing ESC twice aborts the endless ENTER, but can leave the HP-IL in unknown state so a RESTORE IO is useful.
Or better, as I recommend in this document, add a *EOF" line in your text file and explicitly check for it in the loop to end it.

J-F
(happy to be back in the forum)
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2024, 04:37 PM
Post: #3
RE: Emu71 doslink hangs
(05-18-2024 04:33 PM)J-F Garnier Wrote:  
(05-18-2024 04:15 PM)Vincent Weber Wrote:  I tried to use doslink to import basic text files, following Valentin's clear instructions in this thread:

https://archived.hpcalc.org/museumforum/...85687.html

I renamed my text file emu_in.dat, placed it in Emu71 root directly, entered the small program as it is to read it...

Everythings goes fine, the read lines are displayed correctly, until the end of the file is reached. Instead of stopping at line 30 (the ENTER statement) because there is nothing more to be read, the programs gets stuck in this line. It does not loop forever, a PRINT statement added just after line 30 is never executed. It seems it hands in this line 30, trying to read forever.

No bug here, it's the normal HP-71B HP-IL behaviour when trying to input data from an interface (remember: DOSLINK is an interface).
Since an interface can be much slower than the 71B, the 71B waits for data as long as you ask it to do enter something.
Pressing ESC twice aborts the endless ENTER, but can leave the HP-IL in unknown state so a RESTORE IO is useful.
Or better, as I recommend in this document, add a *EOF" line in your text file and explicitly check for it in the loop to end it.

J-F
(happy to be back in the forum)
Many thanks JF for your fast and very enlightening answer, but just for me to understand, Valentin is the thread I quoted said that the program will stop at line 30 when nothing more to read, and some people actually tried this program and sait it was working as advertised... Why is that so, then?

Many thanks and cheers,

Vincent
Find all posts by this user
Quote this message in a reply
05-18-2024, 04:49 PM (This post was last modified: 05-18-2024 04:52 PM by J-F Garnier.)
Post: #4
RE: Emu71 doslink hangs
Valentin wrote "The program will stop (at ENTER statement) when there are no more lines to ENTER from the PC text file."
Here "stop" was probably meaning "hang", with the need to press ON twice.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2024, 06:13 PM
Post: #5
RE: Emu71 doslink hangs
(05-18-2024 04:49 PM)J-F Garnier Wrote:  Valentin wrote "The program will stop (at ENTER statement) when there are no more lines to ENTER from the PC text file."
Here "stop" was probably meaning "hang", with the need to press ON twice.

J-F
Even with RESTORE IO, I get erratic bahaviour: straight to the debugger, or ASSIGN #1 to * messes up the screen... Something is definitely wrong!
Find all posts by this user
Quote this message in a reply
05-18-2024, 08:50 PM
Post: #6
RE: Emu71 doslink hangs
(05-18-2024 04:15 PM)Vincent Weber Wrote:  I decided to give a try to Emu71 into Magic Dosbox on my Android Z Samsung Z fold 3 phone.
...
When I try to manually close the file as advertised with ASSIGN#1 to * and TRANSFORM MYTEXT INTO BASIC, I get various results, ranging from system error to corrupted display or even entering the debugger!

Does Emu71 otherwise work correctly in "Magic Dosbox" ?
Correct math results? Correct CAT outputs, MEM value ?
There are indeed two levels of emulation: Emu71 (assumed to be correct, tested for years now) and "Magic Dosbox" (I know nothing about it)

Also, if possible, please post your test text file so we can check the upload process.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2024, 09:28 PM
Post: #7
RE: Emu71 doslink hangs
(05-18-2024 08:50 PM)J-F Garnier Wrote:  
(05-18-2024 04:15 PM)Vincent Weber Wrote:  I decided to give a try to Emu71 into Magic Dosbox on my Android Z Samsung Z fold 3 phone.
...
When I try to manually close the file as advertised with ASSIGN#1 to * and TRANSFORM MYTEXT INTO BASIC, I get various results, ranging from system error to corrupted display or even entering the debugger!

Does Emu71 otherwise work correctly in "Magic Dosbox" ?
Correct math results? Correct CAT outputs, MEM value ?
There are indeed two levels of emulation: Emu71 (assumed to be correct, tested for years now) and "Magic Dosbox" (I know nothing about it)

Also, if possible, please post your test text file so we can check the upload process.

J-F
Thanks JF.

Yes, correct mem, cat, and math results. Only this doslink stuff failing. Same with another dosbox (LDosbox).

Here is the emu_in.dat I'm using (I just changed the extension to .zip).
Btw, any possibility to paste text basic programs from the clipboard?

Thanks and cheers


Attached File(s)
.zip  emu_in.zip (Size: 375 bytes / Downloads: 3)
Find all posts by this user
Quote this message in a reply
05-19-2024, 07:56 AM (This post was last modified: 05-19-2024 08:00 AM by J-F Garnier.)
Post: #8
RE: Emu71 doslink hangs
I have a couple of suggestions:

1. Try to do DESTROY ALL before running the loader program.
Is there still a crash ?

2. Remove the 7th empty line of your emu_in.dat.
This empty line prevents the TRANSFORM to complete. With it I got these messages:
TFM WRN L7:Transform Failed
ERR:Syntax
and the file is not transformed (still a TEXT file), but no crash.


(05-18-2024 09:28 PM)Vincent Weber Wrote:  Btw, any possibility to paste text basic programs from the clipboard?

It is possible in Emu71 natively running on a 32-bit system, but doesn't work with the standard Dosbox.
I was told it works again with a patched version of Dosbox but didn't try.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-19-2024, 08:04 AM
Post: #9
RE: Emu71 doslink hangs
I did the destroy all and did 2 tries.
First try, I didn't do the RESTORE IO after interrupting the program. Doing the ASSIGN #1 TO * was fine, then doing the TRANSFORM messed up the screen.
Second try (after a quit and a new destroy all), I did the RESTORE IO. The assign statement led to system error, and then it would write system error no matter what I type.

I know about the empty line, I thought it would be harmless, I let it because otherwise I had the feeling that the last line would not be imported (it was not displayed).
Find all posts by this user
Quote this message in a reply
05-19-2024, 08:22 AM
Post: #10
RE: Emu71 doslink hangs
The reason I suggested to do a DESTROY ALL in that I tested the load process in a test folder where I'm doing all kind of potentially risky tests.
With the current state on my test Emu71, the loader program crashes at the DIM A$ statement. A DESTROY ALL solved it.
It may come from past tests I did causing a abnormal state of Emu71.

So I may advise you to save all your programs on a virtual disc, then re-start with a fresh Emu71 by causing a MEMORY LOST: just delete the SYS71.DAT file.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-19-2024, 08:38 AM
Post: #11
RE: Emu71 doslink hangs
I did exactly that.
I did not do the restore IO, I wanted to first try without it, as Valentin did not mention it.
It did fine until the TRANSFORM statement, which gave me "system error" again.
I'm getting discouraged...
Find all posts by this user
Quote this message in a reply
05-19-2024, 09:50 AM
Post: #12
RE: Emu71 doslink hangs
(05-19-2024 08:38 AM)Vincent Weber Wrote:  I did exactly that.
I did not do the restore IO, I wanted to first try without it, as Valentin did not mention it.
It did fine until the TRANSFORM statement, which gave me "system error" again.
I'm getting discouraged...

Really strange. I can only think of a problem in Magic Dosbox emulation that affects Emu71's operations.
Can you try this simple test:
RADIANS @ SIN(5)
It should be -.958924274663 of course.

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
05-19-2024, 10:54 AM
Post: #13
RE: Emu71 doslink hangs
(05-19-2024 09:50 AM)J-F Garnier Wrote:  
(05-19-2024 08:38 AM)Vincent Weber Wrote:  I did exactly that.
I did not do the restore IO, I wanted to first try without it, as Valentin did not mention it.
It did fine until the TRANSFORM statement, which gave me "system error" again.
I'm getting discouraged...

Really strange. I can only think of a problem in Magic Dosbox emulation that affects Emu71's operations.
Can you try this simple test:
RADIANS @ SIN(5)
It should be -.958924274663 of course.

J-F
Yes, this simple test, and many others, works perfectly fine.
The moment I used HPIL, problems arise...
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)