Hi Wolf,

> Am 28.05.2025 um 22:32 schrieb Wolf Bergenheim <wolf+...@bergenheim.net>:
> 
> Are you running in a VM or physical machine? What dos DR-DOS return?

It is running on an emulated Pentium system via 86box, on FreeDOS, MS-DOS and 
SvarDOS (EDR-DOS kernel).

> Soo now I wonder what is the full value of register AX? I'd expect the kernel 
> to set values to indicate a drive not ready error. So for some reason bit 7 
> of AH is set? So now I wonder why not?

The test program may be downloaded from
https://nextcloud.iww.rwth-aachen.de/index.php/s/2zzo8LrxKsA35bD

For laziness I wrote it in Turbo Pascal.

In the following there is the critical error sequence of the different kernels. 
The test program basically tries to open a file on a non-existing diskette, and 
then tries to write some bytes into it. The program aborts as soon as a DOS 
function returns an error.

On the critical error return = 0 (IGNORE), FreeDOS returns a file handle. It 
returns 5 bytes written despite it did not write anything. Therefore previously 
EDIT did not detect an error. The system eventually hangs.

MS-DOS and EDR-DOS kernels report errors via the INT21 calls despite the error 
"being ignored".

The AX given to the critical error handler explains the different behavior. On 
FreeDOS, bit 5 of AH ist set, so it allows the error to be ignored. On MS-DOS 
and EDR-DOS this bit is cleared, and IGNORE is treated as a FAIL.

So I consider this to be an incompatibility, and it should therefore be 
classified as a kernel bug.


FreeDOS critical error return = 0 (IGNORE):
creating file (INT21.3C)
critical error AX=3800H
critical error AX=3800H
critical error AX=3900H
handle: 5
writing to file (INT21.40)
critical error AX=3800H
critical error AX=3800H
bytes written: 5
-- system hangs --

FreeDOS critical error retorn = 3 (FAIL):
creating file (INT21.3C)
critical error AX=3800H
IO Error: 3


MS-DOS 3.31 critical error return = 0 (IGNORE):
creating file (INT21.3C)
critical error AX=1A00H
IO Error: 3

MS-DOS 3.31 critical error retorn = 3 (FAIL):
creating file (INT21.3C)
critical error AX=1A00H
IO Error: 3


EDR-DOS critical error return = 0 (IGNORE):
creating file (INT21.3C)
critical error AX=1800H
IO Error: 83

EDR-DOS critical error retorn = 3 (FAIL):
creating file (INT21.3C)
critical error AX=1800H
IO Error: 83



_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to