Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Which "DOS" version is my program running on ?

4 views
Skip to first unread message

R.Wieser

unread,
Feb 20, 2024, 2:56:52 AMFeb 20
to
Hello all,

I have a rather old program which first checks which version of DOS it runs
on, so it won't make a mess (of other DOS environments) when it does its
thing.

The thing is that I just discovered that INT 0x21, AH=0x30 returns AX=0x0005
for my XPsp3's cmd.exe console - which ofcourse clashes with (the programs
origionally targetted) DOS 5.x.

I also tried INT 0x21, AX=0x3306, which returns BX=0x3205 and as such
doesn't look as much of an improvement. (though, is 0x3205 unique to XP ?
RBIL doesn't mention it)

tl;dr:
Is there a call available with which I can distinguish between the above two
(and hopefully between other DOS and Windows console verson too) ?

And yes, I tried to search RBIL first. :-)

Regards,
Rudy Wieser


wolfgang kern

unread,
Feb 20, 2024, 7:06:15 AMFeb 20
to
On 20/02/2024 08:56, R.Wieser wrote:
> Hello all,

Hi,
what I remember and what still seem to work in (windoze10) DOS-box is
the DOS cmd "ver". it reports DOS 5.0 for my DOS-box. but I know it is
version 8.2 (same as the DOS that came with windoze98SE).
so something got lost during the last three decades.
__
wolfgang

R.Wieser

unread,
Feb 20, 2024, 7:51:26 AMFeb 20
to
Wolfgang,

>> Is there a call available with which I can distinguish between the above
>> two
>> (and hopefully between other DOS and Windows console verson too) ?
...
> what I remember and what still seem to work in (windoze10) DOS-box is the
> DOS cmd "ver". it reports DOS 5.0 for my DOS-box.

Heree XPsp3 reports "Microsoft Windows XP [Version 5.1.2600]", which is not
what either 0x30 or 0x3306 returns. :-|

>but I know it is version 8.2 (same as the DOS that came with windoze98SE).
> so something got lost during the last three decades.

About that, my "is 0x3205 unique to XP ?" remark prompted me to do some
googeling in that direction, and I stumbled over this :

https://dos.fandom.com/wiki/MS-DOS_Version_History

[quote]
Version 5.50 (Windows NTVDM) - All Windows NT 32-bit versions ship with
files from DOS 5.0
[/quote]

That means that int 21h, ah=30h returns AL=05h for both DOS 5.x as well as
the NT versions, even though they differ in certain aspects (int 21h,
AH=50h, offset 17h, CDS. The latter structure is smaller than the former
one).

Unless I hear something better about version detection I'm going to work
with the assumption that that 3205h value from int 21h, AH=3306h is
indicative for XPsp3, just as 0A05h is indicative for win96se.

Thanks for the response.

Regards,
Rudy Wieser


wolfgang kern

unread,
Feb 20, 2024, 8:24:24 AMFeb 20
to
On 20/02/2024 13:50, R.Wieser wrote:
...
>> what I remember and what still seem to work in (windoze10) DOS-box is the
>> DOS cmd "ver". it reports DOS 5.0 for my DOS-box.
>
> Heree XPsp3 reports "Microsoft Windows XP [Version 5.1.2600]", which is not
> what either 0x30 or 0x3306 returns. :-|
>
>> but I know it is version 8.2 (same as the DOS that came with windoze98SE).
>> so something got lost during the last three decades.
>
> About that, my "is 0x3205 unique to XP ?" remark prompted me to do some
> googeling in that direction, and I stumbled over this :
>
> https://dos.fandom.com/wiki/MS-DOS_Version_History
>
> [quote]
> Version 5.50 (Windows NTVDM) - All Windows NT 32-bit versions ship with
> files from DOS 5.0
> [/quote]
>
> That means that int 21h, ah=30h returns AL=05h for both DOS 5.x as well as
> the NT versions, even though they differ in certain aspects (int 21h,
> AH=50h, offset 17h, CDS. The latter structure is smaller than the former
> one).
>
> Unless I hear something better about version detection I'm going to work
> with the assumption that that 3205h value from int 21h, AH=3306h is
> indicative for XPsp3, just as 0A05h is indicative for win96se.
>
> Thanks for the response.

I used XP for many years but rare used DOS, it was version 8.2 the
follower of 6.22 (both are bloated and needed HIMEM,sys & EMM386).
Version 6.00 was the last that fits old games memory size demands.

sorry can't help with details.
__
wolfgang

JJ

unread,
Feb 20, 2024, 6:55:23 PMFeb 20
to
MS-DOS true version number of 5.50 is unique to Windows NT's DOS VM, since
Microsoft doesn't release MS-DOS v5.50 commercially or to OEMs.

It applies to (at least) Windows NT 3.51 up to Windows 8.1. Windows NT 3.1
and Windows 10+ are very likely the same.

Int 21h AX=3306 return the same set of version/ID related values.

In pure MS-DOS 5.00a, Int 21h AX=3306 returns BX=0005. All other returned
version/ID related values are identical to Windows NT's DOS VM.

R.Wieser

unread,
Feb 21, 2024, 1:12:22 AMFeb 21
to
JJ,

> MS-DOS true version number of 5.50 is unique to Windows NT's DOS VM,

While googeling I saw the same thing mentioned too. Odd to me, as they went
upto DOS 7.x with Win98. It's what threw me off (I expected a higher
version than Win98).

> In pure MS-DOS 5.00a, Int 21h AX=3306 returns BX=0005.

I would have liked to be able to test it, but as I've not got an DOS v5.x
USB stick ready anymore... :-) Thanks for the confirmation.

Regards,
Rudy Wieser


wolfgang kern

unread,
Feb 21, 2024, 4:50:09 AMFeb 21
to
On 20/02/2024 08:56, R.Wieser asked about:

I just tried to remember where I found 6.22 and 8.2 versions reported.
now I checked properties on (DOS6.00) MSDOS.SYS and IO.SYS in windoze:
both show after the last modified date a time that tells 06:00:00.
I don't have other old DOS anymore (can't read my DOS 1.0 on 5 1/4)
__
wolfgang

R.Wieser

unread,
Feb 21, 2024, 5:31:14 AMFeb 21
to
Wolfgang,

> I just tried to remember where I found 6.22 and 8.2 versions reported.

I just remembered I have a DOS 6.22 USB stick, and it returns 0x1606 for
both checks - which quite nicely matches its DOS version. :-)

I thought that Win98 was build ontop of a DOS 7.x version, but thats not
what the version checks return (0x0A05).

> now I checked properties on (DOS6.00) MSDOS.SYS and IO.SYS in windoze:
> both show after the last modified date a time that tells 06:00:00.

They did the same with DOS 5.x and DOS 6.22. At the time I wondered if
that was part of some "security" / authenticity check.

> I don't have other old DOS anymore (can't read my DOS 1.0 on 5 1/4)

Over time I've gathered disk-images of a number of DOS versions (from
different OEMs). Never saw a v1.0. I did come across a win 1.01 set of
disk images though.

Regards,
Rudy Wieser


0 new messages