delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/2000/03/24/15:08:04

From: "Matthias Paul" <PAUL-MA AT reze-1 DOT rz DOT rwth-aachen DOT de>
Organization: Rechenzentrum RWTH Aachen
To: opendos AT delorie DOT com
Date: Fri, 24 Mar 2000 18:43:16 +0100
Subject: INT21h/6602h
X-mailer: Pegasus Mail v3.22
Message-ID: <57680FB2A9E@reze-1.rz.rwth-aachen.de>
Reply-To: opendos AT delorie DOT com

On Wed, 22 Mar 2000 I wrote ...

>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 made two mistakes myself, here. ;-) It should have read:

"(a modification to disable zero values with INT21h/AH=6602h 
(MS_X_SETCP) was not applied correctly)"

>[...]

For those who wonder why I was also pre-setting DX. This kind of 
"overspecing" is just my kind of defensive programming I use
in my (non-resident) software to help making it little bit more 
stable even when run in unknown and hostile environments. In this
example, some of the registers are pre-set with default values in the
case a buggy or unknown DOS version would not properly maintain the
error flag. In my COUNTRY and CHCC I *was* actually presetting BX with
zero to preempt possible bugs in the system software, but then came
DR-DOS 7.02 and just failed with BX=zero, bang. So I had to change 
this again... ;-)

   ...
   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      ; preset result
   stc           ; assume error
   int 21h       ; DOS_INT
    jc ...    
   ...
   
Bye,

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019