Skip to content

Commit 88c2152

Browse files
committed
dir.c: allow 21.7303 to return NC, ax=0 to mean supported (EDR-DOS)
EDR-DOS returns NC, AX = 0000h from 21.7303. This was incorrectly detected as "not supported" here. CF unchanged and AL = 00h is the typical error return, albeit CF unchanged AX unchanged has also been observed (on dosemu2 + lDOS + SRDISK). Reference on the correct "unsupported" return: https://sourceforge.net/p/freedos/mailman/message/59128382/ Incorrect interrupt list entry: https://fd.lod.bz/rbil/interrup/dos_kernel/217303.html
1 parent c5211dd commit 88c2152

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/dir.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,10 @@ static int dir_print_free(unsigned long dirs)
772772

773773
/* Note: RBIL carry clear and al==0 also means unimplemented
774774
alternately carry set and ax==undefined (usually unchanged) for unimplemented
775-
*/
776-
if(!( r.r_flags & 1 ) && ( r.r_ax & 0xFF) ) {
775+
ecm: RBIL is wrong, CF unchanged al=0 is the typical error return.
776+
EDR-DOS returns NC ax=0 so checking for al!=0 here was wrong.
777+
*/
778+
if(!( r.r_flags & 1 ) && ( r.r_ax != 0x7300 ) ) {
777779
dprintf(("[DIR: Using FAT32 info]\n"));
778780
clustersize = FAT32_Free_Space.sectors_per_cluster
779781
* FAT32_Free_Space.bytes_per_sector;

0 commit comments

Comments
 (0)