How to properly detect MSX-DOS version?

By Eugeny_Brychkov

Paragon (1039)

Eugeny_Brychkov's picture

19-09-2018, 09:30

I need to know DOS1 or DOS2 mode. I am sure there's something in machine config RAM area, or BDOS system call. But what is the most reliable way - and sequence of tests?

BDOS's "RETURN VERSION NUMBER (0CH)" seems gives the wrong information.

Login or register to post comments

By gdx

Prophet (2356)

gdx's picture

19-09-2018, 10:11

By Eugeny_Brychkov

Paragon (1039)

Eugeny_Brychkov's picture

19-09-2018, 14:21

Thank you!

By NYYRIKKI

Enlighted (5045)

NYYRIKKI's picture

19-09-2018, 17:41

Eugeny_Brychkov wrote:

BDOS's "RETURN VERSION NUMBER (0CH)" seems gives the wrong information.

"This function simply returns the CP/M version number which is being emulated. This is always version 2.2 in current systems."

"GET MSX-DOS VERSION NUMBER (6FH)

Parameters: C = 6FH (_DOSVER)
Results: A = Error (always zero)
BC = MSX-DOS kernel version
DE = MSXDOS2.SYS version number
This function allows a program to determine which version of MSX-DOS it is running under. Two version numbers are returned, one in BC for the MSX-DOS kernel in ROM and the other is DE for the MSXDOS2.SYS system file. Both of these version numbers are BCD values with the major version number in the high byte and the two digit version number in the low byte. For example if there were a version 2.34 of the system, it would be represented as 0234h.

For compatibility with MSX-DOS 1.0, the following procedure should always be followed in using this function. Firstly if there is any error (A<>0) then it is not MSX-DOS at all. Next look at register B. If this is less than 2 then the system is earlier than 2.00 and registers C and DE are undefined. If register B is 2 or greater then registers BC and DE can be used as described above. In general the version number which should be checked (after this procedure) is the MSXDOS2.SYS version in register DE."

My MSX profile