Table des matières
INT 0x21 - 0x30 - Get DOS version (DOS 2+)
Request/Call:
reg | value | descr |
---|---|---|
AH | 0x30 |
Return:
reg | descr |
---|---|
AL | Major version (2 → x) |
AL | Minor version (in hundredth decimal) |
BH | 0xFF: indicates MS-DOS, only if OEM vendor chooses to identify 0x00: indicates PC-DOS |
BL:CX | 24bit OEM Serial number if BH = 0xFF |
Notes & Comments
- for an example DOS version 2.1 returns AL=2 and AH=10
- DOS versions prior to DOS 2.0 return zero in AH and AL
- DOS version 4.0 and 4.1 usually return the same value of 4.00
- the OEM serial number is a rarity, though some older OEM DOS versions implemented this feature
- the OS/2 compatibility box returns 10.10 for OS/2 1.1, 10.20 for OS/2 1.2, etc…
- when testing for version, a specific test can often cause your code to not work in following versions of DOS. It is often better to test for a version number greater or equal to the minimum rather than a specific version number where possible