The following patch saves almost 100 bytes in our largest function, inthndlr.c:int21_service().

Lucho

--- inthndlr.c  2004-03-23 18:11:38.000000000 +0200
+++ inthndlr.c  2004-03-23 19:37:40.000000000 +0200
@@ -378,13 +378,7 @@
 #define SET_CARRY_FLAG()    r->FLAGS |= FLG_CARRY

   ((psp FAR *) MK_FP(cu_psp, 0))->ps_stack = (BYTE FAR *) r;
-
-       lr.AX = r->AX;
-       lr.BX = r->BX;
-       lr.CX = r->CX;
-       lr.DX = r->DX;
-       lr.SI = r->SI;
-       lr.DI = r->DI;
+  fmemcpy(&lr, r, sizeof(lregs) - 4);
        lr.DS = r->DS;
        lr.ES = r->ES;

@@ -1644,12 +1638,7 @@
 error_carry:
   SET_CARRY_FLAG();
 exit_dispatch:
-  r->AX = lr.AX;
-  r->BX = lr.BX;
-  r->CX = lr.CX;
-  r->DX = lr.DX;
-  r->SI = lr.SI;
-  r->DI = lr.DI;
+  fmemcpy(r, &lr, sizeof(lregs) - 4);
   r->DS = lr.DS;
   r->ES = lr.ES;
 real_exit:


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