Hi Franta,

>         struct dosemu_detect {
>             char magic[8];
>             unsigned char ver[4];
>         };
>         static struct dosemu_detect far *p = (void far*) 0xF000FFE0;

Note that the way how you create far pointers can differ
between compilers. In particular, with any 32 bit memory
model, things would look quite differently. Just saying.

>         char magicexp[]="$DOSEMU$";          // expected string when on DOSEMU
> 
>         if (strcmp(p->magic, magicexp))      // p->magic == "$DOSEMU$" ?

You cannot strcmp this because the string is no C style
string with a NUL character at the end. You could use
strncmp(string1, string2, 8) to compare only the first
eight bytes, which will probably work fine for you :-)

Eric

> (I'm using tiny memory model and link .COM instead of .EXE, for
> minimalize program size)

PS: I do not know if int 0xe6 is really deprecated. Anybody?

> (and curiously, in referenced thread deprecated method Int 0xE6 AH=0
> still /after ~17 years/ is supported and seems be working well)


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to