Dos pgm loading question (Bug#440 ish)

Ann and Jason Edmeades us at
Tue Mar 22 17:07:57 CST 2005

Hiya, I was trying to confirm an old bug still existed and the bug #440 has
a tar file with an exe in it which apparently used to run under wine and
fails with some problems later on. Nowdays, it fails dismally when you try
to launch it.

Disclaimer#1 - I haven't tried a regression test but I have looked through
the code at the point of the failure all the way back to before winedos
existed (pre this problem report) and cant see how it ever worked. If anyone
has a working 2002 version of wine and could try it, I'd appreciate it!

Basically we look at the header, and see a # pages of 1, and a count of
bytes in the last page of 107, and end up loading something like 38 bytes of
the exe. The DOS exe starts with JMP 0x88, so a trap occurs

Looking under windows, ntvdm does a load for the header, then a load for 464
bytes from the position where the code starts - For the life of me I cant
see how that calculation occurs and where our code is wrong.

I know its an extremely trivial problem for an ancient thing that no one
will probably ever want running under wine, but it really bugs me - Does
anyone have any idea why our calculation is wrong?


More information about the wine-devel mailing list