Microsoft KB Archive/46103

From BetaArchive Wiki

SNAP.ASM from MS-DOS Encyclopedia Code Incorrect ID Number: Q46103

3.20 3.21 3.30 3.30a 4.00 4.01 MS-DOS

Summary:

The SNAP.ASM program listing included on the MS-DOS Encyclopedia Companion Disk contains an error. However, the listing is correct in the printed source code in the “MS-DOS Encyclopedia” book.

To correct the error, change “ax” in the following line in the GetDOSVersion procedure:

mov ax, 30h ;INT 21H function 30H:

Change “ax” to “ah” to match the following line in the middle of Page 377 of the “MS-DOS Encyclopedia” book:

mov ah, 30h ;INT 21H function 30H:

After you change this line, recompile the program.

More Information:

The following is a fragment of the code from the companion disk with the incorrect line:

GetDOSVersion PROC near ; Caller: DS = seg RESIDENT_DATA ; ES = PSP ; Returns: AH = major version ; AL = minor version ASSUME ds:RESIDENT_DATA

            mov     ax,30h          ; INT 21H function 30H:
            ; ....etc....