home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / MATHSRC.ZIP / EMUVARS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.3 KB  |  49 lines

  1. /* Emuvars.h
  2.  
  3.     Floating point records used by emulator and FPU exception handler.
  4.     For Borland internal use.
  5.  
  6.  
  7.     Copyright (c) Borland International 1987, 1992
  8.     All Rights Reserved.
  9. */
  10.  
  11.  
  12. /* from _math.h:
  13.         An iNDP_image is put into memory by the FSTENV instruction.
  14. */
  15. typedef struct
  16. {
  17.         unsigned        control_;
  18.         unsigned        status_;
  19.         unsigned        tags;
  20.         unsigned        ip;
  21.         unsigned        ip_opcode;
  22.         unsigned        dp;
  23.         unsigned        dptop;
  24. }
  25.         iNDP_env;
  26.  
  27. /* This must be consistent with the STRUC in emuvars.asi */
  28.  
  29. union { unsigned int control1; struct { unsigned char mask, status;} shadow;};
  30.  
  31. struct emu {
  32.         unsigned int status;
  33.         unsigned int control;   /* shadow mask, status */
  34.         unsigned int adjust;
  35.         unsigned int _8087;
  36.         unsigned int type;
  37.         unsigned int TOS;
  38.         unsigned int lastSP;
  39.         unsigned int initSP;
  40.         iNDP_env FPExcep;
  41.         unsigned int count1;            /* for debugging */
  42.         unsigned int count2;            /* for debugging */
  43.         unsigned int status2;           /* shadow status */
  44. };
  45.  
  46. /* Caution: this is in the STACK segment, possible not the DGROUP! */
  47. extern struct emu cdecl _emu;
  48.  
  49.