Hallo Herr Bret Johnson via Freedos-devel,

am Samstag, 26. April 2025 um 01:52 schrieben Sie:

>> I noticed that there is a minimal SETVER driver implementation [1] in the
>> FreeDOS kernel source, and it is shipped with FreeDOS as SETVER.SYS. However,
>> there is no accompanying executable in the FreeDOS distribution to modify the
>> (empty) list of DOS version assignments for specific executables. FreeDOS
>> instead seems to rely on a different mechanism to "fake" the DOS version,
>> called CALLVER [2]. However, this is not equal in functionality, as the
>> software for which the DOS version shall be faked has to be called via the
>> CALLVER binary. That might not be possible in every case.
>>
>> Was it a design decision to not support SETVER, or did nobody bother
>> implementing this?

> I remember a long time ago having a SETVER-type program that worked very 
> differently than the MS one.  I don't remember what is was called now and I 
> can't seem to easily be able to find it on my system anywhere, but I'm pretty 
> sure I got it from Garbo or SimTel or someplace similar.

> It didn't need a "configuration" file that contained a list of programs and 
> version numbers.  I remember debugging a little of the code, and the way it 
> worked was to look at the code in the calling program immediately following 
> the DOS Get Version call and "guessing" what version the calling program was 
> looking for by looking at how the CMP and Jxx (conditional jump) instructions 
> were configured.  It had a very small memory footprint, _far_ smaller than MS 
> SETVER, and worked pretty well _most_ of the time from what I remember.

The FreeDOS kernel uses this technique to execute MSDOS programs for 
compatibility testing.
Virtually all MSDOS programs have one of two variants of

  if (os_version() != 5.00)
        {
        printf("wrong os version\n");
        exit(1);
        }
the FreeDOS kernel uses this trick to execute them anyway;)

 
that's easy as they are all written in assembly and probably have the same macro

    VERIFY_OS_VERSION
included.

for general programs that's pretty useless because there are sooo many 
variations of this.

it also doesn't help for programs that need to know the OS version for correct 
operation
as the size/structure for different OS versions are existent, but different.
in particular many TSR's need this.

Tom




_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to