>-----Original Message-----
>From: Alain M. [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, September 13, 2006 03:17 PM
>To: [email protected]
>Subject: Re: [Freedos-devel] [anounce] defrag 1.2
>
>Hi,
>
It always amazes me how little sense I talk.

Defrag already can check for DOSemu, and a complete host of other operating 
environments.

You just have to enable it with a "#define".

Here is the code I took from DOSemu 0.9.x

static int old_dosemu_compatibility(void)
{
    static unsigned long far *given = (unsigned long far *) 
DOSEMU_BIOS_DATE_LOCATION;
    static unsigned long *expected = (unsigned long *)DOSEMU_BIOS_DATE;

    return (given[0] == expected[0] && given[1] == expected[1]);
}

unsigned long is_dosemu(void)
{
    static struct dosemu_detect far *given = (struct dosemu_detect far *) 
DOSEMU_MAGIC_LOCATION;
    
    if (memcmp(&given->u.magic,DOSEMU_MAGIC,8) == 0)
                    return given->version;
    return old_dosemu_compatibility();
}

Imre



>This is an official test for DOSEMU version 1.3.x:
>
>  // Test DOSEMU
>  if (!memcmp((char *)0xFFFE0,"$DOSEMU$",8))
>   isDosEmu=true;
>
>Some old version doesn't work but I am not sure of how old "old" is ;-)
>
>Alain
>
>Imre Leber escreveu:
>> 
>> But then it doesn't work in DOSemu and some other environments that it 
>> wouldn't hurt running under. Then it refuses to run when there is even some 
>> DPMI host active.
>> 
>> Imre
>
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Freedos-devel mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
>



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to