Mail Archives: opendos/2000/03/22/14:37:49
Hi all,
I have decided to post some info regarding a bug with INT21h/AX=6601h,
I encountered with the DR-DOS 7.02 IBMDOS.COM file in 1998. To be
exact, the bug was introduced with the 1998-04-15 IBMDOS.COM file
(a modification to disable non-zero values with INT21h/AH=6600h was
not applied correctly) and unfortunately, the problem is still not
corrected in current official issues of DR-DOS 7.03.
However, I have had an opportunity to fix it for one of Caldera s
internal kernels last year, so they should have all they need to
put it into the offical kernel...
INT21h/6601h will erroneously take a BX value of zero into account
when it should be ignored. As soon as BX is zero, the function
will fail. This was seen using DEBUG (because it presets the
registers with zero), as well as my COUNTRY & CHCC tools, but it
can also randomly affect almost any application using this function.
At meanwhile the workaround is to always preset BX with FFFFh when
calling INT21h/6601h. NB. While any non-zero value for BX is
acceptable to work around this problem, I suggest to use FFFFh
whereever possible (i.e. in non-resident software) because this will
still allow to use BX for future API enhancements.
...
mov ax,6601h ; MS_X_GETCP
mov bx,0FFFFh ; (work around a bug in DR-DOS 7.02/7.03 IBMDOS.COM)
mov dx,0 ;
stc ; assume error
int 21h ; DOS_INT
jc ...
...
In resident software, however, it might sometimes be more convenient
to preset BX with the value of AX, e.g.
...
mov ax,6601h ; MS_X_GETCP
mov bx,ax ;
mov dx,0 ;
stc ; assume error
int 21h ; DOS_INT
jc ...
...
Since the faulty kernel is out for so long now, it seems we ll
also have to change all the applications to work around it. :-(
So please scan all your sources for calls to this function and
apply this easy patch.
Thanks,
Matthias
-------------------------------------------------------------------
Matthias Paul, Ubierstrasse 28, D-50321 Bruehl, Germany
eMail: <Matthias DOT Paul AT post DOT rwth-aachen DOT de>
Web : http://www.rhrz.uni-bonn.de/~uzs180/mpdokeng.html
-------------------------------------------------------------------
- Raw text -