On Wed, 11 Feb 2004 21:25:44 +0000 (GMT), Bart Oldeman wrote:

...and everywhere where fmemcpy is called? But isn't it better to fix
fmemcpy itself?!

the problem here is that fmemcpy wasn't broken, so your fix is not a fix, just a workaround. Yes, it affects the high word of eax, but that is not a bug in itself. The real problem *must* be somewhere else.

Hence the suggestion of Tom to use softice or similar to figure out where
and why you *really* crash.

I see now! Even before I read your message, this bug reminded me a chapter in the excellent book "Writing solid code" by Steve Maguire (albeit published by Microsoft press, it's very helpful!). There is a sub-chapter called "Doctor, help!" in chapter 8. If someone has this book, re-read this chapter (or even the whole book!), it's very wise to remember every time we encounter such bugs.


So, I'll see what I can do, Tom too, and we hope to see where it crashes.

Meanwhile, please find enclosed a new patch of mine which, although very simple, reduces the resident part size of non-Watcom 386 kernels by 240 bytes! For Borland, it even opens room for yet another disk buffer (37 vs 36). Of course, less than Watcom kernel buffers (42), but still nice :)

Lucho

diff -ruN cvs/kernel/hdr/stacks.inc src/kernel/hdr/stacks.inc
--- cvs/kernel/hdr/stacks.inc   2002-12-09 02:17:10.000000000 +0200
+++ src/kernel/hdr/stacks.inc   2004-02-12 08:44:52.000000000 +0200
@@ -146,18 +146,14 @@
                push fs
                push gs
        %else
-               ror eax,16
-               push ax
-               ror eax,16
-               ror ebx,16
-               push bx
-               ror ebx,16
-               ror ecx,16
-               push cx
-               ror ecx,16
-               ror edx,16
-               push dx
-               ror edx,16
+               push eax
+               pop ax
+               push ebx
+               pop bx
+               push ecx
+               pop cx
+               push edx
+               pop dx
        %endif

        %endmacro
@@ -168,18 +164,14 @@
                pop gs
                pop fs
        %else
-               ror edx,16
-               pop  dx
-               ror edx,16
-               ror ecx,16
-               pop  cx
-               ror ecx,16
-               ror ebx,16
-               pop  bx
-               ror ebx,16
-               ror eax,16
-               pop  ax
-               ror eax,16
+               push dx
+               pop edx
+               push cx
+               pop ecx
+               push bx
+               pop ebx
+               push ax
+               pop eax
        %endif

%endmacro


------------------------------------------------------- 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