Re: FreeDOS version query

Bart Oldeman <[email protected]> Tue, 12 Nov 2002 19:48:23 -0500 (EST)
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
On Tue, 12 Nov 2002, Alain wrote:

> I have a suggestion:
> Could FreeCOM display the Kernel version as well as it's own version?

type ver /r

> Ralf wrote (long ago):
> > As long as i can remember, FreeDOS returns an OEM version of 0FDh with the
> > Query DOS Version call....
> and also:
> > the kernel returns using int21h:
> > AH=30h: 0fdh in BH ("OEM_ID"), CX=0101, bl=1ah (1.1.26), no
> > subletters (CH=major, CL=minor).
> > AX=33ffh: returns a pointer to the version string "FreeDOS kernel version
> > ..." in DX:AX
>
> NOTE that this information is not included in my version of RBIL, could
> someone correct that, please?

Right. the "FD" is in RBIL but the rest isn't. I sent this info to
Matthias Paul and Ralf Brown when Matthias begged for changes because the
new RBIL would be out soon (no there isn't an RBIL62 yet).

> PPS:  the string does NOT contain information about fat32 support. Bart,
> don't you think this should be added? My suggestio: "(Build 2027rd/32)" as
> this is the shortest string to fully identify a kernel.

Well you can detect FAT32 by calling one of the int21/ax=73xx functions
and check if one returns ax=7300 (means unsupported).

One thing that might be worth adding is the compiler and compiler version
used to compile the kernel though.

> void main(void)

probably better to make this int main (void) (void main(void) is
non-standard but that doesn't matter much here)

>     if ( *(int far*)p == 0x7246)              /* fast string checking "Fr" */
>       printf(", string is:\n %Fs",p);
>   }else{
>     printf("NOT FreeDOS: Int21/30 says bh=0%02xh",regs.h.bh&0xff);
>   }
>   printf("\n");

    return !(regs.h.bh==0xfd);
> }

that way you can see if it's FreeDOS using errorlevels in batch files.

Bart