Int 21 Fn 30 - Dos 2+ - Get Dos Version [D]

AH = 30h
---DOS 5+ ---
AL = what to return in BH
00h OEM number (as for DOS 2.0-4.0x)
01h version flag

Return: AL = major version number (00h if DOS 1.x)
AH = minor version number
BL:CX = 24-bit user serial number (most versions do not use this)
---if DOS <5 or AL=00h---
BH = MS-DOS OEM number (see #1082)
---if DOS 5+ and AL=01h---
BH = version flag
bit 3: DOS is in ROM
other: reserved (0)

Notes: the OS/2 v1.x Compatibility Box returns major version 0Ah (10)
the OS/2 v2.x Compatibility Box returns major version 14h (20)
OS/2 Warp 3.0 Virtual DOS Machines report v20.30; Warp 4 VDMs report
v20.40.
the WindowsNT DOS box returns version 5.00, subject to SETVER
DOS 4.01 and 4.02 identify themselves as version 4.00; use
INT 21/AH=87h to distinguish between the original European MS-DOS 4.0
and the later PC-DOS 4.0x and MS-DOS 4.0x
IBM DOS 6.1 reports its version as 6.00; use the OEM number to
distinguish between MS-DOS 6.00 and IBM DOS 6.1 (there was never an
IBM DOS 6.0)
MS-DOS 6.21 reports its version as 6.20; version 6.22 returns the
correct value
Windows95 returns version 7.00 (the underlying MS-DOS), as did the
"Chicago" beta (reported in _Microsoft_Systems_Journal_,August 1994);
Windows95 OSR2 returns version 7.10
DR DOS 5.0 and 6.0 report version 3.31; Novell DOS 7 reports IBM v6.00,
which some software displays as IBM DOS v6.10 (because of the version
mismatch in true IBM DOS, as mentioned above). The Novell DOS 7
SETVER.EXE has an undocumented option /G x.y which sets the "global"
DOS version returned by this function for all executables not given
a specific version number in SETVER to major version x and minor
version y.
generic MS-DOS 3.30, Compaq MS-DOS 3.31, and others identify themselves
as PC-DOS by returning OEM number 00h
the version returned under DOS 4.0x may be modified by entries in
the special program list (see #1348 at AH=52h); the version returned
under DOS 5+ may be modified by SETVER--use AX=3306h to get the true
version number

See Also: AX=3000h/BX=3000h,AX=3306h,AX=4452h,AH=87h,INT 15/AX=4900h

See Also: INT 2F/AX=122Fh,INT 2F/AX=4010h,INT 2F/AX=4A33h,INT 2F/AX=E002h

(Table 1082)
Values for DOS OEM number:
00h IBM
01h Compaq
02h MS Packaged Product
04h AT&T
05h ZDS (Zenith Electronics)
06h Hewlett-Packard
07h ZDS (Groupe Bull)
0Dh Packard-Bell
16h DEC
23h Olivetti
28h Texas Instruments
29h Toshiba
33h Novell (Windows/386 device IDs only)
34h MS Multimedia Systems (Windows/386 device IDs only)
35h MS Multimedia Systems (Windows/386 device IDs only)
4Dh Hewlett-Packard
5Eh RxDOS
66h PhysTechSoft (PTS-DOS)
99h General Software's Embedded DOS
EEh DR DOS
EFh Novell DOS
FDh FreeDOS
FFh Microsoft, Phoenix