Hi!

6-Мар-2005 16:58 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:

> merge from dev kernel, Jason Hood's patch for extended DPBs and Set Extended
> Error function
> +++ inthndlr.c        6 Mar 2005 16:58:31 -0000       1.94
> @@ -1215,6 +1226,20 @@
> +          /* Set Extended Error */
> +        case 0x0a:
> +          {
> +            lregs er;
> +            fmemcpy(&er, FP_DS_DX, sizeof(er));
> +            CritErrCode        = er.AX;
> +            CritErrDev         = MK_FP(er.ES, er.DI);
> +            CritErrLocus       = er.CH;
> +            CritErrClass       = er.BH;
> +            CritErrAction      = er.BL;
> +            CLEAR_CARRY_FLAG();
> +            break;
> +          }

     Hm. Why to use stack and fmemcpy()? Isn't better to access directly:

______________O\_/_________________________________\_/O______________
        case 0x0a:
#define er (* MK_PTR (lregs, lr.DS, lr.DX))
          CritErrCode        = er.AX;
          CritErrDev         = MK_FP(er.ES, er.DI);
          CritErrLocus       = er.CH;
          CritErrClass       = er.BH;
          CritErrAction      = er.BL;
#undef er
          CLEAR_CARRY_FLAG();
          break;
_____________________________________________________________________
              O/~\                                 /~\O

Or, if if by some reason doesn't wish to copy MK_PTR definition into stable
edition (why not?), _in given case_ you may do:

#define er (* (lregs FAR*) MK_FP (lr.DS, lr.DX))
/* ------------------^^^ Don't forget */




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to