home *** CD-ROM | disk | FTP | other *** search
/ The Education Master 1994 (4th Edition) / EDUCATIONS_MASTER_4TH_EDITION.bin / files / progng_c / xlib / readme.doc < prev    next >
Encoding:
Text File  |  1993-12-27  |  8.9 KB  |  186 lines

  1. ******************************************************************************
  2. Registering XLIB
  3. ******************************************************************************
  4.  
  5.      XLIB may be registered for $40.  Registrants will be sent a registered
  6. copy of the XLIB archive along with a printed copy of the user manual.  
  7. There are three ways to register XLIB:
  8.  
  9. 1) By credit card through Public (software) Library:
  10.  
  11.      You can order with MC, Visa, Amex, or Discover from Public (software)
  12. Library by calling 800-2424-PsL or 713-524-6394 or by FAX to 713-524-6398
  13. or by CIS Email to 71355,470.  You can also mail credit card orders to PsL
  14. at P.O.Box 35705, Houston, TX 77235-5705.  The product identification number 
  15. for XLIB is 11077.
  16.  
  17. PHONE NUMBERS ABOVE ARE FOR ORDERS ONLY.  Any questions about the status of 
  18. the shipment of the order, refunds, registration options, product details, 
  19. technical support, volume discounts, dealer pricing, site licenses, etc, 
  20. should NOT be directed to PsL.  Direct all such questions to TechniLib.
  21.  
  22. 2) Through CompuServe:
  23.      
  24.      Use GO SWREG (shareware registration).  The program identification number 
  25. is 1778.  The program title is XLIB 3.0.  
  26.  
  27. 3) By mail to TechniLib:
  28.  
  29.      Complete and mail the form in REGISTER.FRM
  30.  
  31. ******************************************************************************
  32. Communicating with TechniLib Via Electronic Mail
  33. ******************************************************************************
  34.  
  35.      You can communicate with TechniLib via CompuServe electronic mail.  Direct
  36. mail to account 74730,167.  
  37.  
  38. ******************************************************************************
  39. Quick Start with XLIB
  40. ******************************************************************************
  41.  
  42.      The user manual is largely dedicated to cover specifics of XLIB which will
  43. not be of concern to many programmers.  A few notes are added here to expedite 
  44. matters for these programmers.
  45.      If all you need is the ability to access extended memory from within a 
  46. real-mode high-level langauge, then consider using EASYX rather than XLIB.
  47. EASYX does not require usage or knowlege of assembly language.  The 
  48. documentation for EASYX is in the file EASYX.DOC.
  49.      Most programmers will find nearly all that they need to know about XLIB 
  50. from the introductory chapter in the XLIB documentation.  One should also
  51. study the predefined selectors and descriptors in Chapter 2, and the GETMEM
  52. and PMGETMEM functions in Chapter 7.
  53.      C programmers wishing to use inline protected-mode execution should study
  54. the inline mode switch procedures in Chapter 5.
  55.  
  56. ******************************************************************************
  57. Instructions for Constructing Protected-Mode Libraries for Microsoft
  58. ******************************************************************************
  59.  
  60.      The following batch file uses Microsoft LIB to combine an OBJ file with
  61. XLIB.LIB to produce a protected-mode library.  Call the batch file using the
  62. base name of the OBJ file as the argument.  This base name will also be given
  63. to the library.  It is assumed that all files, including LIB.EXE, are in the
  64. current directory.
  65.  
  66. @echo on
  67. del %1.lib
  68. lib %1.lib /noi +%1.obj+xlib.lib;
  69.  
  70.      The following batch file uses Microsoft LINK and LIB to combine an OBJ
  71. file with XLIB.LIB to produce a protected-mode library and quick library for
  72. Microsoft BASIC 7.0.  Call the batch file using the base name of the OBJ
  73. file as the argument.  This base name will also be given to the library and 
  74. the quick library.  It is assumed that all files, including LINK.EXE and 
  75. LIB.EXE, are in the current directory.  The current directory must also 
  76. contain the file QBXQLB.LIB (included in the BASIC distribution disks).
  77.  
  78. @echo on
  79. del %1.qlb
  80. del %1.lib
  81. link /q/nopackf xlib.lib+%1.obj,%1.qlb,,qbxqlb.lib;
  82. lib %1.lib +xlib.lib+%1.obj; 
  83.  
  84. ******************************************************************************
  85. Instructions for Constructing Libraries and Linking with Borland
  86. ******************************************************************************
  87.  
  88.      The following batch file uses Borland TLIB to combine an OBJ file with
  89. XLIBB.LIB to produce a protected-mode library.  Call the batch file using the
  90. base name of the OBJ file as the argument.  This base name will also be given
  91. to the library.  It is assumed that all files, including TLIB.EXE, are in the
  92. current directory.
  93.  
  94. @echo on
  95. del %1.lib
  96. tlib /C %1.lib +xlibb.lib+%1.obj
  97.  
  98.      Borland C and Turbo C users can compile within the IDE; however, they must
  99. use the command-line linker because an option will be needed which is not
  100. included in the IDE linker.  In particular, the /3 option will be needed to
  101. enable processing of 32-bit segments.  The appropriate commands to TLINK will
  102. depend upon the memory model being used.  The following batch command will 
  103. link a program called MYPROG with a library call MYLIB under the large memory 
  104. model.  The batch command must be issued from the directory containing 
  105. MYPROG.OBJ.  It is assumed that TLINK is in the ..\BIN directory and that
  106. MYLIB.LIB is in the ..\LIB directory.  It is also assumed that all of the C 
  107. link libraries are in the ..\LIB directory.  The resulting executable will be 
  108. called MYPROG.EXE and the map file will be called MYPROG.MAP.  The command 
  109. line is lengthy and is therefore broken into two lines below.
  110.  
  111.  
  112.                                                      --------------------- model specification
  113.                                                      .   ----------------- obj file name
  114.                                                      .   |      ---------- exe file name
  115.                                                      .   |      |      --- map file name
  116.                                                      . ______ ______ ______
  117. ..\BIN\TLINK /3/c ..\LIB\C0L MYPROG,MYPROG,MYPROG,
  118.  
  119.      ..\LIB\MYLIB ..\LIB\FP87 ..\LIB\MATHL ..\LIB\CL 
  120.                     -----                        .         .
  121.                         |                          -------------- model specification
  122.                         ----------------------------------------- lib file name
  123.  
  124. To link under the small memory model, replace "L" with "S" at the model
  125. specification characters.  Use "M" for the medium model; "C" for the compact
  126. model, and "H" for the huge model.
  127.  
  128. ******************************************************************************
  129. Instructions for Debugging in the Borland IDE
  130. ******************************************************************************
  131.  
  132.      To run the IDE debugger, XLIB should be initialized for VCPI.  However,
  133. under the default behavior of the IDE, a VCPI program will not be able to
  134. allocate extended memory within the IDE.  There are potentially two reasons 
  135. for this.  First, the default behavior of the DPMI kernel under which the 
  136. IDE operates is to claim all EMS memory and convert it to DPMI memory.  
  137. Since VCPI seeks extended memory through EMS, no extended memory will appear 
  138. to be available.  To limit the memory consumption of the DPMI kernel, 
  139. include a statement such as the following in the batch file used to invoke 
  140. the IDE:
  141.  
  142. set dpmimem=maxmam 2000
  143.  
  144. This statement limits the memory usage of the DPMI kernel to 2000Kb.  If
  145. EMS memory exceeds this amount, then EMS memory will be available to the 
  146. IDE.  However, EMS memory will not be available to a VCPI program running 
  147. within the IDE if the IDE has itself consumed all EMS memory.  Therefore, 
  148. one may have to limit EMS memory usage of the IDE.  This can be done in the 
  149. OPTIONS|ENVIRONMENT|STARTUP menu of the IDE.  Typically, EMS memory usage
  150. should be set to zero here.
  151.  
  152. ******************************************************************************
  153. Improvements in XLIB Version 2.0 Over Version 1.0
  154. ******************************************************************************
  155.  
  156. 1) Procedures enabling protected-mode programming in C using inline assembly.
  157. 2) Protected-mode file routines which can transfer extended memory to files 
  158.      or files to extended memory.  Sequential and random access are supported.
  159. 3) Better interrupt management services.
  160. 4) User-defined descriptors.
  161. 5) More descriptors.  
  162. 6) More configurability.
  163. 7) Minor bug fixes
  164. 8) Better documentation.
  165.  
  166. ******************************************************************************
  167. Improvements in XLIB Version 3.0 Over Version 2.0
  168. ******************************************************************************
  169.  
  170. 1) Files included in Borland formats.
  171. 2) EASYX library included for those unfamiliar with assembly langauge.
  172. 3) MAPIO and PMMAPIO procedures added to XLIB for accessing memory-mapped 
  173.      input/output devices.
  174. 4) Better documentation
  175.  
  176. ******************************************************************************
  177. Explanation of PMPRINT.ASM
  178. ******************************************************************************
  179.  
  180.      Since protected-mode debuggers are hard to find, a programmer is greatly
  181. assisted by a set of screen management routines when preparing such code.  The
  182. file PMPRINT.INC includes a set of basic screen routines for protected-mode.
  183. Programmers using monochrome monitors will have to change the base address for
  184. the screen.  This file is included for your convenience.
  185.  
  186.