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