home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / WINER.ZIP / APNDX.TXT next >
Text File  |  1994-09-04  |  5KB  |  95 lines

  1.                      APPENDIX: The Accompanying Files
  2.  
  3.  
  4. OVERVIEW OF THE ACCOMPANYING FILES
  5. ==================================
  6.  
  7. Besides the individual chapter text files, ETHAN.ZIP contains all of the
  8. example code, BASIC programs, and assembly language source files used in
  9. this book.  The example BASIC files have names like CHAPn-n.BAS, where the
  10. first part of the name indicates which chapter the example was used in, and
  11. the second part is the listing number within that chapter.  The remaining
  12. BASIC files use more descriptive names, and those are the ones you're most
  13. likely to actually use and add to your own programs.  Likewise, the shorter
  14. assembly language examples from Chapter 12 are in files named CHAP12-n.ASM,
  15. but source code for the complete routines are in files having names based
  16. on the actual routine names.
  17.      The library files named BASIC.* are meant for use with QuickBASIC
  18. version 4.0 or later, and the files named BASIC7.* are for use with BASIC
  19. PDS and VB/DOS.  Files with a .QLB extension are Quick Libraries that you
  20. load along with QB.EXE or QBX.EXE or VBDOS.EXE, depending on your version
  21. of BASIC.  The .LIB files are intended for use with LINK, when you create
  22. executable programs.  There are also a few .BI (BASIC Include) and .MAK
  23. (Make) files used to support some of the programs.  I did not bother to
  24. include separate .OBJ files for the assembly language routines, since you
  25. can easily extract them from BASIC.LIB or BASIC7.LIB if you need them.
  26.  
  27.  
  28. STARTING BASIC
  29.  
  30. To start QuickBASIC and load the BASIC.QLB library, enter this from the DOS
  31. command line:
  32.  
  33.      qb [program] /l basic.qlb /ah
  34.  
  35. If you specify the optional BASIC source program name, that is loaded into
  36. the QuickBASIC editor along with the BASIC.QLB library.  The /ah switch
  37. tells QuickBASIC to allow huge (greater than 64K) arrays, which is needed
  38. for some of the demonstration programs.
  39.      If you are using BASIC PDS, start QBX as follows:
  40.  
  41.      qbx [program] /l basic7.qlb /ah /es
  42.  
  43. The /es switch is needed for the EMS.BAS demonstration, and it tells QBX to
  44. cooperate with your use of Expanded memory.  When /es is omitted, QBX
  45. assumes no other programs are using EMS, which lets it access that memory
  46. slightly faster.  Since EMS.BAS stores its sample data in Expanded memory,
  47. this option is needed to avoid corrupting EMS memory.  Even if you do not
  48. plan to run EMS.BAS, using /es is harmless.
  49.      If you have VB/DOS you should start it like this:
  50.  
  51.      vbdos [program] /l basicvbd.qlb /ah /es
  52.  
  53. Once the appropriate Quick Library has been loaded, you may use the File
  54. Open menu sequence to load the BASIC programs.  Note that with VB/DOS, the
  55. Open menu defaults to a .MAK extension, so you'll have to enter *.BAS or
  56. type the complete name of a BASIC program source file.
  57.      Some of the example programs use BASIC's CALL Interrupt command, and
  58. to run those you will have to quit the BASIC editor, and restart it loading
  59. the default Quick Library that comes with your version of BASIC.  You do
  60. not need to specify a Quick Library name when loading the default library;
  61. using only the /l switch is sufficient.
  62.  
  63.  
  64. LINKING
  65.  
  66. When you compile and link programs manually from the DOS prompt and you
  67. want to use the .LIB libraries supplied with this book, you must specify
  68. the library name manually on the LINK command line:
  69.  
  70.      link program [/options] , , nul, basic[7] ;
  71.  
  72. The BASIC7 library works with both BASIC PDS and also VB/DOS, so it was not
  73. necessary to provide a separate BASICVBD.LIB file.  You can also compile
  74. and link from within the QuickBASIC or QBX editors using the menu options. 
  75. When a Quick Library is loaded, the BASIC editor uses the same first name
  76. for the LINK library when it shells to run BC and LINK.  For example, if
  77. you started QBX like this:
  78.  
  79.      qbx /l basic7.qlb
  80.  
  81. QBX tells LINK to use a parallel .LIB library named BASIC7.LIB.  But since
  82. there is no BASICVBD.LIB file you must compile and link manually when using
  83. VB/DOS.  If you don't use BASIC PDS you can optionally rename BASIC7.LIB to
  84. be BASICVBD.LIB.  Then when you start VB/DOS as shown above it can specify
  85. the correct library name when it shells to LINK.
  86.      The BASIC editor limits you to using either the Quick Library from
  87. this book *or* BASIC's version that contains CALL Interrupt--you cannot
  88. load two Quick Libraries at one time.  However, you can link with more than
  89. one library when creating an executable program manually.  This example is
  90. for QuickBASIC, and you would substitute QBX.LIB and BASIC7.LIB with PDS,
  91. or VBDOS.LIB and BASIC7.LIB when using VB/DOS:
  92.  
  93.      bc program [/o] ;
  94.      link [/options] program [other modules], , nul, qb.lib basic.lib ;
  95.