home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / basic / qlib / video.doc < prev   
Encoding:
Text File  |  1994-01-18  |  43.5 KB  |  1,142 lines

  1.     QLIB VIDEO routines give your programs more control over the
  2.     screen than BASIC allows.  You can save and restore screens,
  3.     print on the screen or read from the screen at blinding speed, use
  4.     dual-monitor systems, use "virtual screens", and use screen color
  5.     attributes not availiable with BASIC alone.
  6.  
  7.     Two kinds of QLIB video routines are available: Direct Video Memory
  8.     (DVM), the fastest available, and BIOS, compatible with a wider range of
  9.     hardware and software.
  10.  
  11.     BIOS video routines use the PC's BIOS and are slower than DVM routines,
  12.     but are more compatible with oddball hardware than comparable QLIB DVM
  13.     subroutines.  NOTE: "oddball hardware" does not mean the average $1.98
  14.     PC clone.  QLIB's DVM subroutines were developed using a cheap XT clone
  15.     with a Hercules-clone graphics card, and work equally well with higher-
  16.     priced equipment.  BIOS video subroutines also work in most graphics
  17.     modes, but background colors may not work as expected.  To use BIOS
  18.     subroutines in Hercules graphics mode, QBHERC or MSHERC must be loaded.
  19.     On computers which have multiple screen pages (except Hercules), BIOS
  20.     subroutines work with the page set by QLIB's TPage subroutine or
  21.     BASIC's SCREEN command.
  22.  
  23.     Some multi-task software, as well as weird hardware, has problems with
  24.     DVM.  With this in mind, several BIOS video subroutines were designed to
  25.     share common calling syntax and function with DVM subroutines, so that
  26.     you may quickly adapt your programs to a variety of situations.
  27.  
  28.     Many of QLIB's video routines support a wide variety of screen
  29.     dimensions.  In addition to the standard 40- and 80-column modes,
  30.     EGA 43-row and VGA 50-row text modes are also supported, and users of
  31.     several EGA and VGA systems may also use 132-column text modes at
  32.     QLIB speed.  With the Hercules Graphics Card Plus and InColor card,
  33.     90-column and 43-row modes are available, which work with QLIB's
  34.     video subroutines.  If you are using other equipment which allows non-
  35.     standard text modes, call me and I may be able to help you.
  36.  
  37.     DVM video subroutines take advantage of PC video systems' known video
  38.     memory addresses and transfer data directly to video memory instead of
  39.     working through DOS or the PC BIOS.  This results in nearly instant
  40.     displays.  DVM also provides additional support for the Hercules Graphics
  41.     Card not available otherwise.
  42.  
  43.     Video hardware configurations supported include Monochrome Display Adapter
  44.     (MDA), Color Graphics Adapter (CGA), Hercules Graphics Card, (HGC),
  45.     Hercules Graphics Card Plus (HGC+), Enhanced Graphics Adapter (EGA),
  46.     Everex Micro Enhancer Deluxe EGA (EEGA), Paradise EGA 480 (PEGA),
  47.     MCGA and VGA.  I have used QLIB with MDA, MCGA, HGC, HGC+, EGA, EEGA,
  48.     PEGA, and several VGA systems.
  49.  
  50.  
  51.     Most video display systems have much more memory than required to display
  52.     a full screen of text.  This additional memory is required when the
  53.     system is used in graphics mode, but it may also be used to advantage in
  54.     text mode.  Screen pages may be used to store help screens, to save one
  55.     screen while another is displayed, or to build one screen while another
  56.     is displayed.  The table below summarizes QLIB's screen page support
  57.     for various video systems.  This should not be considered a complete
  58.     table of information.
  59.  
  60.     system         screen size    page numbers   QuickBASIC/BIOS support
  61.     -------------  -----------    ------------   -----------------------
  62.     MDA            80 x 25        0                    yes    (1)
  63.     CGA            80 x 25        0 - 3                yes
  64.     CGA, EGA, VGA  40 x 25        0 - 7                yes
  65.     EGA, VGA       80 x 25        0 - 7                yes
  66.     EGA            80 x 43        0 - 3                yes
  67.     VGA            80 x 50        0 - 3                yes
  68.     Super EGA/VGA 132 x 25        0 - 3              limited
  69.     Super EGA/VGA 132 x 43        0 & 1              limited
  70.     HGC            80 x 25        0 - 15             limited  (2,3)
  71.     HGC+, InColor  90 x 25        0 - 13             limited  (3)
  72.    
  73.     (1)  MDA systems have enough memory for only one complete screen, but
  74.          virtual screens (see MakeVScreen) and ScreenSave may be used to
  75.          duplicate the effect of multiple screen pages.
  76.  
  77.     (2)  Hercules Graphics Cards and clones have sufficient memory for up
  78.          to 16 screen pages.  These are all available if there is no other
  79.          monitor connected to the computer, no RAMFont characters are used
  80.          and the second 32k of Hercules memory is included in the memory map.
  81.          See Use64k.
  82.  
  83.     (3)  BIOS subroutines work on page 0 only.  BASIC gets confused.
  84.  
  85.     Virtual screens may be used with all video systems.  See MakeVScreen.
  86.  
  87.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  88.  
  89.      Function: ANSIColor
  90.      object file: anscolor.obj
  91.  
  92.          ANSIColor returns the color attribute used by the ANSI.SYS
  93.      console driver.
  94.  
  95.      Example:
  96.  
  97.      REM $INCLUDE: 'qlib.bi'
  98.            attr% = ANSIColor
  99.  
  100.  
  101.  
  102.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103.  
  104.      Subroutine: APrint(st$)
  105.      object file: aprint.obj
  106.  
  107.      Subroutine: APrintN(st$)
  108.      Subroutine: APrintT(st$)
  109.      object file: aprintn.obj
  110.  
  111.          APrint subroutines display the string st$ on the screen using
  112.      ANSI screen colors, begining at the current cursor location.  With
  113.      APrint, the cursor is moved to the end of the string.  APrintN moves
  114.      the cursor to the beginning of the next line, and APrintT adds a TAB,
  115.      moving the cursor past the end of the string.
  116.  
  117.      Example:
  118.  
  119.      CALL APrint(st$)
  120.  
  121.  
  122.  
  123.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  124.  
  125.      Subroutine: BigPrint(st$, row%, col%, attr%)
  126.      object files: bigprint.obj (q$crt.obj)
  127.  
  128.          BigPrint prints st$ on the screen using characters that are
  129.      eight times larger than normal text.  This is handy for attacting
  130.      attention to a display from a distance.  Only characters from
  131.      CHR$(0) through CHR$(127) can be used (but I can add CHR$(128) through
  132.      CHR$(255) if you want).  Only 10 characters will fit across a standard
  133.      80-column screen.
  134.  
  135.      Example:
  136.  
  137.      CALL BigPrint(st$, row%, col%, attr%)
  138.  
  139.  
  140.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  141.  
  142.     Subroutine: BIOSRead(st$, row%, col%)
  143.     object files: biosread.obj
  144.  
  145.          Uses BIOS functions to read a string of text from the active video
  146.     page.  The initial length of st$ determines the length of the string
  147.     returned by BIOSRead.  This is like BPrint in reverse.
  148.  
  149.     Example:
  150.          st$ = SPACE$(14)
  151.          row% = 12: col% = 5
  152.          CALL BIOSRead(st$, row%, col%)
  153.          REM  st$ is now the first 14 characters on the active video page
  154.          REM  beginning at row 12, column 5
  155.  
  156.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  157.  
  158.      Subroutine: BlockFrame(style%, row0%, col0%, row1%, col1%, attr%)
  159.      object file: bframe.obj
  160.  
  161.          BlockFrame is a BIOS version of WindowFrame.  See WindowFrame for
  162.      more documentation.
  163.  
  164.  
  165.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  166.  
  167.      Subroutine: Border(attr%)
  168.      object files: border.obj (getcrt.obj)
  169.  
  170.          Border sets the border color on CGA, EGA and VGA systems.  EGA
  171.      borders are quite thin.  Valid color attributes are 0 - 15.
  172.  
  173.      Example:
  174.          attr% = 1        ' blue
  175.          CALL Border(attr%)
  176.  
  177.  
  178.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  179.  
  180.      Subroutine: Bprint(st$, row%, col%, attr%)
  181.      object file: bprint.obj
  182.  
  183.      Subroutine: BprintL(st$, row%, col%, attr%)
  184.      Subroutine: BprintU(st$, row%, col%, attr%)
  185.      object file: bprintul.obj
  186.  
  187.          These subroutines use BIOS calls to duplicate the functions of
  188.      the Qprint series.  See Qprint for more documentation.
  189.  
  190.  
  191.  
  192.  
  193.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  194.  
  195.     Subroutine: ClearBlock(row0%, col0%, row1%, col1%, attr%)
  196.     object file: scroll.obj
  197.  
  198.          Uses BIOS calls to duplicate the function of WindowClear,
  199.     below.  See WindowClear for additional information.
  200.  
  201.  
  202.  
  203.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  204.  
  205.     Subroutine: ClearEOL(attr%)
  206.     object file: cleareol.obj
  207.  
  208.          Uses BIOS calls to clear a row from the current cursor position
  209.     to then edge of the screen using color attr%.
  210.  
  211.     Example:
  212.          CALL ClearEOL(attr%)
  213.  
  214.  
  215.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  216.  
  217.     Subroutine: ClrScreen(attr%)
  218.     object files: clrscrn.obj (q$crt.obj, q$clrw.obj)
  219.  
  220.          ClrScreen uses DVM to clear the video page set by UseTPage to a
  221.     specified color attribute.  Color attributes may be calculated using
  222.     ColorATTR.
  223.  
  224.     Example:
  225.          CALL ClrScreen(attr%)
  226.  
  227.  
  228.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  229.  
  230.      Subroutine: Clock(row%, col%, attr%)              (QuickBASIC 4.x only)
  231.      Subroutine: NoClock
  232.      object file: qbclock.obj
  233.  
  234.          Clock prints and maintains a clock display on text-mode
  235.      screens at row row% and column col%, printed with color attribute
  236.      attr%.  The clock may be de-activated with NoClock, or may be moved
  237.      by calling clock again.  Clock should be de-activated when using
  238.      graphics modes.
  239.  
  240.      Example:
  241.           CALL Clock(1, 1, 14)     ' activate clock in upper left corner
  242.  
  243.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  244.  
  245.      Function: attr% = ColorAttr(fore%, back%)
  246.      object file: coloratt.obj
  247.  
  248.           Calculates the color attribute (attr%) for many QLIB video
  249.      subroutines.  ColorAttr allows use of the "blink" attribute, which may
  250.      also be used for high-intensity backgrounds (See SetBLINK).
  251.  
  252.  
  253.      Default color values for IBM (and compatible) color displays are:
  254.  
  255.      foreground color   Value
  256.  
  257.          black            0         Note: Background colors 0-7 are
  258.          blue             1         identical to foreground colors 0-7.
  259.          green            2         Background colors 8-15 are identical
  260.          cyan             3         foreground color 8-15 if Blink has
  261.          red              4         been turned off.  If blink is on,
  262.          magenta          5         background colors 8-15 will look like
  263.          brown            6         colors 0-7, and will make the foreground
  264.          "white"          7         blink.
  265.          gray             8
  266.          bright blue      9
  267.          bright green    10
  268.          bright cyan     11
  269.          bright red      12
  270.          bright magenta  13
  271.          yellow          14
  272.          bright white    15
  273.  
  274.     Example:
  275.          REM $INCLUDE: 'qlib.bi'
  276.          REM  I want bright red blinking characters on a green background
  277.          fore% = 12: back% = 10
  278.          attr% = ColorAttr(fore%, back%)
  279.  
  280.  
  281.     (continued on next page)
  282.  
  283.     For IBM Monochrome, Hercules and compatible displays:
  284.  
  285.          foreground value     appearance
  286.  
  287.                 0             black if background% = 0 or 7
  288.                               if background% between 1 and 6,
  289.                               normal if bright% = 0
  290.                               bright if bright% = 1
  291.  
  292.                 1             underlined, or bright + underline if bright% = 1
  293.  
  294.               2 - 7           normal, or bright if bright% = 1
  295.  
  296.          background value     appearance
  297.  
  298.               0 - 6           black
  299.                 7             normal color if foreground% = 0
  300.  
  301.                               bright if blink% = 1, SetBLINK(0)
  302.                                called, and foreground% = 0
  303.  
  304.                               black if foreground% <> 0
  305.  
  306.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  307.  
  308.      Subroutine: CursorColor(attr%)
  309.      object files: curscolr.obj (q$herc.obj)
  310.  
  311.      CursorColor enables the InColor card's color palette and sets the
  312.      cursor color.  If the InColor card in not installed, CursorColor
  313.      does nothing.
  314.  
  315.      Example:
  316.         attr% = 12        ' bright red
  317.                           ' legal color attributes are 1-15
  318.         CALL CursorColor(attr%)
  319.  
  320.  
  321.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  322.  
  323.      Subroutine: CursorON(row%, col%)
  324.      Subroutine: UCursorON(row%, col%)
  325.      Subroutine: CursorOFF
  326.      object file: cursor.obj (q$crt.obj)
  327.  
  328.           CursorON moves the cursor to row%, col%, and makes the cursor
  329.      visible.  An underscore cursor is used if the system is in OVERTYPE
  330.      mode, and the cursor is a larger block if the system is in INSERT mode.
  331.      InsertON and InsertOFF (see EQUIP.DOC) will turn the INSERT mode on
  332.      or off.  UCursorON makes the cursor visible as an underscore regardless
  333.      of the INSERT toggle.  CursorOFF makes the cursor invisible at its current
  334.      location.  Unlike BASIC's LOCATE command, CursorON works with PEGA, EEGA
  335.      and HGC+ extended text modes.  CursorON should not be used to position
  336.      the cursor for a BASIC PRINT command.  To use a text cursor in graphics
  337.      modes, see GCursor in GRAPHICS.DOC.
  338.  
  339.      Example:
  340.        row% = 25: col% = 1
  341.        CALL CursorON(row%, col%)
  342.        REM  this put the cursor in the lower left corner of a standard
  343.        REM  text screen and turned it on.
  344.             .
  345.        CALL CursorOFF
  346.        REM  the cursor is now invisible
  347.  
  348.  
  349.  
  350.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  351.  
  352.     Subroutine: FillEOL(char%, attr%)
  353.     object file: filleol.obj (cleareol.obj)
  354.  
  355.          Uses BIOS calls to fill a row from the current cursor position
  356.     to then edge of the screen using character char%, and color attr%.
  357.     Note that char% is the ASCII character code of the character used.
  358.  
  359.     Example:
  360.          CALL FillEOL(ASCII("w"), attr%)
  361.  
  362.  
  363.  
  364.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  365.  
  366.     Function: bordercolor% = GetBorder
  367.     object file: getbord.asm
  368.  
  369.          GetBorder returns the border (overscan) color on CGA, EGA and VGA
  370.     screens.
  371.  
  372.     Example:
  373.          REM $INCLUDE: 'qlib.bi'
  374.          bordercolor% = GetBorder
  375.  
  376.  
  377.  
  378.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  379.  
  380.     Subroutine: GetCHR(char%, attr%)
  381.     object file: getpos.obj
  382.  
  383.          GetCHR returns the ASCII code char% and color attribute attr% on
  384.     the screen at the current cursor position.
  385.  
  386.     Example:
  387.          CALL GetCHR(char%, attr%)
  388.          PRINT "The character at the current cursor position is " + CHR$(char%)
  389.  
  390.  
  391.  
  392.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  393.  
  394.     Subroutine: GetPOS(row%, col%)
  395.     object file: getpos.obj
  396.  
  397.          Uses BIOS calls to determine the current cursor position.  Similar
  398.     to QB's col% = POS(x) and row% = CSRLIN commands, but works with non-
  399.     standard text screens.
  400.  
  401.     Example:
  402.          CALL GetPOS(row%, col%)
  403.  
  404.  
  405.  
  406.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  407.  
  408.     Function: HRam9025
  409.     object files: hram9025.obj (hmode.obj, q$herc.obj)
  410.  
  411.          Sets Hercules Graphics Card Plus and Hercules InColor cards
  412.     in a 90-column RAMFont mode, using the standard ROM characters, and
  413.     returns a confirmation/error code.  Although testing is incomplete,
  414.     most QLIB video subroutines (either DVM or BIOS) should work with this
  415.     mode on page 0.  Use GetCRT or FindMono to determine if the HGC+ or
  416.     InColor card is in your system, or declare HRam9025 as a function
  417.     (example 2) and use the return code to determine success.  Up to 14
  418.     screen pages are possible with this mode, using QLIB's DVM subroutines.
  419.     See ShowTPage.  When using LineEdit in this mode on pages other than
  420.     page 0, do not use the BIOS output option.  When restoring the monochrome
  421.     monitor to standard text mode, you must use HText (see GRAPHICS.DOC) or
  422.     your screen will become quite confused, and monitor damage is a
  423.     possiblity (though mine survived the testing).
  424.  
  425.     Example 1:
  426.          CALL HRam9025
  427.  
  428.     Example 2:
  429.          DECLARE FUNCTION HRam9025 ()
  430.             .
  431.             .
  432.             .
  433.          a% = HRam9025: IF a% = 0 THEN PRINT "90-column mode not available"
  434.          REM a% = 144 or greater if successful
  435.  
  436.  
  437.  
  438.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  439.  
  440.     Function: HRam9043
  441.     object files: hram9043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  442.  
  443.     Function: HRam8043
  444.     object files: hram8043.obj (hmode.obj, q$herc.obj, hload8x8.obj, f8x8.obj)
  445.  
  446.          Similar to HRam9025 above, but sets RamFont cards to 80- or
  447.     90-column, 43-row mode.  HRam8043 and HRam9043 overwrite stored fonts
  448.     with a standard 8x8 character font.
  449.  
  450.  
  451.  
  452.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  453.  
  454.     Subroutine: HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  455.     object files: hscroll.obj
  456.                  (q$window.obj, q$crt.obj, q$clrw.obj, $wcopy.obj)
  457.  
  458.          A DVM horizontal window scroll routine, scrolling left or right.  The
  459.     area scrolled is limited by row0%, col0%, row1%, col1%.  Positive values
  460.     of columns% will scroll the window left, negative values scroll the window
  461.     right, and columns% = 0 will blank the window.  Columns cleared by the
  462.     scrolling action will be set to color attribute attr%.  See also VScroll.
  463.  
  464.     Example:
  465.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: columns% = 1
  466.          CALL HScroll(row0%, col0%, row1%, col1%, attr%, columns%)
  467.          REM we just scrolled a block of the screen one column left
  468.  
  469.  
  470.  
  471.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  472.  
  473.     Function: pointer% = MakeVScreen(rows%, cols%)
  474.     Subroutine: KillVScreen
  475.     object files: vscreen.obj (q$crt.obj, q$alloc.obj)
  476.  
  477.          MakeVScreen allows QLIB's DVM input and output subroutines to be
  478.     directed to a virtual screen in memory other than video memory.
  479.     MakeVScreen must be called to allocate DOS memory and to establish
  480.     VScreen dimensions before the VScreen can be used.  DVM subroutines
  481.     known to work with virtual screens include:
  482.  
  483.     Qprint         Qread          ClrScreen          WindowFrame
  484.     QprintU        HScroll        ReColorWindow      WindowClear
  485.     QprintL        VScroll        PaintWindow        PaintScreen
  486.     QprintCE       WindowSave     ReColorScreen      QprintW
  487.     ScreenSave     WindowRestore  ScreenSize         TLoad
  488.     TSave
  489.  
  490.     VScreens may be used on MDA-equipped computers to duplicate the effects
  491.     possible with multi-page video systems.  Call UseTPage with page% = -1
  492.     to direct QLIB's DVM subroutines to the virtual screen.  If insufficient
  493.     memory is available for the VScreen, MakeVScreen returns pointer% = 0.
  494.     MakeVScreen also releases any previous VScreen memory before making the
  495.     new VScreen.
  496.     KillVScreen releases the VScreen memory, making it available to the
  497.     BASIC program.  After calling KillVScreen, UseTPage with page% = -1
  498.     will make QLIB use a standard monochrome monitor if one is installed.
  499.  
  500.     Example:
  501.  
  502.     REM The computer has only an MDA display, and we want to build a screen
  503.     REM while another is displayed, then pop the virtual screen into view.
  504.  
  505.     REM $INCLUDE: 'qlib.bi'
  506.     CALL ScreenRows(rows%, cols%)       ' get screen dimensions
  507.     pointer = MakeVScreen(rows%, cols%) ' establish memory screen
  508.     CALL UseTPage(-1, oops)
  509.                         ' QLIB's DVM subroutines will print to the virtual
  510.                         ' screen now.  The screen may be viewed by copying
  511.                         ' to page 0.
  512.     REM  Now we want to pop the virtual screen to the display.
  513.     REM  Since only one VScreen page is possible, you must call UseTPage
  514.     REM  again with page% = 0 otherwise TCopy will not work properly.
  515.     CALL UseTPage(0, oops)
  516.     CALL TCopy(-1, 0, oops)
  517.          .
  518.          .
  519.          .
  520.     REM  All done with this virtual screen, so release the memory so
  521.     REM  that the BASIC program can use it.
  522.     CALL KillVScreen
  523.  
  524.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  525.  
  526.      Function: ModeMono
  527.      Function: ModeColor
  528.      object files: mode.obj (find6845.obj)
  529.  
  530.           ModeMono and ModeColor allow you to switch from monochrome to
  531.      color or color to monochrome monitors if you have a 2-monitor system.
  532.      See EQUIP.DOC to determine what monitors are installed.  After using
  533.      ModeMono or ModeColor, the screen will be cleared.  QLIB's video
  534.      subroutines will work with either monitor.  Be sure to return to the
  535.      original monitor before exiting the program, or QB will get quite
  536.      confused.  ModeColor and ModeMono may be used either as functions
  537.      or as subroutines.  See examples.
  538.  
  539.      Example 1:
  540.          CALL ModeMono   ' if no monochrome monitor is installed, no action
  541.                          ' is taken
  542.  
  543.      Example 2:
  544.          DECLARE FUNCTION ModeMono()
  545.             .
  546.             .
  547.             .
  548.          a% = ModeMono: IF a% THEN CALL Qprint("monochrome monitor",1,1,15)
  549.          REM  a% = 0 if no monochrome monitor installed
  550.          REM  with ModeColor, a% = 0 if no color monitor
  551.          REM  if a% = 3, ModeColor was sucessful
  552.          REM  if a% = 7, ModeMono was sucessful
  553.  
  554.  
  555.  
  556.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  557.  
  558.      Function: Mode43
  559.      object file: mode43.obj
  560.  
  561.           Mode43 sets an EGA system in the standard 80-column, 43-row text
  562.      mode (80 column, 50-row mode for VGA).  Mode43 may be called as a
  563.      subroutine or can be used as a function returning an error flag (see
  564.      examples).  Mode43 may also be used to switch to the EGA or VGA
  565.      monitor in 2-monitor systems.
  566.  
  567.      Example 1:
  568.          CALL GetCRT(crt%)
  569.          IF crt% = 1 OR crt% = 3 THEN CALL Mode43
  570.  
  571.      Example 2:
  572.          DECLARE FUNCTION Mode43% ()
  573.          a% = Mode43: IF a% = 0 THEN PRINT "Mode43 not available"
  574.          REM  a% = 7 if monochrome EGA/VGA, and a% = 3 if color EGA/VGA
  575.  
  576.  
  577.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  578.  
  579.      Function: SVGAOK% = SVGA132(i%)
  580.      object files: svga132.obj ($sega.obj, $svga.obj)
  581.  
  582.           SVGA132 changes video modes on supported systems to 132-column
  583.      modes.  The i% parameter determines the number of screen rows
  584.      requested.
  585.  
  586.      Supported systems are listed under IsSEVGA (see SYSTEM.DOC).  If
  587.      SVGARows is called with no supported system installed, SVGAOK% = 0.
  588.  
  589.      QLIB subroutines which have been tested in these modes are:
  590.  
  591.          Qprint         ClearBlock     WindowRestore    WindowFrame
  592.          QprintCE       LineEdit       PaintWindow      WindowClear
  593.          QprintU        HScroll        ReColorWindow    Scroll
  594.          QprintL        VScroll        ScreenSave       ScreenRestore
  595.          CursorON       QprintW        WindowSave       ClrScreen
  596.          CursorOFF      Qread          ReColorWindow    PaintScreen
  597.          ReColorScreen  TCopy          SetBlink         ScreenSize
  598.          BlockFrame     Bprint         BprintU          BprintL
  599.          TLoad          TSave          GetPOS           VertList
  600.          SetPOS         MovePOS        GetCHR           ScreenRows
  601.          ShowTPage      UseTPage       TPage            BigPrint
  602.          APrint (1)     APrintN (1)    APrintT (1)      PullDown
  603.  
  604.     (1) A replacement for DOS's ANSI.SYS, such as PC Magazine's ANSI.COM
  605.         may provide superior results with these modes.  I can modify
  606.         ANSI.COM to work with your 132-column mode.
  607.  
  608.     Screen rows available are:
  609.  
  610.       i%      rows
  611.  
  612.       0       25
  613.       1       30  (approx)
  614.       2       43  (or 44)
  615.       3       50
  616.       4       60
  617.  
  618.     Note that not all modes are supported by all systems.
  619.  
  620.     BASIC's screen input/output commands, like PRINT and LOCATE, will
  621.     not position the cursor properly in 132 column modes.  Use QLIB's
  622.     subroutines instead.
  623.  
  624.     Use ModeColor or Mode43 to return the system to a standard mode.
  625.     If you do not return to a standard mode before ENDing your program,
  626.     it is likely you will end up with an unreadable screen.
  627.  
  628.     Example:
  629.         REM $INCLUDE: 'qlib.bi'
  630.  
  631.         rows% = 4                  ' I want maximum number of rows
  632. set132mode:
  633.         SVGAOK% = SVGARows(rows%)
  634.         IF NOT SVGAOK% THEN
  635.              rows% = rows% - 1
  636.              IF rows% = -1 THEN GOTO No132mode
  637.              GOTO set132mode
  638.         ENDIF
  639.  
  640.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  641.  
  642.     Subroutine: MovePOS(rows%, cols%)
  643.     object file: movepos.obj
  644.  
  645.          Moves the cursor from its present position by rows% rows and cols%
  646.     columns.  Rows% and cols% may be positive or negative.
  647.  
  648.     Example:
  649.          rows% = -2              ' move the cursor up two rows
  650.          cols% = 0
  651.          CALL MovePOS(rows%, cols%)
  652.  
  653.  
  654.  
  655.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  656.  
  657.     Subroutine: PaintScreen(attr%)
  658.     object files: paint.obj (q$crt.obj, q$paint.obj)
  659.  
  660.          PaintScreen changes the color attribute over the entire screen to
  661.     attr%.  Affects only the video page set by UseTPage.
  662.  
  663.     Example:
  664.          CALL PaintScreen(attr%)
  665.  
  666.  
  667.  
  668.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  669.  
  670.     Subroutine: PaintWindow(row0%, col0%, row1%, col1%, attr%)
  671.     object files: pwindow.obj (q$window.obj, q$crt.obj, q$paint.obj)
  672.  
  673.          DVM routine which changes the color attribute on a block of the
  674.     active video page defined by row0%, col0%, row1%, col1%.  The entire block
  675.     is changed to attr%.  Changes color on video page set by UseTPage.
  676.  
  677.     Example:
  678.          row0% = 1: col0% = 1: row1% = 25: col1% = 80
  679.          CALL PaintWindow(row0%, col0%, row1%, col1%, attr%)
  680.          REM  we just changed the entire screen to color attr% without
  681.          REM  re-printing the text.
  682.  
  683.  
  684.  
  685.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  686.  
  687. THE QPRINT SERIES
  688.  
  689.     QuickPRINT DVM routines print a string of text on the screen at very
  690.     high speed.  QPRINT routines include built-in LOCATE and COLOR statements,
  691.     and do not affect the cursor position.  ALL ASCII characters may be used,
  692.     but QPRINT routines work only in text mode.  Color attributes (attr%) may
  693.     be calculated with ColorATTR.  UseTPage sets QPRINT's active page (Page 0
  694.     only for MDA).
  695.  
  696.     Subroutine: QCenter(st$, row%, attr%)
  697.     object files: qcenter.obj (q$crt.obj, q$qprn.obj)
  698.  
  699.     Subroutine: QPrint(st$, row%, col%, attr%)
  700.     object files: qprint.obj (q$crt.obj, q$qprn.obj)
  701.  
  702.     Subroutine: QPrintU(st$, row%, col%, attr%)
  703.     Subroutine: QPrintL(st$, row%, col%, attr%)
  704.     object files: qprintul.obj (q$crt.obj)
  705.  
  706.     Subroutine: QPrintCE(st$, row%, col%, attr%)
  707.     object files: qprintce.obj (q$crt.obj, q$qprn.obj, q$clrw.obj)
  708.  
  709.          QPrint, the fastest and most compact of the QPRINT series, will
  710.     meet most needs.  QPrintU will print a-z as upper case A-Z, and QPrintL
  711.     will print A-Z as lower case a-z without changing st$.  QPrintCE clears
  712.     the screen from the end of st$ to the right edge of the screen.  QCenter
  713.     qprints the string centered horizontally on the row specified.
  714.  
  715.     Example:
  716.          st$ = "This is a test of fast screen printing"
  717.          row% = 10: col% = 20
  718.          CALL QPrint(st$, row%, col%, attr%)
  719.  
  720.  
  721.  
  722.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  723.  
  724.     Subroutine: QprintVArray(addr%, row0%, col%, attr%, n%)
  725.     object files: qprintva.obj (q$crt.obj, q$qprn.obj)
  726.  
  727.     Subroutine: QprintFArray(segment%, addr%, len(a), row0%, col0%, attr%, n%)
  728.     object files: qprintfa.obj (q$crt.obj, q$qprn.obj)
  729.  
  730.          QprintArray subroutines print n% elements of the string array a$()
  731.     beginning at row0%.  The first array element is printed at row0%, col%,
  732.     the second at row0% + 1, col%, and so on.  QprintVArray is for arrays of
  733.     normal variable-length strings, and QprintFArray is for arrays of QB4's
  734.     fixed-length strings.
  735.  
  736.     Example 1:
  737.          DIM a$(10)          ' 11 array elements, a$(0) through a$(10)
  738.          a$(0) = "This is the first string"
  739.          a$(1) = "This is the second string"
  740.          n% = 5                   ' print a$(0) through a$(4)
  741.          row0% = 5: col% = 10
  742.          addr% = VARPTR(a$(0))    ' a$(0) is the first one to be printed
  743.          CALL QprintVArray(addr%, row0%, col%, attr%, n%)
  744.  
  745.     Example 2:          (QB4+ only)
  746.          DIM a(10) AS STRING*20   ' 11 array elements, each string 20 bytes
  747.          a(0) = "This is the first string"
  748.          a(1) = "This is the second string"
  749.          n% = 5: row0% = 5: col% = 10: l% = LEN(a(0))
  750.          segment% = VARSEG(a(0))
  751.          addr% = VARPTR(a(0))
  752.          CALL QprintFArray(segment%, addr%, l%, row0%, col%, attr%, n%)
  753.  
  754.  
  755.  
  756.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  757.  
  758.     Subroutine: QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  759.     object files: qprintw.obj
  760.                   (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  761.  
  762.          QPrintW adds word wrap to QPrint.  Text is confined to a window of
  763.     the screen defined by row0%, col0%, row1%, col1%, and each line of text
  764.     is broken between words unless the word is longer than the width of the
  765.     window, when the word will be broken at the edge of the window. QPrintW
  766.     also clears all parts of the window not occupied by the string. If st$
  767.     is a nul string, QPrintW will clear the window and return to QuickBASIC.
  768.  
  769.     Example:
  770.          st$ = "This is a test of fast screen printing with word wrap"
  771.          row0% = 10: col0% = 20: row1% = 15: col1% = 50
  772.          CALL QPrintW(st$, row0%, col0%, row1%, col1%, attr%)
  773.  
  774.  
  775.  
  776.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  777.  
  778.     Subroutine: QRead(st$, row%, col%)
  779.     object files: qread.obj (q$crt.obj)
  780.  
  781.          Uses DVM to read a string of text from the active video page.
  782.     The initial length of st$ determines the length of the string returned
  783.     by QRead.  This is like QPrint in reverse.
  784.  
  785.     Example:
  786.          st$ = SPACE$(14)
  787.          row% = 12: col% = 5
  788.          CALL QRead(st$, row%, col%)
  789.          REM  st$ is now the first 14 characters on the active video page
  790.          REM  beginning at row 12, column 5
  791.  
  792.  
  793.  
  794.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  795.  
  796.     Subroutine: ReColorScreen(oldattr%, newattr%)
  797.     object files: recolor.obj (q$crt.obj)
  798.  
  799.          Replaces oldattr% with newattr%, allowing the programmer to
  800.     selectively change screen colors.  Affects only the video page set by
  801.     UseTPage.
  802.  
  803.     Example:
  804.          ReColorScreen(oldattr%, newattr%)
  805.  
  806.  
  807.  
  808.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  809.  
  810.     Subroutine: ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  811.     object files: rcwindow.obj (q$window.obj, q$crt.obj, recolor.obj)
  812.  
  813.          Replaces oldattr% color with newattr% in the window defined by
  814.     row0%, col0%, row1%, col1%, without re-printing the contents of the
  815.     window.
  816.  
  817.     Example:
  818.          oldattr% = 7             ' gray on black to be replaced
  819.          newattr% = 14            ' with bright red on black
  820.          row0% = 10: col0% = 1    ' from row 10, column 1
  821.          row1% = 25: col1% = 80   ' to the end of the screen
  822.          CALL ReColorWindow(row0%, col0%, row1%, col1%, oldattr%, newattr%)
  823.  
  824.  
  825.  
  826.     ScreenRows(rows%, columns%)
  827.     object files: scrnrows.obj (q$crt.obj)
  828.  
  829.         ScreenRows allows you to determine the screen's dimensions.  Rows
  830.     are the vertical dimension and columns are the horizontal dimension.
  831.  
  832.     Example:
  833.         CALL ScreenRows(rows%, columns%)
  834.         REM a standard 80 x 25 screen returns rows% = 25 and columns% = 80
  835.  
  836.  
  837.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  838.  
  839.     Subroutine: ScreenRestore(screenaddr%)
  840.     Subroutine: ScreenSave(screenaddr%)
  841.     object files: screen.obj (q$crt.obj, $wcopy.obj)
  842.  
  843.     Function: ScreenMem
  844.     object files: smem.obj (q$crt.obj, q$alloc.obj)
  845.  
  846.     Uses DVM to save/restore display screen video page set by UseTPage in a
  847.     memory buffer.  ScreenMem calculates the amount of memory required to
  848.     store the screen, allocates the memory, and returns the segment address
  849.     of the memory block.  Use FreeMem(screenaddr%) to release the memory.
  850.  
  851.     Example:
  852.          REM $INCLUDE: 'qlib.bi'
  853.          screenaddr% = ScreenMem
  854.          CALL ScreenSave(screenaddr%)      ' save this screen
  855.             .
  856.             .
  857.             .
  858.          CALL ScreenRestore(screenaddr%)   ' bring the screen back
  859.          CALL FreeMem(screenaddr%)         ' release the memory block
  860.  
  861.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  862.  
  863.     Subroutine: Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  864.     object file: scroll.obj
  865.  
  866.          Uses BIOS calls to scroll a window of the screen lines% rows,
  867.     limited by row0%, col0%, row1%, col1%.  Positive values of lines% will
  868.     scroll the screen up, negative values scroll the screen down, and lines%
  869.     = 0 will blank the window.  Rows cleared by the scrolling action will be
  870.     set to color attribute attr%.
  871.  
  872.     Example:
  873.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  874.          CALL Scroll(row0%, col0%, row1%, col1%, attr%, lines%)
  875.          REM we just scrolled everything in the window up one row
  876.  
  877.  
  878.  
  879.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  880.  
  881.     Subroutine: SetBLINK(a%)
  882.     object file: setblink.obj
  883.  
  884.          Enables / disables blinking attributes in text mode.  When blinking
  885.     is disabled, blinking reverse video attributes are changed from normal
  886.     intensity backgrounds to high intensity.  SetBLINK affects all screen
  887.     pages.
  888.  
  889.     Example:
  890.          a% = 0
  891.          CALL SetBLINK(a%)  ' turn blink off, high intensity backgrounds on
  892.          a% = 1
  893.          CALL SetBLINK(a%)  ' restore blinking attributes
  894.  
  895.  
  896.  
  897.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  898.  
  899.     Subroutine: SetPOS(row%, col%)
  900.     object file: movepos.obj
  901.  
  902.          Positions the cursor at row%, col%.  Similar to QB's LOCATE row, col
  903.     command, but works with non-standard text screens.  Don't use SetPOS to
  904.     position the cursor for a PRINT command.
  905.  
  906.     Example:
  907.          CALL Mode13243       ' use 132-column mode
  908.          row% = 40
  909.          col% = 100
  910.          CALL SetPOS(row%, col%)
  911.  
  912.  
  913.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  914.  
  915.      Subroutine: ShowTPage(page%, oops%)
  916.      object files: tpage.obj (q$crt.obj, q$herc.obj)
  917.  
  918.          ShowTPage allows you to see screen page number page%.  Does
  919.      NOT affect QuickBASIC's PRINT command.  NOTE: ShowTPage will not
  920.      work with MDA or standard Hercules equipment.  On HGC+, ShowTPage
  921.      works with either HText (pages 0 - 3) or HRam9025 (pages 0 - 2) modes.
  922.      Use QLIB's DVM subroutines to print on all Hercules (standard or HGC+)
  923.      pages, and use CursorON to position the cursor.  See also UseTPage and
  924.      TPage.  Oops% = -1 if page% is too big, and oops% = 1 if QLIB can
  925.      use the page but can't display it (as with a standard Hercules page).
  926.      If ShowTPage can't show a page, you can use TCopy to copy the page to
  927.      one that can be shown.
  928.  
  929.      Example:
  930.          CALL ShowTPage(page%, oops%)
  931.  
  932.  
  933.  
  934.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  935.  
  936.     Subroutine: SnowON
  937.     Subroutine: SnowOFF
  938.     object file: crt.asm
  939.  
  940.          Alters "snow" control used by QLIB's DVM subroutines.  QLIB's
  941.     default is SnowON with CGA and MCGA, SnowOFF with other video systems.
  942.     SnowON prevents annoying interference on the screen with older CGA video
  943.     systems.  This "snow" control slows QLIB when used with CGA.  Many newer
  944.     CGA cards do not have the "snow" problem.  SnowOFF disables QLIB's snow
  945.     control logic for maximum speed.  Use SnowOFF if the computer is a
  946.     PS/2 model 25 or model 30 with MCGA.
  947.  
  948.  
  949.     Example:
  950.         REM $INCLUDE: 'qlib.bi'
  951.         PRINT "Do you want to disable the snow control?"
  952.         IF YesNo = ASCII("Y") THEN CALL SnowOFF
  953.  
  954.  
  955.  
  956.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  957.  
  958.     Subroutine: TCopy(frompage%, topage%, oops%)
  959.     object files: tcopy.obj (tpage.obj, q$crt.obj, q$herc.obj, $wcopy.obj)
  960.  
  961.          Similar to BASIC's PCOPY command, TCopy copies one page of video
  962.     memory to another using DVM.  This may be used to save screens to recall
  963.     later.  Oops% will be set to -1 if frompage% is too big, or -2 if
  964.     topage% is too big.  Oops% = 0 if no error.  For MDA systems use
  965.     ScreenSave.
  966.  
  967.     All screen pages saved by TCopy are erased when the system is
  968.     changed to or from Graphics mode.  (Except when using QLIB's HGraph0
  969.     on Hercules systems.  See GRAPHICS.DOC.)  Use ScreenSave to save text
  970.     screens before the system is used in Graphics mode.  TCopy works in all
  971.     multi-page text modes supported by QLIB.
  972.  
  973.     Example:
  974.          CALL TCopy(frompage%, topage%, oops%)
  975.  
  976.  
  977.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  978.  
  979.     Subroutine: TLoad(filename$, oops%)
  980.     object files: tsave.obj (q$crt.obj, $asciiz.obj)
  981.  
  982.         TLoad copies a screen file from a disk to video memory.  Oops%
  983.     returned by TLoad = 0 if no error occurred.  See also TSave.
  984.  
  985.     Example:
  986.         filename$ = "helpfile.hlp"
  987.         CALL TLoad(filename$, oops%)
  988.  
  989.  
  990.  
  991.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  992.  
  993.     Subroutine: TPage(page%, oops%)
  994.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  995.  
  996.          TPage combines the functions of UseTPage and ShowTPage.
  997.  
  998.     Example:
  999.          CALL TPage(page%, oops%)
  1000.          REM this is equivalent to
  1001.          REM  CALL UseTPage(page%, oops%)
  1002.          REM  CALL ShowTPage(page%, oops%)
  1003.  
  1004.  
  1005.  
  1006.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1007.  
  1008.     Subroutine: TSave(filename$, oops%)
  1009.     object files: tsave.obj (q$crt.obj, $asciiz.obj)
  1010.  
  1011.          TSave copies a text-mode screen to a file.  Oops%
  1012.     returned by TSave = 0 if no error occurred.  See also TLoad.
  1013.  
  1014.     Example:
  1015.         filename$ = "helpfile.hlp"
  1016.         CALL TSave(filename$, oops%)
  1017.  
  1018.  
  1019.  
  1020.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1021.  
  1022.     Subroutine: VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  1023.     object files: vscroll.obj
  1024.                   (q$window.obj, q$crt.obj, $wcopy.obj, q$clrw.obj)
  1025.  
  1026.          A DVM vertical window scroll routine.  The area scrolled is limited
  1027.     by row0%, col0%, row1%, col1%.  Positive values of lines% will scroll the
  1028.     screen up, negative values scroll the screen down, and lines% = 0 will
  1029.     blank the block of the screen.  Rows cleared by the scrolling action will
  1030.     be set to color attribute attr%.  See also HScroll.
  1031.  
  1032.     Example:
  1033.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: lines% = 1
  1034.          CALL VScroll(row0%, col0%, row1%, col1%, attr%, lines%)
  1035.          REM we just scrolled a block of the screen one row up
  1036.  
  1037.  
  1038.  
  1039.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1040.  
  1041.     Subroutine: UseTPage(page%, oops%)
  1042.     object files: tpage.obj (q$crt.obj, q$herc.obj)
  1043.  
  1044.          Sets active video page used by most DVM video routines.  See also
  1045.     TPage and ShowTPage.  Oops% = -1 if page% is too big.  Does NOT affect
  1046.     BIOS subroutines.  If page% = -1, QLIB's DVM subroutines will use
  1047.     either a standard 80-column, 25-row monochrome monitor if installed,
  1048.     or a 'virtual' screen established by MakeVScreen.
  1049.  
  1050.     Example:
  1051.          page% = 2
  1052.          CALL UseTPage(page%, oops%)
  1053.          REM  Qread, SaveScreen, PaintWindow, ClrScreen,
  1054.          REM  ClrBlock, VScroll, ReColorWindow, WindowSave, WindowResore,
  1055.          REM  HScroll and the Qprint series will now use screen page 2.
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1061.  
  1062.      Subroutine: WindowClear(row0%, col0%, row1%, col1%, attr%)
  1063.      object files: wclear.obj (q$window.obj, q$crt.obj, q$clrw.obj)
  1064.  
  1065.          Uses DVM to clear a window of the screen from row0%, col0%, to
  1066.      row1%, col1%, where row1% > row0%, col1% > col0%.  The window may be
  1067.      cleared to any color attribute. Color attributes may be calculated
  1068.      using ColorATTR.
  1069.    
  1070.      Example:
  1071.          CALL WindowClear(row0%, col0%, row1%, col1%, attr%)
  1072.  
  1073.  
  1074.  
  1075.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1076.  
  1077.      Subroutine: WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1078.      object files: wfill.obj
  1079.                    (wclear.obj, q$window.obj, q$crt.obj, q$clrw.obj)
  1080.  
  1081.           Fills an area of the screen with specified character and color
  1082.      attribute; this is an alternate entry for the WindowClear subroutine.
  1083.  
  1084.      Example:
  1085.          char%  = ASC("■")
  1086.          CALL WindowFill(row0%, col0%, row1%, col1%, attr%, char%)
  1087.  
  1088.      
  1089.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1090.  
  1091.      Subroutine: WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1092.      object files: wframe.obj
  1093.                    (q$window.obj, q$crt.obj, q$qprn.obj, q$clrw.obj)
  1094.  
  1095.           WindowFrame draws a box with corners at (row0%, col0%),
  1096.      (row0%, col1%), (row1%, col0%), (row1%, col1%).  Double lines are used to
  1097.      draw the box if style% = -1, single lines if style% = 0.  An ASCII
  1098.      character may be used instead of single or double lines, if style% is
  1099.      an integer from 1 to 255.  The border will be made of CHR$(style%).
  1100.  
  1101.      Example:
  1102.          row0% = 5: col0% = 10: row1% = 15: col1% = 75: style% = -1
  1103.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1104.          REM we just drew a box on the screen in color attr%, using
  1105.          REM double lines
  1106.            .
  1107.            .
  1108.            .
  1109.          style$ = "Yellow"
  1110.          style% = ASC(style$)
  1111.          CALL WindowFrame(style%, row0%, col0%, row1%, col1%, attr%)
  1112.          REM we just replaced the double-lined box with a box bordered
  1113.          REM with "Y"
  1114.  
  1115.  
  1116.  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  1117.  
  1118.     Subroutine: WindowSave(windowaddr%, row0%, col0%, row1%, col1%)
  1119.     Subroutine: WindowRestore(windowaddr%, row0%, col0%, row1%, col1%)
  1120.     object files: wsave.obj (q$window.obj, q$crt.obj, $wcopy.obj)
  1121.  
  1122.     Function: wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1123.     object files: wsave.obj (q$alloc.obj, q$window.obj, q$crt.obj)
  1124.  
  1125.     Must compile BASIC source code with /O option
  1126.  
  1127.     WindowSave is used to copy a block of the screen to an array in order
  1128.     to restore the window at a later time with WindowRestore.  WindowMem
  1129.     calculates the size of the memory block needed to store the window and
  1130.     allocates the memory, returning the segment address of the memory block.
  1131.  
  1132.     Example:
  1133.     REM $INCLUDE: 'qlib.bi'
  1134.     row0% = 10: col0% = 10: row1% = 20: col1% = 60
  1135.     wsegment% = WindowMem(row0%, col0%, row1%, col1%)
  1136.     IF wsegment% = 0 THEN ...   ' do error handling stuff - could be too big
  1137.     CALL WindowSave(wsegment%, row0%, col0%, row1%, col1%)
  1138.          .
  1139.          .
  1140.     CALL WindowRestore(wsegment%, row0%, col0%, row1%, col1%)
  1141.     CALL FreeMem(wsegment%)     ' release the memory block
  1142.