On Sat, 14 Feb 2004 22:17:04 +0300 (MSK), Arkady V.Belousov wrote:

LG> It only depends on what CPU fmemcpy in main.c is compiled for. If it's compiled for 80386, it crashes.

Now check from which places main::fmemcpy is called and check which place (may) depend on 32-bit registers.

There is none! Not only have I checked all fmemcpy calls, ensuring that EAX need NOT be preserved accross all the calls, but as I wrote, I deliberately compiled ALL the kernel for 80186 and ONLY fmemcpy for 80386 (so EAX is used ONLY in it and in NO other place in the kernel!) and it still crashed! (Borland uses EAX in a very predictable way and for temporary 32-bit data transfer only). Anyway, after I fixed my silly error causing the crash of my patched kernel, it now works! Please find the patches at the usual place (http://linux.tu-varna.acad.bg/~lig/freedos/CVSPATCH.TXT). Let me repeat what these patches do. Besides the old 386 register save / restore macro that saves 240 bytes of resident size and the disabling the old and useless in my opinion Watcom warning (doesn't affect the compilation NOW, but I just thought it MIGHT for the future - anyway, not important!), it removes ALL initialisation code string functions from main.c, config.c, iprf.c and inithma.c, and intruduces a new file called ISTR.ASM that includes the already existing ASMSUPT.ASM using its functions for the initialisation code. All the other patches are necessary for this. I verified that the kernel builds successfully with Turbo C, Borland C, Microsoft C and Watcom C. Needless to say that now it works perfectly, not speaking about the decreased kernel size. If these patches are not accepted by Bart, then I'm going to apply them each time a new kernel is released. Enjoy!


Lucho


------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to