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

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