home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / memory / xmslibs / xmslib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-27  |  3.2 KB  |  123 lines

  1. /***************************************************************************
  2. *   XMSLIB.H                                                               *
  3. *   HEADER FOR XMSLIB                                                      *
  4. *   OS:        DOS                                                         *
  5. *   VERSION:   1.3                                                         *
  6. *   DATE:      07/26/91                                                    *
  7. *                                                                          *
  8. *   Copyright (c) 1991 James W. Birdsall. All Rights Reserved.             *
  9. *                                                                          *
  10. ***************************************************************************/
  11.  
  12. #ifndef XMSLIB_H
  13. #define XMSLIB_H
  14.  
  15. /*
  16. ** system includes <>
  17. */
  18.  
  19. /*
  20. ** custom includes ""
  21. */
  22.  
  23. /*
  24. ** local #defines
  25. */
  26.  
  27. /* error returns */
  28.  
  29. #define XMMOOPS     -1
  30. #define NOXMM       -2
  31.  
  32.  
  33. /* XMS driver errors */
  34.  
  35. #define XMM_UNIMP           0x80
  36. #define XMM_VDISK           0x81
  37. #define XMM_A20ERROR        0x82
  38. #define XMM_GENERROR        0x8E
  39. #define XMM_UNRECERROR      0x8F
  40.  
  41. #define XMM_NOHMA           0x90
  42. #define XMM_HMAUSED         0x91
  43. #define XMM_HMATOOBIG       0x92
  44. #define XMM_HMANOALLOC      0x93
  45. #define XMM_A20STILLEN      0x94
  46.  
  47. #define XMM_NOFREEX         0xA0
  48. #define XMM_NOFREEXHAN      0xA1
  49. #define XMM_BADXHAN         0xA2
  50. #define XMM_BADSRCHAN       0xA3
  51. #define XMM_BADSRCOFF       0xA4
  52. #define XMM_BADDESTHAN      0xA5
  53. #define XMM_BADDESTOFF      0xA6
  54. #define XMM_BADLENGTH       0xA7
  55. #define XMM_COPYOVERLAP     0xA8
  56. #define XMM_PARITY          0xA9
  57. #define XMM_NOLOCK          0xAA
  58. #define XMM_LOCKED          0xAB
  59. #define XMM_TOOMANYLOCKS    0xAC
  60. #define XMM_LOCKFAIL        0xAD
  61.  
  62. #define XMM_UMBSMALLER      0xB0
  63. #define XMM_NOFREEUMB       0xB1
  64. #define XMM_BADUMBHAN       0xB2
  65.  
  66.  
  67. /* function macros */
  68.  
  69. #define XMMcopyto(clen,src,dhan,doff)    _XMMcopy((clen),0, \
  70.                                             (unsigned long)(src),(dhan),(doff))
  71. #define XMMcopyfrom(clen,shan,soff,dest) _XMMcopy((clen),(shan),(soff),0, \
  72.                                                          (unsigned long)(dest))
  73.  
  74.  
  75. /*
  76. ** misc: copyright strings, version macros, etc.
  77. */
  78.  
  79. /*
  80. ** typedefs
  81. */
  82.  
  83. struct XMMregs {
  84.     unsigned int regAX;
  85.     unsigned int regBX;
  86.     unsigned int regDX;
  87.     unsigned int regSI;
  88.     unsigned int regDS;
  89. };
  90.  
  91.  
  92. /*
  93. ** global variables
  94. */
  95.  
  96. extern unsigned char _XMMerror;         /* EMS error variable */
  97. extern unsigned int  _XMMversion;       /* EMS version, BCD */
  98.  
  99. extern char xmslib_vers_vers[];
  100. extern char xmslib_vers_date[];
  101. extern char xmslib_vers_time[];
  102.  
  103.  
  104. /*
  105. ** function prototypes
  106. */
  107.  
  108. extern int XMMlibinit(void);
  109. extern unsigned int XMMgetversion(void);
  110.  
  111. extern unsigned long XMMcoreleft(void);
  112. extern unsigned long XMMallcoreleft(void);
  113.  
  114. extern int XMMalloc(unsigned long bytes);
  115. extern int XMMfree(int handle);
  116.  
  117. extern int _XMMcopy(unsigned long clen, int shan, unsigned long soff,
  118.                                                  int dhan, unsigned long doff);
  119.  
  120. extern int XMMrawcall(struct XMMregs *regs);
  121.  
  122. #endif
  123.