• Which "DOS" version is my program running on ?

    From R.Wieser@address@is.invalid to alt.lang.asm on Tue Feb 20 08:56:35 2024
    From Newsgroup: alt.lang.asm

    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


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Tue Feb 20 13:06:13 2024
    From Newsgroup: alt.lang.asm

    On 20/02/2024 08:56, R.Wieser wrote:
    Hello all,

    Hi,

    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. :-)

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Tue Feb 20 13:50:59 2024
    From Newsgroup: alt.lang.asm

    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


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Tue Feb 20 14:24:19 2024
    From Newsgroup: alt.lang.asm

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From JJ@jj4public@outlook.com to alt.lang.asm on Wed Feb 21 06:55:19 2024
    From Newsgroup: alt.lang.asm

    On Tue, 20 Feb 2024 08:56:35 +0100, R.Wieser wrote:
    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

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Wed Feb 21 07:10:47 2024
    From Newsgroup: alt.lang.asm

    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


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From wolfgang kern@nowhere@never.at to alt.lang.asm on Wed Feb 21 10:50:05 2024
    From Newsgroup: alt.lang.asm

    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

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From R.Wieser@address@is.invalid to alt.lang.asm on Wed Feb 21 11:30:53 2024
    From Newsgroup: alt.lang.asm

    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


    --- Synchronet 3.21d-Linux NewsLink 1.2