home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / dos / prg / bas / hanlin3 / qbwiz20 / qbwiz.doc < prev    next >
Text File  |  1994-11-05  |  6KB  |  150 lines

  1.                 The QuickBasic Wizard's Library
  2.  
  3.      QBWiz  Copyright (c) 1990-1994  Thomas G. Hanlin III
  4.  
  5.  
  6.  
  7. This is QBWiz, an assembly language library for use with
  8. QuickBasic and BASCOM. It was tested under QB 4.5 and is
  9. expected to work with QuickBasic versions 4.0 - 4.5 and BASCOM
  10. 6.0. Due to strong dependency on the internals of the compiler,
  11. QBWiz may well not work with other versions. QBWiz is only for
  12. stand-alone compiled programs. It will not work with programs
  13. that require the runtime module (BRUNxx) or inside the QB
  14. environment.
  15.  
  16. The QBWiz collection is copyrighted and may be distributed only
  17. if the following conditions are met:
  18.  
  19.    All files must be included in original, unaltered condition.
  20.    This means that none of the original files may be altered,
  21.    and that no additions or deletions may be made to the set of
  22.    original files.
  23.  
  24. YOU USE THIS LIBRARY AT YOUR OWN RISK. It has been tested by me
  25. on my own computer, but I will not assume any responsibility for
  26. any problems which QBWiz may cause you.
  27.  
  28. The accompanying source code is designed for the MASM 6.0
  29. assembler and may require modifications to assemble with A86,
  30. OPTASM, or TASM.
  31.  
  32. Note that QBWiz will work only with stand-alone compiled BASIC
  33. programs, that is, programs compiled with the /O switch.
  34.  
  35. The QBWiz library provides a way to access many of QuickBasic's
  36. internal variables, which is useful in general and can be
  37. especially handy in writing generic subprograms. The information
  38. provided allows subprograms to do whatever they may need to do
  39. and reset the original values when they exit. Among the
  40. information that may be accessed is what the current screen
  41. colors are, whether the cursor is visible (and if so, what size
  42. it is), what the current display pages are, whether redirection
  43. is in effect, and so forth. It is also possible to set certain
  44. values, like the error level to return to DOS when your program
  45. finishes.
  46.  
  47. Replacements for BCOM45.LIB:
  48.   These routines will not work with Crescent's P.D.Q. library,
  49.   which does not maintain internal compatibility with the
  50.   standard BASIC library.  However, with the exception of the
  51.   PrinterWidth% function, they work fine with my QBTiny library.
  52.  
  53.                           Libraries
  54.  
  55.  
  56.  
  57. If you are not familiar with libraries, you're missing a good
  58. thing. A library is a collection of routines. These may be
  59. subprograms or functions written in BASIC and compiled to .OBJ
  60. format, assembly language routines, or even routines written in
  61. Microsoft C, Fortran or Pascal using the "mixed language"
  62. calling conventions. When your program is compiled, you can LINK
  63. it with one or more libraries. The LINK utility is smart enough
  64. to automatically take just the routines that you use from the
  65. library and add them to your program. A library is a great way
  66. to put together a set of standard routines which you use
  67. frequently. Libraries of this sort can also be obtained from
  68. your local BBS or purchased outright. There are many, many
  69. libraries available, ranging from special-purpose collections
  70. containing such things as communications support or dBASE access
  71. to full-spectrum libraries with hundreds of routines of all
  72. kinds. Don't miss out-- scan your local BBS today!
  73.  
  74. If you were to LINK a normal BASIC program, you'd probably type
  75. something like this:
  76.  
  77.    LINK program/EX;
  78.  
  79. To use the functions in the provided QBWIZ.LIB, you would type
  80. something like this instead:
  81.  
  82.    LINK program/EX,,NUL,QBWIZ;
  83.  
  84. You can use multiple libraries very easily:
  85.  
  86.    LINK program/EX,,NUL,QBWIZ+anylib;
  87.  
  88.                  QuickBasic Access Functions
  89.  
  90.  
  91.  
  92. The QuickBasic Access Functions are contained in the QBWIZ.LIB
  93. library. The function declaration information for this library
  94. is contained in QBWIZ.BI, which should be included at the top of
  95. your programs. Either copy QBWIZ.BI directly into your program
  96. or use an include statement:
  97.  
  98.    REM $INCLUDE: 'QBWIZ.BI'
  99.  
  100. These functions allow you to obtain information from
  101. QuickBasic's internal variables. Many useful values can be
  102. obtained this way that would not be available otherwise.
  103.  
  104.  
  105. The following functions are available:
  106.  
  107. ActPage%         active display page
  108. BackColor%       current text background color
  109. BorderColor%     current border color
  110. ColorBurst%      whether color burst is on: 0 no, -1 yes
  111. CommandLine$     original command line
  112. CRT$             type of display adapter
  113. CursorStart%     starting cursor scan line
  114. CursorStop%      ending cursor scan line
  115. DefSeg%          data segment defined by DEF SEG
  116. ForeColor%       current text foreground color
  117. PrinterWidth%    width of the printer (columns)
  118. RedirIn%         whether input is redirected: 0 no, -1 yes
  119. RedirOut%        whether output is redirected: 0 no, -1 yes
  120. ScreenHeight%    height of the screen (rows)
  121. ScreenMode%      current BASIC screen mode
  122. ScreenWidth%     width of the screen (columns)
  123. ShowCursor%      whether the cursor is visible: 0 no, -1 yes
  124. ViewBottom%      bottom row of the screen (VIEW PRINT info)
  125. ViewTop%         top row of the screen (VIEW PRINT info)
  126. VisPage%         visible display page
  127.  
  128.                  QuickBasic Access Subprograms
  129.  
  130.  
  131.  
  132. The QuickBasic Access Subprograms are contained in the QBWIZ.LIB
  133. library. The function declaration information for this library
  134. is contained in QBWIZ.BI, which should be included at the top of
  135. your programs. Either copy QBWIZ.BI directly into your program
  136. or use an include statement:
  137.  
  138.    REM $INCLUDE: 'QBWIZ.BI'
  139.  
  140. These subprograms allow you to alter information in QuickBasic's
  141. internal variables. This allows you to accomplish some things
  142. that might not otherwise be possible.
  143.  
  144.  
  145. The following subprograms are available:
  146.  
  147. ErrLevel x%      error level to return to DOS when program ends
  148.                  (x% may be from 0 - 255)
  149.  
  150.