On Tue, 23 Mar 2004 19:01:06 +0000 (GMT), Bart Oldeman wrote:

How did you get 100? I only get 46 bytes (for the biggest kernel, FAT32/8086).
Just to make sure I don't miss anything...

I got 95 bytes for OpenWatcom FAT32/386. Perhaps we measure that difference in different ways. I just compare the sizes of the old and new object files... ;-)


Below is yet another patch for the same function that saves 105 more bytes ;-)

Lucho

--- cvs/kernel/kernel/inthndlr.c        2004-03-24 10:17:50.000000000 +0200
+++ src/kernel/kernel/inthndlr.c        2004-03-24 15:52:16.000000000 +0200
@@ -1209,25 +1209,9 @@
           break;

         case 0x01:
-          {
-            switch (lr.BL)
-            {
-              case LAST_FIT:
-              case LAST_FIT_U:
-              case LAST_FIT_UO:
-              case BEST_FIT:
-              case BEST_FIT_U:
-              case BEST_FIT_UO:
-              case FIRST_FIT:
-              case FIRST_FIT_U:
-              case FIRST_FIT_UO:
-                mem_access_mode = lr.BL;
-                break;
-
-              default:
-                goto error_invalid;
-            }
-          }
+          if ((lr.BL & 0xC0) == 0xC0 || (lr.BL & 0x3F) > 2)
+            goto error_invalid;
+          mem_access_mode = lr.BL;
           break;

case 0x02:


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to