home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / MISC / NETWORK / SLFP123.ZIP / GEN.H next >
Encoding:
C/C++ Source or Header  |  1990-11-09  |  1.3 KB  |  92 lines

  1. /*
  2.  *  Basic types
  3.  */
  4.  
  5. typedef    unsigned long    dword;
  6. typedef    unsigned int    word;
  7. typedef    unsigned char    byte;
  8. typedef    unsigned int    field;
  9.  
  10. typedef    struct
  11.     {
  12.     word    bp;
  13.     word    di;
  14.     word    si;
  15.     word    ds;
  16.     word    es;
  17.     word    dx;
  18.     word    cx;
  19.     word    bx;
  20.     word    ax;
  21.     word    ip;
  22.     word    cs;
  23.     word    fl;
  24.     }    IntrWordRegsType;
  25.  
  26. typedef    struct
  27.     {
  28.     word    filler[5];
  29.     byte    dl;
  30.     byte    dh;
  31.     byte    cl;
  32.     byte    ch;
  33.     byte    bl;
  34.     byte    bh;
  35.     byte    al;
  36.     byte    ah;
  37.     }    IntrByteRegsType;
  38.  
  39. typedef    union
  40.     {
  41.     IntrWordRegsType    w;
  42.     IntrByteRegsType    b;
  43.     }    IntrRegsType;
  44.  
  45. enum
  46.     {
  47.     FL_CARRY        =    0x0001,
  48.     FL_PARITY        =    0x0004,
  49.     FL_AUXILIARY    =    0x0010,
  50.     FL_ZERO            =    0x0040,
  51.     FL_SIGN            =    0x0080,
  52.     FL_OVERFLOW        =    0x0800
  53.     };
  54.  
  55. typedef    enum
  56.     {
  57.     FALSE,
  58.     TRUE
  59.     } BOOLEAN;
  60.  
  61. #define    ErrInt        0x80000000L
  62.  
  63. typedef    void interrupt    (*InterruptPtrType)(void);
  64.  
  65. #define SECONDS        18
  66.  
  67. /*
  68.  *  PSP layout
  69.  */
  70.  
  71. typedef struct
  72.     {
  73.     word        PSP_Int20;
  74.     word        PSP_MemSize;
  75.     byte        PSP_fill1;
  76.     byte        PSP_Call21[5];
  77.     dword        PSP_TerminateVector;
  78.     dword        PSP_BreakVector;
  79.     dword        PSP_ErrorVector;
  80.     byte        PSP_fill2[22];
  81.     word        PSP_Environment;
  82.     byte        PSP_fill3[34];
  83.     byte        PSP_Int21Retf[3];
  84.     word        PSP_fill4;
  85.     byte        PSP_FCB1Extn[7];
  86.     byte        PSP_FCB1[9];
  87.     byte        PSP_FCB2Extn[7];
  88.     byte        PSP_FCB2[9];
  89.     byte        PSP_ParamLen;
  90.     byte        PSP_Params[127];
  91.     byte        PSP_DTA[128];
  92.     }    PSP_Type, *PSP_Ptr;