Interrupt 2Fh Function 122Fh

This function sets or clears the fake version number that int 21h function 30h may return in ax. It acts non-trivially only in version 4.0.


The function uses registers for its input and output. As with any subfunction of int 2Fh function 12h, it also reads a word from above the interrupt frame as if to access an argument. This particular subfunction, however, does not interpret the word.


ax 122Fh
dx version number, major version in low byte;
zero to use true version

Given the kernel as implemented, this function has a well-defined effect if and only if dx is zero. It then clears whatever fake version number the kernel may have adopted. Subsequent calls to int 21h function 30h return the true version.

What’s intended for non-zero dx is unclear. The behaviour depends on what programs and overlays the kernel has ever loaded. See below for details.

Success (version 4.0)

The function’s simple implementation in version 4.0 must be counted as succeeding trivially, but it does not explicitly indicate success or failure. As with any subfunction of int 2Fh function 12h that doesn’t explicitly return anything in ax, it corrupts ax simply for having used it but not preserved it.

ax corrupt

Output (version 5.0 and higher)

Version 5.0 reduces the function to a placeholder. Whether its explicit clearing of al to zero is meant to indicate failure or just success at doing nothing is not known.

al 00h
ah corrupt

Failure (version 3.0 and higher)

To versions 3.0 and higher but before 4.0, this function is an unimplemented subfunction of int 2Fh function 12h.

flags carry flag set
ax error code

Before version 3.0, the kernel does not implement int 2Fh and has nothing to do with whatever happens from trying to call this function.


Each loading of a program or overlay has the kernel consult a “special entries” table for an entry that matches the file name. The entry provides both a non-zero fake version number and a duration for its use. The duration specifies either that the fake version affects some number of subsequent version queries or that it lasts until the next process termination.


The fake version cannot be zero. Put another way, while the fake version is zero, all version queries report the true DOS version. This is unambiguously what is set up by this function when called with zero for dx.

The only known use of int 2Fh function 122Fh is with zero for dx. This is done by the system initialisation in IO.SYS after loading and initialising each device driver. Remember, device drivers are overlays. Their return from their intialisation is not a process termination. If a fake version was adopted for a device driver, it needs to be cleared explicitly so that it can’t affect the next device driver.


Calling the function with non-zero dx might be thought to set a fake version, perhaps with the implied duration of lasting until the next process termination. It can have this effect, but it also can have no effect at all.

If there has never been a successful lookup or if the last was of the type that has a count and this count has expired, then the kernel is not currently faking its version number and this function does not make it start. Non-zero dx has no effect on any subsequent version queries.

If the last successful lookup set a count that has not yet expired, or if it specified faking until the next process termination and no process has yet terminated, then the kernel is faking its version number and non-zero dx simply updates this fake version that the kernel will report until it would anyway have stopped.

If the last successful lookup was of the type that sets a fake version to apply until the next process termination and a process has since terminated, however long ago, then the kernel is not faking its version number but this function tells it to start. Non-zero dx will be reported as the version number until the next process termination.