On Sun, 20 Nov 2005, Kenneth J. Davis wrote:

The reason for these -zu compatible fixes is that in cases where SS is not the same as DS (DGROUP) certain calls behave oddly, such as printf, since the compiler is passing an offset on the stack where it assumes DS==SS so the function receiving the parameters can use either segment interchangeably. The problem is in certain circumstances (such as this new interrupt handler) we are using the user's stack so the printfs only work if that happens to be the kernel else you get random values. There may be other cases where this occurs (I have experienced the printf issue before when doing some win3 work in the int 2f handler, but did not investigate at that time). I think Borland's compilers default to DS!=SS (given I only saw an option to set DS==SS) so should not be an issue for them.

From a now somewhat lazy bystander...

you can avoid using "-zu" by explictly coding the offending pointer dereferences in this way:

MK_FP(_SS, &ch)

like it's done in nls.c.

Bart


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to