On Tue, 10 Feb 2004, Luchezar Georgiev wrote:

> How did I fix it? First I decided to disable 386 code only for fmemcpy
> but that would be ugly. So, I looked at the code and as fmemcpy wasn't
> the only one of those 4 small functions that caused the compiler to use
> EAX, I decided that if I fix only it, this problem may arise in the
> future. So, finally I decided to change them all and used the Pat
> Villani's original code in misc.c, slightly modified. Now Borland
> doesn't use EAX in none of them even if they're all compiled for 386!

I'm sorry but I think that's a hack^2. Since you have absolutely no
guarantee that Borland C won't use EAX anywhere else and not in the future
either. There really should be push/pop wrapper somewhere instead,
using the Protect386Registers and Restore386Registers asm macros defined
in hdr\stacks.inc

The question is now, where does eax get destroyed? Did you double check
if entry.asm includes them for your configuration (%ifdef I386). Or
perhaps all that is needed is that the high parts need to be cleared
after calling a device driver or somewhere else?

> > Don't call truename from FcbNameInit(). It was only necessary for
> > "FcbRename", which can call it itself. This avoids yesterday's hack.
>
> Thanks! Tested and it works with EJECT! But the Borland compiler warned
> about an unused assignment and variable (lpFcb in FcbDelete), so I had
> to remove it and included this into my patches below (available at
> http://linux.tu-varna.acad.bg/~lig/freedos/CVSPATCH.TXT).

well I saw that with watcom too but applied the fix 5 minutes later. The
SF list and anon CVS might not be that reliable now ... :(

Bart



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to