home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / a / aplus205.zip / ANSIPLUS.DOC < prev    next >
Text File  |  1992-12-02  |  89KB  |  2,126 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                   ANSIPLUS Enhanced Console Device Driver
  23.  
  24.                          User's Guide, Version 2.05
  25.  
  26.                            Shareware Documentation
  27.  
  28.                               December 2, 1992
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                COPYRIGHT (C) 1991, 1992 by Kristofer Sweger
  64.                      P.O. Box 378, Larkspur, CA 94977
  65.                            All Rights Reserved
  66.  
  67.  
  68. The ANSIPLUS console device driver and supporting utility programs are
  69. Copyrighted (C) 1992 by Kristofer Sweger.  This software and accompanying
  70. documentation are protected by United States Copyright law and also by
  71. International Treaty provisions.  The ANSIPLUS computer program and this
  72. documentation may not be reproduced, copied, disclosed, or transferred in any
  73. form (machine-readable or photo-copy included), except as provided here under
  74. "Limited License" (see page 3), without the express prior written approval of
  75. the author.
  76.  
  77. U.S. Government Information: Use, duplication, or disclosure by the U.S.
  78. Government of the computer software and documentation in this package shall be
  79. subject to the restricted rights applicable to commercial computer software as
  80. set forth in subdivision (b)(3)(ii) of the Rights in Technical Data and Computer
  81. Software clause at 252.227-7013 (DFARS 52.227-7013).  The Contractor/
  82. manufacturer is: Kristofer Sweger, P.O. Box 378, Larkspur, CA 94977.
  83.  
  84.  
  85.                           DISCLAIMER OF WARRANTY
  86.  
  87. Kristofer Sweger makes no warranty of any kind, express or implied, including,
  88. without limitation, any warranties of performance, merchantability and/or
  89. fitness for a particular purpose.  This software and accompanying documentation
  90. are provided "as is," without warranty of any kind.  The entire risk as to
  91. results and performance is assumed by you.
  92.  
  93. Kristofer Sweger shall not be liable for any damages, whether direct, indirect,
  94. consequential or incidental arising from a failure of the ANSIPLUS programs to
  95. operate in the manner desired by the user.  Nor shall Kristofer Sweger be liable
  96. for any data, property or other damages which may be caused directly or
  97. indirectly by use of or inability to use the software, even if Kristofer Sweger
  98. has been advised of the possibility of such damages.  In no event shall the
  99. liability for any damages exceed the price paid for the license to use the
  100. software, regardless of the form and/or extent of the claim.  By using the
  101. software you agree to this.
  102.  
  103. The author further reserves the right to revise or alter the contents of this
  104. documentation or the ANSIPLUS software package from time to time without
  105. notifying any person or group of such changes or alterations.
  106.  
  107. The Limited License and Disclaimer of Warranty shall be construed, interpreted
  108. and governed by the laws of the State of California.
  109.  
  110.                                 TRADEMARKS
  111.  
  112. Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.  IBM
  113. and PS/2 are registered trademarks of IBM Corporation.  Windows is a trademark
  114. of Microsoft Corporation.  Other trademarked names may appear in this manual.
  115. The author states that he is using the trademarked names only for editorial
  116. purposes, and to the benefit of the trademark owner, with no intention of
  117. infringing upon any trademark.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                              Table of Contents
  126.  
  127.  
  128.  
  129.   I. Introduction
  130.  
  131.           Product description . . . . . . . . . . . . . . . . . . . . .  1
  132.           Registration  . . . . . . . . . . . . . . . . . . . . . . . .  2
  133.           Limited License . . . . . . . . . . . . . . . . . . . . . . .  3
  134.           Technical Support . . . . . . . . . . . . . . . . . . . . . .  4
  135.  
  136.  II. Features summary
  137.  
  138.           VGA/EGA display features  . . . . . . . . . . . . . . . . . .  5
  139.           Integrated console functions  . . . . . . . . . . . . . . . .  6
  140.           Other ANSIPLUS features . . . . . . . . . . . . . . . . . . .  7
  141.  
  142. III. Installing ANSIPLUS
  143.  
  144.           Installing the device driver and utility programs . . . . . . 10
  145.           Changing the ANSIPLUS startup configuration . . . . . . . . . 12
  146.  
  147.  IV. Using ANSIPLUS
  148.  
  149.           Special keyboard functions  . . . . . . . . . . . . . . . . . 18
  150.           Selecting and defining colors . . . . . . . . . . . . . . . . 19
  151.           Controlling other ANSIPLUS features . . . . . . . . . . . . . 23
  152.           Editing ANSI escape sequence programs and files . . . . . . . 26
  153.  
  154.   V. ANSIPLUS escape sequences
  155.  
  156.           Overview  . . . . . . . . . . . . . . . . . . . . . . . . . . 27
  157.  
  158.  VI. Technical notes
  159.  
  160.           ANSIPLUS and Windows 3  . . . . . . . . . . . . . . . . . . . 29
  161.           ANSIPLUS extensions and the ANSI standard . . . . . . . . . . 30
  162.           Escape sequence recognizer enhancements . . . . . . . . . . . 30
  163.           Direct access to video RAM vs. BIOS calls . . . . . . . . . . 31
  164.           Installation checks . . . . . . . . . . . . . . . . . . . . . 31
  165.           Hooked interrupts . . . . . . . . . . . . . . . . . . . . . . 32
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179. I.   INTRODUCTION
  180.  
  181. The DOS console device driver provides the critical interface between you and
  182. your personal computer.  It controls the output you see from DOS and accepts
  183. your keyboard input, and you spend a whole lot of time using it.  Unfortunately,
  184. the standard CON and ANSI device drivers supplied with DOS do not take full
  185. advantage of the capabilities of the major video controllers currently in use:
  186. VGA and EGA.  In addition, the standard personal computer BIOS has limitations
  187. that have had to be addressed individually by several TSR programs or device
  188. drivers, by work-arounds and special drivers in major application programs, or
  189. by development of graphic user interfaces such as Windows.
  190.  
  191. The ANSIPLUS console device driver integrates major console elements missing
  192. from DOS and the personal computer BIOS into a single compact device driver that
  193. can easily be controlled and personalized.  With ANSIPLUS installed:
  194.  
  195.  * User interaction with the DOS command shell and many applications will be
  196.    significantly improved.
  197.  
  198.  * Screen output will be faster than with DOS's ANSI and non-ANSI drivers.
  199.  
  200.  * The user will have complete control over colors and VGA/EGA capabilities.
  201.  
  202.  * Users of Windows 3 will have access to ANSIPLUS features in all windowed
  203.    and full screen DOS sessions.
  204.  
  205.  * The user will also benefit from all the other display and keyboard features
  206.    provided by ANSIPLUS.
  207.  
  208. This is a fully functional Shareware copy of the ANSIPLUS product.  As such, it
  209. is made available to the general computing public for evaluation.  Users are
  210. licensed to operate ANSIPLUS on their personal computers for the purpose of
  211. test and evaluation for a limited trial period of thirty days.  After
  212. evaluation, if the user decides the ANSIPLUS programs are not of sufficient
  213. merit to warrant purchase through registration with Kristofer Sweger, all
  214. ANSIPLUS programs should be removed from their personal computer.  If ANSIPLUS
  215. is found to be useful and is in regular use, then registration is required.
  216.  
  217. This manual is organized in six chapters:
  218.  
  219.  * Chapter 1 introduces ANSIPLUS and covers product licensing and support;
  220.  
  221.  * Chapter 2 summarizes ANSIPLUS features for those who want to know what it
  222.    can do;
  223.  
  224.  * Chapter 3 discusses installing and configuring ANSIPLUS on your computer;
  225.  
  226.  * Chapter 4 describes keyboard functions and utility programs accessible to
  227.    users after installation;
  228.  
  229.  * Chapter 5 lists ANSIPLUS escape sequences; and
  230.  
  231.  * Chapter 6 contains several technical notes of interest to programmers and
  232.    others.
  233.  
  234.  
  235.  
  236.                                      1
  237.  
  238.  
  239.                                 REGISTRATION
  240.  
  241. By paying the registration fee for ANSIPLUS, registered users are granted a
  242. license to use the software on any single computer system.  Site licenses for
  243. use of ANSIPLUS on multiple computers are available upon request at a
  244. substantially reduced fee per machine.  Registered users also receive:
  245.  
  246.  * A registered copy of the most recent version of ANSIPLUS.  Registered
  247.    copies of ANSIPLUS don't have that pesky time delay in the sign-on message.
  248.    The registered version is also NOT Shareware, so it may not be copied for
  249.    others.
  250.  
  251.  * A printed copy of the ANSIPLUS manual, which contains detailed documentation
  252.    on using the ANSIPLUS Escape sequences.  This information is provided only in
  253.    the printed manual, and is not included in either the Shareware version or on
  254.    the Registered diskettes.
  255.  
  256.  * Free BBS updates.  Registered ANSIPLUS users can obtain free updates by
  257.    installing future Shareware versions of ANSIPLUS over their registered
  258.    copies.  The ANSIPLUS installation program will automatically register a
  259.    Shareware copy when it is installed on a disk that boots a registered copy.
  260.  
  261. Registration helps support further improvements to ANSIPLUS.  The easiest way to
  262. register ANSIPLUS is to print out the registration form file, REGISTER.pls, fill
  263. it out, and mail it with a check or money order to:
  264.  
  265.           Kristofer Sweger
  266.           P.O. Box 378
  267.           Larkspur, CA 94977
  268.  
  269. Be sure to specify whether you want a 5.25" or 3.5" diskette, and to include the
  270. mailing address for your registered ANSIPLUS and manual.  Pricing is shown in
  271. REGISTER.pls.  California residents must also add sales tax.
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.                                      2
  296.  
  297.  
  298.                               LIMITED LICENSE
  299.  
  300. Non-registered users of ANSIPLUS are licensed ONLY to evaluate the programs and
  301. device driver for up to thirty days for the sole purpose of determining whether
  302. or not it meets their requirements.  All other use requires registration.  Any
  303. other use of non-registered copies of ANSIPLUS by any person, business,
  304. corporation, or government organization, is not permitted.
  305.  
  306. Registered copies of ANSIPLUS may NOT be copied for others.  However, permission
  307. is hereby granted for individuals to copy the non-registered ANSIPLUS package
  308. for their own use (for evaluation and backup purposes) or for other individuals
  309. to evaluate, provided all of the following conditions are met:
  310.  
  311.  * The ANSIPLUS package, including all related program and documentation files,
  312.    cannot be modified in any way and must be distributed in its entirety, with
  313.    no additions.  The following computer files constitute the ANSIPLUS Shareware
  314.    package:
  315.  
  316.      ANSIPLUS.sys        ANSIPLUS console device driver
  317.      ANSIPLUS.doc        ANSIPLUS Shareware documentation
  318.      SETCOLOR.exe        Color control utility program
  319.      SETAPLUS.exe        Driver features control utility program
  320.      ANSICOM.exe         ANSI escape sequence editor
  321.      NEWAPLUS.exe        ANSIPLUS bootup configuration program
  322.      APLUSLIB.exe        Execution library for the utility programs
  323.      SETCOLOR.sch        Color schemes file for SETCOLOR.exe
  324.      CONSETUP.com        Sample escape sequence program
  325.      PUSHVID.com         Save current video mode, video page and colors
  326.      POPVID.com          Restore saved video mode, page and colors
  327.      INSTALL.exe         Installation program
  328.      INSTALL.inf         Installation control file
  329.      REGISTER.pls        ANSIPLUS registration form
  330.      README.pls          Release notes
  331.  
  332.  * No price or other compensation may be charged for the ANSIPLUS package.  A
  333.    distribution cost may be charged for the cost of the diskette, shipping and
  334.    handling, as long as the total per disk does not exceed US $6.00 in the U.S.
  335.    and Canada, or US $10.00 internationally.
  336.  
  337.  * The ANSIPLUS package cannot be bundled or included with other goods or
  338.    services, nor can it be included in any commercial software packaging offer,
  339.    nor can it be "rented" or "leased" to others, without specific prior written
  340.    agreement from Kristofer Sweger.
  341.  
  342. All rights not expressly granted here are reserved to Kristofer Sweger.
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.                                      3
  355.  
  356.  
  357.  
  358.                              TECHNICAL SUPPORT
  359.  
  360. We want our users to be satisfied, and we find the interaction with real users
  361. of ANSIPLUS to be of great value.  Many ANSIPLUS features are the result of user
  362. input.  If you have a problem evaluating ANSIPLUS or want to make a suggestion,
  363. comment, or complaint, please contact us immediately.  We can be reached by mail
  364. at P.O. Box 378, Larkspur, CA 94977, or by telephone at 415/924-5407.
  365.  
  366. The ANSIPLUS technical support telephone line (415/924-5407) can be called
  367. weekdays from 10:00 AM to 5:00 PM, Pacific Time.  We ask that you recognize that
  368. this service can easily be overwhelmed by calls with questions that are already
  369. answered in the documentation provided.  When you do call, please try to have
  370. all your questions (and any necessary supporting data) ready so that we can deal
  371. with them efficiently in one short session.  If you are reporting a software
  372. problem, we will need specific information about your computer system and how to
  373. recreate the problem.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.                                      4
  414.  
  415. II.  FEATURES SUMMARY
  416.  
  417. Although many of the ANSIPLUS features described here may seem technical, each
  418. meets a need, and they all cooperate as parts of one compact console device
  419. driver. In this chapter, they have been collected into three major groups:
  420. VGA/EGA display features, integrated console functions, and other ANSIPLUS
  421. features. The remaining chapters give details regarding specific features.
  422.  
  423.  
  424.                          VGA/EGA DISPLAY FEATURES
  425.  
  426. The ANSIPLUS enhanced DOS console device driver is tailored to take advantage of
  427. VGA and EGA display capabilities:
  428.  
  429. Mode recognition    For any VGA/EGA display mode, the driver can properly
  430.                     address the entire screen. ANSIPLUS automatically recognizes
  431.                     and adapts to various VGA or EGA screen modes, both text and
  432.                     graphics, including extended modes with large numbers of
  433.                     lines and/or columns. ANSIPLUS can also automatically adapt
  434.                     to and compensate for older video controllers with very
  435.                     limited numbers of colors or shades (i.e., CGA or monochrome
  436.                     boards).
  437.  
  438. Speed               In text and in 16-color VGA/EGA graphics display modes, the
  439.                     driver bypasses the ROM BIOS and goes straight to the video
  440.                     RAM, so it can operate much faster than either the original
  441.                     DOS console driver or the DOS ANSI driver. Programs that
  442.                     write large character strings to the standard output
  443.                     (console) file handle in "raw" mode can generate their
  444.                     output many times faster.
  445.  
  446. Color selection     ANSIPLUS provides full control over colors. In color text
  447.                     modes, sixteen foreground and background colors are
  448.                     supported. In 16-color VGA/EGA graphics modes, ANSIPLUS
  449.                     allows mixing of background colors, for a total of 136
  450.                     possible background colors. In 256-color VGA graphics modes,
  451.                     all 256 foreground and background colors are supported.
  452.  
  453. Palette control     Control over VGA/EGA palette registers and VGA DAC registers
  454.                     allows selecting and maintaining colors using the video
  455.                     controller's full capabilities. The driver traps all video
  456.                     mode changes, and installs the palette and/or DAC colors of
  457.                     the user's, or of ANSIPLUS's color scheme. Applications that
  458.                     set their own palettes will continue to do so, but those
  459.                     that do not can now use custom color choices. Blinking can
  460.                     also be kept disabled to allow 16 background colors in text
  461.                     modes.
  462.  
  463. Text size           ANSIPLUS allows selection of alternate VGA/EGA character
  464.                     sets, giving control over the character height, and thus the
  465.                     number of text lines used in any VGA/EGA video mode.
  466.  
  467. Smooth scrolling    ANSIPLUS supports smooth scrolling of the screen (for fast
  468.                     CPUs with 16-bit VGA/EGA), so the screen can be read while
  469.                     it is moving. Options are provided to control the use and
  470.                     rate of smooth scrolling.
  471.  
  472.                                        5
  473.  
  474. Extended modes      The ANSI Set Mode control sequence has been expanded to
  475.                     allow specifying VGA/EGA modes that are based on full AX
  476.                     and/or BX CPU register values, extending ANSI-type control
  477.                     to Super VGA/EGA controllers that require such register
  478.                     settings. Super VGA controllers that conform to the VESA
  479.                     standard are also automatically recognized, and VESA
  480.                     extended set mode calls are made by the ANSIPLUS driver for
  481.                     modes of 100h or higher.
  482.  
  483.  
  484.                        INTEGRATED CONSOLE FUNCTIONS
  485.  
  486. The ANSIPLUS driver efficiently integrates several useful console functions that
  487. in the past had to be provided by separate TSR programs or device drivers:
  488.  
  489. Screen saver        A screen saver blanks the VGA/EGA screen after several
  490.                     minutes of screen, keyboard and mouse inactivity. The screen
  491.                     can be brought back by any keystroke (including shift keys)
  492.                     or by mouse movement or buttons. The screen saver feature
  493.                     can be enabled or disabled by the user, and is automatically
  494.                     disabled in certain situations.
  495.  
  496. Keyboard buffer     As many PC users eventually discover, the standard personal
  497.                     computer BIOS provides a keyboard input type-ahead buffer of
  498.                     only 15 characters, which is enough for only the shortest of
  499.                     commands. ANSIPLUS extends this by 113 keystrokes for a
  500.                     total type-ahead of 128 keystrokes (configurable for more if
  501.                     necessary).
  502.  
  503. Repeated keys       Another problem with the standard BIOS keystroke buffer
  504.                     occurs when keys are held down too long, and the buffer
  505.                     rapidly fills with repeated (or "typeamatic") keys, which
  506.                     are then processed long after the key is lifted. Spreadsheet
  507.                     users often experience this when holding down one of the
  508.                     arrow keys. ANSIPLUS disables repeat key type-ahead, but
  509.                     does allow repeat keys that are immediately consumed by
  510.                     programs, so the type-ahead buffer cannot be filled with
  511.                     unintended keystrokes. Repeated digits are also suppressed,
  512.                     making it impossible to inaccurately enter a number just
  513.                     because a key is held down too long.
  514.  
  515. Scroll-back         Every DOS user sooner or later needs to recall something
  516.                     that was on the screen, but has scrolled off the top.
  517.                     Programmers often encounter this with error messages, and
  518.                     other users with file directory listings. To address this
  519.                     problem, ANSIPLUS supports screen scroll-back: all lines
  520.                     scrolled and cleared from the screen in text modes are
  521.                     captured by the ANSIPLUS driver so that the user can stop at
  522.                     any time and browse through recent screen contents.
  523.  
  524. Scroll lock         Large directory listings and other rapidly generated screen
  525.                     output can often fly by on the screen too fast to be read.
  526.                     Hitting the Scroll Lock key will freeze the screen when
  527.                     ANSIPLUS or the BIOS next tries to scroll it. When the
  528.                     screen is frozen, several keystroke options allow control
  529.                     over subsequent screen output.
  530.  
  531.                                        6
  532.  
  533. Beep tone           The standard personal computer BIOS Control-G beep tone
  534.                     generator waits in a programmed loop until sound output is
  535.                     completed. Sometimes, error or other conditions detected in
  536.                     a running program can generate a rapid sequence of beeps,
  537.                     and the computer will just hang for what seems an eternity,
  538.                     beeping away. ANSIPLUS has an interrupt-controlled tone
  539.                     generator that lets the beep tone be finished in parallel
  540.                     with subsequent processing. Multiple beeps are ignored if a
  541.                     tone is currently being generated, so programs cannot be
  542.                     slowed down by a rapid series of beeps. Options are provided
  543.                     for defining the tone and using or not using the tone
  544.                     generator.
  545.  
  546.  
  547.                           OTHER ANSIPLUS FEATURES
  548.  
  549. Other ANSIPLUS features include:
  550.  
  551. User control        Menu driven utilities give the user full control over
  552.                     selected colors, color palettes, border colors, video modes,
  553.                     text height, key reassignment, beep tone definition, driver
  554.                     table sizes, and all other configurable features.
  555.  
  556. Loading options     At load time, the ANSIPLUS driver can divide itself into
  557.                     sharable code (about 15k) and unshared code/data (about
  558.                     3.5k) sections, placing the shared code in either XMS upper
  559.                     memory blocks (from 640K to 1M) or in high memory (1M to
  560.                     1M+64K) along with DOS 5.0, and leaving only the unshared
  561.                     part in low memory.
  562.  
  563. Bright key echo     ANSIPLUS highlights user-typed keys when they are displayed
  564.                     by DOS on the screen, giving a clear visual separation of
  565.                     typed entries from computer output. If unwanted, this
  566.                     feature can be disabled.
  567.  
  568. ANSI support        All DOS ANSI.sys escape sequences are supported, plus
  569.                     additional ANSI/VT-100 escape sequences for clearing the
  570.                     screen, erasing lines, inserting and deleting lines, and
  571.                     inserting and deleting characters.
  572.  
  573. Windows aware       ANSIPLUS features have been tested and adjusted for maximum
  574.                     compatibility in Windows DOS sessions, both full screen and
  575.                     within a window.  The ANSIPLUS driver detects when Windows
  576.                     is running, and automatically disables or alters certain
  577.                     features, such as the screen blanker, that may interfere.
  578.  
  579. Mono/CGA support    ANSIPLUS should give reasonable and readable displays in all
  580.                     display modes, including those with a very limited number of
  581.                     colors or shades. ANSI-type programs written in terms of 16
  582.                     colors will be executable on machines with simpler video
  583.                     capabilities, if ANSIPLUS is running on that machine.
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                        7
  591.  
  592. Key processing      ANSIPLUS includes several special key processing options:
  593.  
  594.                     (1) the shift-alphabetic keys can cause Caps-Lock to
  595.                         unlock, much like a typewriter releases its shift lock
  596.                         whenever a shift key is pressed;
  597.  
  598.                     (2) the Enter key can restore Caps-Lock after it was
  599.                         unlocked by a shift-alphabetic key, thus restoring Caps
  600.                         on completion of an "entry";
  601.  
  602.                     (3) Control-C can cause a Control-Break, for those users who
  603.                         prefer the Control-C key; and
  604.  
  605.                     (4) the DOS "Non-Destructive" input function can return the
  606.                         last key in the keyboard buffer instead of the first, so
  607.                         that it always reflects what has last been typed.
  608.  
  609. Line wrapping       When the length of a line displayed on the screen exactly
  610.                     equals the width of the screen, the  standard DOS console
  611.                     device drivers cause a blank line to be output. ANSIPLUS
  612.                     suppresses output of these unintended blank lines.
  613.  
  614. Graphics cursor     The DOS console drivers do not show a cursor on the screen
  615.                     when in graphics modes. ANSIPLUS can display a cursor when
  616.                     keyed entries are requested by DOS in a graphics mode.
  617.  
  618. BIOS TTY ANSI       ANSIPLUS provides an option to trap and execute ANSI control
  619.                     sequences in BIOS Int 10h Write TTY output as well as in DOS
  620.                     standard console output.
  621.  
  622. Transparent mode    On occasion, it is undesirable to have the ANSI driver fill
  623.                     in the background color of each character space as it writes
  624.                     characters. ANSIPLUS includes a "transparent" background
  625.                     mode that will write each output character in the current
  626.                     foreground color over whatever background is currently at
  627.                     the cursor position.
  628.  
  629. Text treatments     In 16-color graphics modes, ANSIPLUS can apply bold,
  630.                     underline, black shadow, slant (italics), or black outline
  631.                     text treatments, in any combination, to output characters
  632.                     for emphasis or improved legibility.
  633.  
  634. Esc pass-through    Unlike the ANSI.sys driver, the Esc character is trapped by
  635.                     ANSIPLUS only when followed by a left bracket ("["), so
  636.                     programs that write Esc (a left arrow) to the screen will
  637.                     continue to do so after ANSIPLUS is installed.
  638.  
  639. VGA mono emulation  Because application developers with VGA color monitors
  640.                     sometimes need to see how their systems will look when run
  641.                     with a monochrome VGA monitor, ANSIPLUS provides an option
  642.                     to emulate a monochrome VGA monitor on a color monitor.
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.                                        8
  650.  
  651. Status reporting    To allow programs to query ANSIPLUS about more than just the
  652.                     current cursor location, the device status report has been
  653.                     extended to report information about the current video mode,
  654.                     video page, numbers of rows, columns and colors, current or
  655.                     default definition of colors, and more.
  656.  
  657. Installation checks To facilitate developing applications that can use ANSIPLUS
  658.                     features, ANSIPLUS responds to standard Int 2Fh ANSI.sys
  659.                     installation checks, and includes extensions that can
  660.                     distinguish ANSIPLUS from ANSI.sys.
  661.  
  662. Free BBS Updates    When a Shareware copy of ANSIPLUS is installed on a disk
  663.                     containing a Registered copy, the INSTALL program will
  664.                     convert the new Shareware copy into a Registered copy with
  665.                     the same serial number and signon message as the Registered
  666.                     ANSIPLUS already on the disk.  Registered users can thus
  667.                     benefit from future improvements to ANSIPLUS at no cost, if
  668.                     they have access to a bulletin board system (BBS) that
  669.                     maintains recent Shareware versions of ANSIPLUS.
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.                                        9
  709.  
  710. III. INSTALLING ANSIPLUS
  711.  
  712.  
  713.         INSTALLING THE ANSIPLUS DEVICE DRIVER AND UTILITY PROGRAMS
  714.  
  715. The ANSIPLUS package includes an installation and configuration program called
  716. INSTALL.exe, which should properly handle most installations. INSTALL analyzes
  717. the runtime environment, CONFIG.sys and AUTOEXEC.bat of the target drive,
  718. locates the source files, copies ANSIPLUS to the target drive (or to any
  719. sub-directories of the user's choice), and updates CONFIG.sys and AUTOEXEC.bat.
  720.  
  721. For those who are not content to use default driver settings, the configuration
  722. section of the INSTALL program then lets the user set the startup (boot) driver
  723. table sizes, colors, and feature settings, as well as high memory loading
  724. options that affect CONFIG.sys. These configurations can be performed either at
  725. installation time, or any time later on an installed drive by using the
  726. NEWAPLUS.exe program. Context sensitive help (via the F1 key) is provided for
  727. all entries. Startup configuration changes are described in the following
  728. section, starting on page 12.
  729.  
  730. The INSTALL program gives an opportunity (via the Installation menu) to set the
  731. destination directory for each installed file or for classes of files. If the
  732. directory is not specified for a file, the following assumptions will apply:
  733.  
  734.  * If an ANSIPLUS file name matches the name of a file in the default directory,
  735.    root directory, or on the system PATH of the destination drive, then the
  736.    ANSIPLUS file will be copied over the matched file (i.e., updated). This is
  737.    intended to make installation of ANSIPLUS updates a snap.
  738.  
  739.  * New files are added to a directory for each class of file (i.e., driver,
  740.    utility program, or documentation/other). If any file in the class is being
  741.    updated, then the class directory will be the same as the updated files.
  742.    Otherwise, the class directory will be "\ANSIPLUS".
  743.  
  744. It is recommended that you put all of the ANSIPLUS utility programs (SETCOLOR,
  745. SETAPLUS, ANSICOM, NEWAPLUS and APLUSLIB) on your system PATH so that they can
  746. be used easily. It is critical that the execution library, APLUSLIB.exe, be
  747. located either in the same directory as the other utility programs or on the
  748. system PATH. If it is not, the utility programs will not run! You may also want
  749. to place the ANSIPLUS.sys device driver in the root directory.
  750.  
  751. Before installing ANSIPLUS, or any other new device driver, be sure you have a
  752. bootable floppy disk as insurance against trouble getting your system to run
  753. after the device driver is installed.
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.                                        10
  768.  
  769.  
  770. International users should be aware of the following:
  771.  
  772.  * If you are using the KEYB program to set up your keyboard, the following
  773.    command MUST be executed after you load KEYB, otherwise most ANSIPLUS
  774.    keyboard related features will not work:
  775.  
  776.             SETAPLUS LINK KEYEVENT
  777.  
  778.    The INSTALL program will automatically add this command to your AUTOEXEC.bat
  779.    file if it finds a reference in it to KEYB.
  780.  
  781.  * If you are using the DISPLAY.sys device driver for code page switching, the
  782.    ANSIPLUS.sys device driver must be installed before DISPLAY.sys in your
  783.    CONFIG.sys file.  The INSTALL program will also automatically handle this.
  784.  
  785. The following three examples illustrate using INSTALL to install ANSIPLUS:
  786.  
  787.  * If you received ANSIPLUS on a floppy disk and want to install it on your hard
  788.    disk, use the following installation procedure:
  789.  
  790.      (1) Set the default directory to the hard disk (i.e., get a C> prompt).
  791.  
  792.      (2) Insert the ANSIPLUS diskette in drive A: (or other floppy drive).
  793.  
  794.      (3) Enter the following command:
  795.  
  796.             A:INSTALL
  797.  
  798.  * If you received ANSIPLUS as a ZIP file, use the following procedure:
  799.  
  800.      (1) Create a sub-directory on the hard disk to contain the unzipped
  801.          ANSIPLUS files. Move ANSIPLUS.zip to this directory and make it be the
  802.          default directory.
  803.  
  804.      (2) Unzip the files into the directory with the command:
  805.  
  806.             PKUNZIP ANSIPLUS
  807.  
  808.      (3) Then enter the command:
  809.             INSTALL
  810.  
  811.  * To install ANSIPLUS on bootable disk B:, from hard disk directory C:\APLUS,
  812.    enter the command:
  813.  
  814.             C:\APLUS\INSTALL B:
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.                                        11
  827.  
  828.                 CHANGING THE ANSIPLUS STARTUP CONFIGURATION
  829.  
  830. Changes to the startup configuration for ANSIPLUS are made with the NEWAPLUS.exe
  831. program. (INSTALL also lets you make these changes, but INSTALL.exe is actually
  832. a tiny program that calls NEWAPLUS.exe to perform the installation.) You run
  833. NEWAPLUS with a command of the form:
  834.  
  835.             NEWAPLUS <target>
  836.  
  837. where <target> is the drive letter for a bootable diskette or hard disk
  838. partition with ANSIPLUS installed. If <target> is omitted, the current default
  839. drive will be used or, if it isn't bootable, the drive referred to by the
  840. COMSPEC system environment variable. After NEWAPLUS confirms that the target
  841. disk contains ANSIPLUS, you are presented with a startup configuration menu that
  842. has nine revision option groups:
  843.  
  844. Initial Colors
  845.  
  846.  * Color selection sub-menus let you choose from the current 16-color palette
  847.    the screen colors that will be used for text foreground and background when
  848.    the system starts up. ANSIPLUS maintains two sets of foreground and
  849.    background colors: those that are currently on the screen, and "default"
  850.    colors to be applied when an ANSI Set Graphics Rendition reset (i.e., Esc
  851.    [0m) is detected. The startup selections for both color combinations can be
  852.    controlled from this sub-menu.
  853.  
  854. Palette Definition
  855.  
  856.  * The color palette determines the precise colors you will see in 16 color
  857.    video modes. ANSIPLUS maintains two palettes: the current palette on the
  858.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  859.    whenever the video display mode is changed. All changes you make using the
  860.    NEWAPLUS color palette option will apply to the default palette.
  861.  
  862. Border Color
  863.  
  864.  * The border color is generated for the "overscan" region on the outside edges
  865.    of the screen. You can select any available color as the default border
  866.    color, which will be installed when ANSIPLUS starts up and whenever the
  867.    display mode is set.
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.                                        12
  886.  
  887. Loading Option
  888.  
  889.    ANSIPLUS can be loaded into memory up to four different ways, depending on
  890.    your computer's capabilities and what is contained in CONFIG.sys:
  891.  
  892.  * ANSIPLUS can be loaded into low memory below 640K. This is the default.
  893.  
  894.  * ANSIPLUS can load itself into upper memory blocks. At load time, the driver
  895.    can divide itself into two sections: sharable code totaling about 15k, and
  896.    unsharable code/data totaling about 3.5k. The shared code can be placed in
  897.    either XMS upper memory blocks (from 640K to 1M) or in high memory (1M to
  898.    1M+64K) along with DOS 5.0, leaving only the unsharable 3.5k in low memory.
  899.    Because all ANSIPLUS driver data remains in low memory as part of the DOS CON
  900.    driver, it will be localized under Windows 3.0. Under DOS 5.0, this option
  901.    should work whether DOS=UMB appears in CONFIG.sys or not. The following
  902.    CONFIG.sys command loads ANSIPLUS into the XMS upper memory blocks:
  903.  
  904.        DEVICE=ANSIPLUS.sys /U
  905.  
  906.  * Under DOS 5.0, with the DOS=HIGH line in CONFIG.sys, ANSIPLUS can load itself
  907.    into high memory addressed just above 1 megabyte. This area contains 64k, but
  908.    DOS may require only about half of it, leaving the remainder either unused or
  909.    allocated to disk buffers or other tables. ANSIPLUS can load itself into this
  910.    area and share the space with DOS. However, when this is done, certain
  911.    (antique) programs that assume memory addresses over one megabyte will "wrap
  912.    around" to addresses starting at zero may not operate correctly. If you
  913.    experience any problems, load ANSIPLUS into XMS upper memory blocks instead.
  914.    The following CONFIG.sys command will load ANSIPLUS into the DOS 5.0 high
  915.    memory area:
  916.  
  917.        DEVICE=ANSIPLUS.sys /H
  918.  
  919.  * ANSIPLUS can be loaded high by DEVICEHIGH or equivalent. Users of Windows 3.0
  920.    and EMM386, QEMM, or DOS 5.0 should note: With DOS 5.0 (using DEVICEHIGH and
  921.    EMM386), or with other XMS drivers such as QEMM (using LOADHI), ANSIPLUS can
  922.    be loaded into upper memory blocks above 640k to provide a 17k larger program
  923.    area below 640k. However, if Windows 3.0 will be run in 386 Enhanced mode, it
  924.    is strongly recommended that ANSIPLUS (or any other ANSI driver) not be
  925.    loaded into high memory by these methods. This is because Windows 3.0 does
  926.    not localize the XMS upper memory block area above 640k for its virtual
  927.    8086's, and so only one global copy of ANSIPLUS would be shared among all
  928.    virtual machines. This can cause trouble: if, for example, a program in one
  929.    window selects colors, then those colors would also be in force for all DOS
  930.    programs in other windows!  This localization problem appears to have been
  931.    fixed in Windows 3.1.
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.                                        13
  945.  
  946. Color Control
  947.  
  948.  * The ANSIPLUS driver ordinarily traps all video mode changes and installs the
  949.    palette and/or DAC colors of the user's, or of ANSIPLUS's default color
  950.    scheme. Applications that set their own palettes will continue to do so, but
  951.    those that do not will use the installed color choices. If this feature is
  952.    disabled, the VGA/EGA controller manufacturer's colors will be loaded when
  953.    the video mode changes.
  954.  
  955.  * In color text modes, the VGA and EGA allow either sixteen background colors
  956.    with no blinking foreground text, or eight background colors with foreground
  957.    text that may or may not blink. In monochrome text mode 07h, when blinking is
  958.    disabled there are three backgrounds possible: black, gray or white, and with
  959.    blinking enabled there are two: black and gray. If blinking is disabled,
  960.    ANSIPLUS will display sixteen (or three) background colors, and when it is
  961.    enabled, you will see only eight (or two) background colors.
  962.  
  963.  * ANSIPLUS highlights user-typed keys when they are displayed on the screen,
  964.    giving a clear visual separation of typed entries from computer output. Over
  965.    dark backgrounds, the key is shown in white, and over light backgrounds it is
  966.    shown in black. If this feature is not wanted, it can be disabled.
  967.  
  968.  * Because application developers with VGA color monitors sometimes need to see
  969.    how their systems will look when run with a VGA monochrome monitor, ANSIPLUS
  970.    provides emulation of monochrome monitor VGA on a color monitor. In normal
  971.    operation, this feature should be disabled.
  972.  
  973. Display Control
  974.  
  975.  * The ANSIPLUS screen saver blanks the VGA/EGA screen after several minutes of
  976.    screen, keyboard and mouse inactivity. The screen is brought back by any
  977.    keystroke, including shift keys, or, if a mouse is connected, by moving it or
  978.    pressing a button. The screen saver is automatically disabled under Windows
  979.    and when certain games or other programs that take over the timer are
  980.    running, and does not interfere with any known programs. However, if this
  981.    feature is not desired, it can be turned off.
  982.  
  983.  * The time of inactivity before the screen goes blank is configurable between
  984.    one and twenty minutes.
  985.  
  986.  * During periods of keyboard inactivity, ANSIPLUS's screen saver uses MS mouse
  987.    Int 33h calls to test the status of the mouse. In the unlikely event these
  988.    calls interfere with the mouse driver, they can be disabled.
  989.  
  990.  * On the IBM PS/2, the mouse is usually connected to the pointing device port,
  991.    and mouse activity will cause interrupts on the Mouse Event interrupt number
  992.    74h, so ANSIPLUS monitors this interrupt to unblank the screen. If the screen
  993.    fails to go blank after a long idle period, or if this interrupt is used for
  994.    another purpose, this feature should be disabled.
  995.  
  996.  * The DOS console drivers do not show a cursor on the screen when using a
  997.    graphics mode. ANSIPLUS displays a pseudo-cursor when keyed entries are
  998.    requested by DOS in a graphics mode. If this feature interferes with the
  999.    appearance of a graphics mode program, it can be disabled.
  1000.  
  1001.  
  1002.  
  1003.                                        14
  1004.  
  1005.  * Programs that write screen output using ROM BIOS Int 10h Function 14 (Write
  1006.    TTY) ordinarily cannot use ANSI Escape sequences for screen control. ANSIPLUS
  1007.    includes a feature to allow this.
  1008.  
  1009.  * When the VGA/EGA video controller does not allow setting a palette register
  1010.    unless a vertical retrace is in progress, or when "snow" or other problems
  1011.    occur during palette color changes, ANSIPLUS provides an option to wait for a
  1012.    vertical retrace whenever setting a palette register. Otherwise, this feature
  1013.    should remain disabled.
  1014.  
  1015.  * ANSIPLUS contains an internal stack for saving and restoring video context
  1016.    information (rows and columns, colors, display modes, etc.). The default size
  1017.    allows 25 pushes, but this can be configured to a larger value if needed.
  1018.  
  1019. Screen Scrolling
  1020.  
  1021.  * ANSIPLUS uses the Scroll-Lock key as a hot key for freezing fast screen
  1022.    output and for activating screen scroll-back. If these features are not
  1023.    desired, or to run those few applications that use Scroll-Lock for other
  1024.    purposes, the ANSIPLUS Scroll-Lock key can be disabled. However, before you
  1025.    completely disable ANSIPLUS's Scroll-Lock key, try the Alt-Scroll-Lock
  1026.    combination instead (see next option).
  1027.  
  1028.  * An alternative hot key is Alt-Scroll-Lock. If this key is enabled, the Alt
  1029.    key must be pressed simultaneously with the Scroll-Lock key to cause the
  1030.    ANSIPLUS Scroll-Lock function to be activated. If it is disabled, the
  1031.    Scroll-Lock key will function with or without any other simultaneous key.
  1032.  
  1033.  * As lines are scrolled off the top of the screen, the ANSIPLUS driver can save
  1034.    them for later viewing. This viewing is called screen scroll-back. Most of
  1035.    the time this is a very useful and unobtrusive feature, but if it is
  1036.    undesired, or if storage of the saved lines in unused portions of the video
  1037.    RAM is found to interfere with something, it can be disabled.
  1038.  
  1039.  * On most computers, screen scroll-back should operate correctly under Windows.
  1040.    However, when using 256-color video drivers, Windows 3.0 and 3.1 may not
  1041.    provide a full 32k of text RAM to DOS applications running in a window.
  1042.    ANSIPLUS attempts to compensate for this, but because of the potential for
  1043.    disaster when ANSIPLUS tries to save or view lines for scroll-back, the
  1044.    default setting for scroll-back under Windows is to be disabled. If you run
  1045.    all DOS applications full screen, or if Windows and scrolling-back in a
  1046.    window work correctly in an experiment on your system, this feature should be
  1047.    enabled.
  1048.  
  1049.  * ANSIPLUS captures for scroll-back all standard DOS output that is scrolled
  1050.    off the top of the screen or cleared from the screen. An option is provided
  1051.    to capture full lines scrolled off the top by BIOS calls, as well as screens
  1052.    not containing DOS output, when they are cleared by BIOS call.
  1053.  
  1054.  * Every time that video page 0 (the normal video page for all DOS output) is
  1055.    cleared, the first through last non-blank lines on the screen (plus one above
  1056.    and below) are captured for scroll-back. When the second and higher video
  1057.    pages are cleared, they will not be saved unless lines have been scrolled off
  1058.    the top. An option is provided to capture the higher video pages too when
  1059.    they are cleared.
  1060.  
  1061.  
  1062.                                        15
  1063.  
  1064.  * ANSIPLUS stores captured screen lines in unused parts of the video RAM, with
  1065.    usage based on whether a display page has ever been selected for display.
  1066.    Virtually all text mode applications select a page before filling it with
  1067.    text, so ANSIPLUS should generally know what is used and what isn't. However,
  1068.    if an application fills the second or a higher video page with text before
  1069.    that page has ever been selected, ANSIPLUS will clear it when it is selected.
  1070.    This option may fix such a problem by protecting the second video display
  1071.    page from scroll-back storage, but maximum capacity for scroll-back will be
  1072.    reduced by one page.
  1073.  
  1074.  * Smooth scrolling can gradually move the entire screen's text up so it can be
  1075.    read while it moves. This feature can also be toggled on and off by the
  1076.    Shift-Scroll Lock key combination. Smooth scrolling will appear unacceptably
  1077.    choppy on computers with lower powered CPUs and/or video controllers that
  1078.    cannot move a full screen of text in the video RAM completely during a
  1079.    vertical retrace. If this occurs, the feature should not be used.
  1080.  
  1081.  * Smooth scrolling can be disabled under Windows. If smooth scrolling does not
  1082.    perform well in full screen DOS sessions under Windows, or if there are other
  1083.    problems, then this should be done.
  1084.  
  1085.  * Because it takes time to smoothly scroll the screen, smooth scrolling of
  1086.    large amounts of screen output can significantly delay the computer. An
  1087.    option is provided to increase the scrolling rate when the smooth scrolling
  1088.    operation is taking a significant proportion of the computer's time. This can
  1089.    help, for example, to prevent data overruns when smooth scrolling is used
  1090.    with a communications program that scrolls the entire screen.
  1091.  
  1092. Keyboard
  1093.  
  1094.  * By default, ANSIPLUS increases the keyboard buffer capacity to 128
  1095.    characters, which should hold at least as much as most users can type ahead
  1096.    accurately. To expand the computer's keyboard buffer capacity, an extension
  1097.    buffer is retained within ANSIPLUS, and whenever the ROM BIOS buffer has
  1098.    space available for keys held in the ANSIPLUS buffer, they are moved into the
  1099.    standard ROM BIOS buffer.  You configure this buffer by specifying the total
  1100.    number of keys to be buffered.
  1101.  
  1102.  * ANSIPLUS has the ability to translate single keystrokes to full commands or
  1103.    other pre-determined key sequences. This feature is called key reassignment,
  1104.    and it can be enabled or disabled without affecting the contents of the key
  1105.    reassignment tables stored within the ANSIPLUS device driver.
  1106.  
  1107.  * The space allocated for storing ANSI keystroke reassignments may also be
  1108.    configured. Each key reassignment requires approximately four bytes plus the
  1109.    length of the reassignment. You configure the total table size in bytes.
  1110.  
  1111.  * Normally, the Caps Lock key locks the alphabetic keys in upper case, and when
  1112.    a shift key is held down, letters are entered in lower case. This continues
  1113.    until Caps Lock is pressed again to unlock the Caps, and can often be
  1114.    confusing if you forget that Caps were locked. ANSIPLUS has an option to have
  1115.    shift-alphabetic keys cause the Caps to unlock, much like a typewriter
  1116.    releases its shift lock whenever a shift key is pressed.
  1117.  
  1118.  
  1119.  
  1120.  
  1121.                                        16
  1122.  
  1123.  * In many cases, when Caps Lock has been released by a shift-alphabetic key
  1124.    combination, mixed upper and lower case characters are needed for only a
  1125.    single entry, and Caps Lock should be reinstated thereafter. ANIPLUS includes
  1126.    an option to turn Caps Lock back on again when the Enter key is pressed after
  1127.    Caps were unlocked by a shift-alphabetic key, thus restoring Caps Lock on
  1128.    completion of an "entry."
  1129.  
  1130.  * For those users who find it more convenient to break out of programs with the
  1131.    Control-C key combination than with Control-Break, ANSIPLUS has an option to
  1132.    generate a keyboard break whenever Control-C is entered.
  1133.  
  1134.  * The "Non-Destructive" input function of DOS's BIOS reads an input key from
  1135.    the keyboard unofficially just to see what it is, allowing it to really be
  1136.    read later. This function is used to see what has been typed, and to read it
  1137.    or flush the keyboard buffer only if it matches some criterion (such as
  1138.    Escape or Control-C). Because the standard DOS keyboard driver always looks
  1139.    at the first key in the buffer, if it doesn't meet the criterion, no matter
  1140.    what is typed later will not be checked. ANSIPLUS gets around this with an
  1141.    option to return the last key from the buffer instead of the first.
  1142.  
  1143. Tone Definition
  1144.  
  1145.  * The ANSIPLUS driver includes a timer-interrupt controlled Control-G beep tone
  1146.    generator that lets the beep tone be finished in parallel with subsequent
  1147.    processing. Multiple beeps are ignored if a tone is currently being output,
  1148.    so programs cannot be slowed down by a rapid series of beeps. The tone
  1149.    generator is used for both standard DOS console output and BIOS Int 10h Write
  1150.    TTY calls. If the tone generator is disabled, the original DOS beep tone will
  1151.    be used.
  1152.  
  1153.  * When Windows 3 is running in 386 mode, and a DOS program running in the
  1154.    background outputs a Control-G, the background program's virtual 8086 may not
  1155.    be running fast enough to accurately time the tone. Because of this, the tone
  1156.    can drag out and sound strange. Disabling ANSIPLUS tone generation under
  1157.    Windows restores the original Windows sound driver, but makes the tone
  1158.    frequency and duration non-configurable.
  1159.  
  1160.  * The beep tone definition is stored in a table in the ANSIPLUS driver that
  1161.    requires four bytes per frequency and duration. You can configure the size of
  1162.    this table by specifying the maximum number of notes allowed in the beep.
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.                                        17
  1181.  
  1182. IV.  USING ANSIPLUS
  1183.  
  1184. This chapter describes your controls over ANSIPLUS when it is running. Four
  1185. subjects are covered: special keyboard functions; selecting and defining colors
  1186. with the SETCOLOR.exe utility program; controlling other ANSIPLUS features with
  1187. the SETAPLUS.exe utility program; and creating and editing ANSI-type escape
  1188. sequence programs and files with the ANSICOM.exe program.
  1189.  
  1190.                         SPECIAL KEYBOARD FUNCTIONS
  1191.  
  1192. ANSIPLUS uses special keyboard control to implement its scrolling functions. To
  1193. activate these, the Scroll-Lock (or Alt and Scroll-Lock) key is used as a hot
  1194. key toggle:
  1195.  
  1196.   Scroll-Lock       enables or disables screen scroll freezing and scroll-back
  1197.   Shift-Scroll-Lock enables or disables smooth scrolling
  1198.  
  1199. When your Scroll-Lock toggle is recognized by the computer, you will hear a
  1200. short tone. When the screen is frozen by Scroll-Lock, (as indicated by the light
  1201. on enhanced keyboards), normal key input is disabled and the following keys
  1202. apply:
  1203.  
  1204.   Home          Go to the top of the lines saved for scroll-back
  1205.   PageUp        Scroll up one page
  1206.   Shift         Scroll up one-half page tab
  1207.   Up arrow      Scroll up one line
  1208.  
  1209.   End           Go to the bottom (i.e., the original screen display)
  1210.   PageDn        Scroll down one page
  1211.   Tab           Scroll down one-half page
  1212.   Down arrow    Scroll down one line
  1213.  
  1214.   Insert        Save the current screen page for later scroll-back
  1215.   Left          View a lower numbered display page arrow
  1216.   Right         View a higher numbered display page arrow
  1217.   Escape        Cancel scroll lock, return to normal key processing
  1218.   Scroll lock   Cancel scroll lock, return to normal key processing
  1219.  
  1220. If you try to exceed the limit of travel up, down, left or right, a short low
  1221. pitched tone will sound. If you enter any key other than those above, you will
  1222. hear a short warbling sound, Scroll Lock will be canceled, the screen will
  1223. return to its normal display, and the key will be passed back to the running
  1224. program. If the screen was frozen during output, the PageDn, Tab and Down arrow
  1225. keys will allow one page, one-half page, and one line of additional output,
  1226. respectively, before freezing the screen again. Pressing a shift key will
  1227. release the screen as long as the key is held down.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.                                        18
  1240.  
  1241.                        SELECTING AND DEFINING COLORS
  1242.  
  1243. The SETCOLOR.exe utility program provides extensive control over colors for your
  1244. running system. With this program, the user can view the current colors, select
  1245. colors for use, create and apply named color schemes, edit the color palette,
  1246. set the border color, and save and load color definitions. SETCOLOR.exe is
  1247. executed by a command of the form:
  1248.  
  1249.         SETCOLOR <keyword> [<keyword> ...]
  1250.  
  1251. where each <keyword> selects a foreground or background color or other option.
  1252. If no <keyword> is supplied, you are presented with a menu of choices:
  1253.  
  1254.  * Color selection submenus let you choose from the current 16-color palette
  1255.    the screen colors that will be used for text foreground and background.
  1256.    ANSIPLUS maintains two sets of foreground and background colors: those that
  1257.    are currently on the screen, and default colors to be applied when an ANSI
  1258.    Set Graphics Rendition reset (i.e., Esc [0m) is detected. You can control
  1259.    both color combinations from this sub-menu.
  1260.  
  1261.  * The color palette determines the precise colors you will see in 16 color
  1262.    video modes. ANSIPLUS maintains two palettes: the current palette on the
  1263.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  1264.    whenever the video display mode is changed. You can control both palettes
  1265.    using this option, but unless you specifically set the default for each color
  1266.    you redefine, your colors will only apply until the next display mode change.
  1267.  
  1268.  * The border color is generated for the "overscan" region on the outside edges
  1269.    of the screen. Again, ANSIPLUS maintains both a current border color and a
  1270.    default border color. You can select any available color as border color, and
  1271.    can control both the current and default borders with this option. As for
  1272.    palette changes, unless you specifically set the default border color, your
  1273.    border color will apply only until the next display mode change.
  1274.  
  1275. From the command line, colors may be selected by name or code number, where
  1276. codes 0-15 identify the 16 palette colors, 128-143 select foreground colors, and
  1277. 192-207 select background colors. The relationship between color names and code
  1278. numbers is depicted in Table 4-1:
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.                                        19
  1299.  
  1300.        +--------------------------------------------------------+
  1301.        |                      Table 4-1                         |
  1302.        |                Color Names and Codes                   |
  1303.        +-------------------+--------+--------------+------------+
  1304.        |                   | Color  |  Foreground  | Background |
  1305.        | Color Name        |  Code  |     Code     |    Code    |
  1306.        +-------------------+--------+--------------+------------+
  1307.        |                   |        |              |            |
  1308.        | BLACK             |    0   |      128     |     192    |
  1309.        | DKGRAY            |    8   |      136     |     200    |
  1310.        | GRAY              |    7   |      135     |     199    |
  1311.        | WHITE             |   15   |      143     |     207    |
  1312.        | RED               |    9   |      137     |     201    |
  1313.        | DKRED             |    1   |      129     |     193    |
  1314.        | BROWN             |    3   |      131     |     195    |
  1315.        | YELLOW            |   11   |      139     |     203    |
  1316.        | GREEN             |    2   |      130     |     194    |
  1317.        | LTGREEN           |   10   |      138     |     202    |
  1318.        | CYAN              |    6   |      134     |     198    |
  1319.        | LTCYAN            |   14   |      142     |     206    |
  1320.        | BLUE              |    4   |      132     |     196    |
  1321.        | LTBLUE            |   12   |      140     |     204    |
  1322.        | MAGENTA or PURPLE |    5   |      133     |     197    |
  1323.        | LTMAGENTA or PINK |   13   |      141     |     205    |
  1324.        +-------------------+--------+--------------+------------+
  1325.  
  1326. In 256 color modes, you may also use 256-511 to select the foreground, 512-767
  1327. to select the background, or 0-255 after the BORDER keyword to select the border
  1328. color.
  1329.  
  1330. Several modifying keywords can assist the color selection:
  1331.  
  1332.     DARK, DIM or NORMAL for low intensity colors,
  1333.     LIGHT, BRIGHT or INTENSE for high intensity colors,
  1334.     FOREGROUND or FGD for foreground following,
  1335.     BACKGROUND,  BGD, or ON for background following,
  1336.     REVERSE to swap the current foreground and background,
  1337.     BORDER for border color selection following, or
  1338.     DEFAULT to select the current colors as the default colors.
  1339.  
  1340. If named colors or color codes 0-15 are specified without the foreground or
  1341. background keywords, then the first color is assumed to be the foreground and
  1342. the second the background. Keywords may also be shortened; the first partial
  1343. match will be used. Several examples may help to clarify these rules:
  1344.  
  1345.     SETCOLOR bgd blue                sets the background to dark blue
  1346.     SETCOLOR light cyan blue default default colors are light cyan foreground
  1347.                                      and blue background
  1348.     SETCOLOR 7,0                     gray foreground, black background
  1349.     SETCOLOR bright green on blue    high intensity green foreground, dark blue
  1350.                                      background
  1351.     SETCOLOR border cyan             set the border color to cyan
  1352.     SETCOLOR reverse                 reverses the current foreground and
  1353.                                      background colors
  1354.     SETCOLOR rev                     reverses foreground and background
  1355.  
  1356.  
  1357.                                        20
  1358.  
  1359. Any unmatched keywords are checked against user-defined color schemes in a file
  1360. named SETCOLOR.sch. This editable ASCII text file, which should be placed in the
  1361. same directory as the SETCOLOR.exe program, contains any number of named color
  1362. schemes of the user's choice. User supplied color schemes are entered into the
  1363. file with a text editor, with each line entered in the form:
  1364.  
  1365.          <name> = <keyword> [<keyword> ...]
  1366.  
  1367. where <name> is the name of the user supplied color scheme, and <keyword> is any
  1368. valid SETCOLOR program keyword or other option. Table 4-2 shows the SETCOLOR.sch
  1369. file included with ANSIPLUS as a sample.
  1370.  
  1371.                +---------------------------------------+
  1372.                |               Table 4-2               |
  1373.                |       Sample Color Schemes File       |
  1374.                +---------------------------------------+
  1375.                | evening = light cyan blue border 17   |
  1376.                | night = light blue black border 17    |
  1377.                | dawn = yellow cyan border 35          |
  1378.                | daylight = light blue white border 17 |
  1379.                | sun = bright red yellow border 46     |
  1380.                | sky = blue light blue border 17       |
  1381.                | forest = black green border 24        |
  1382.                | earth = yellow brown border 38        |
  1383.                | regal = pink purple border 21         |
  1384.                | candycane = dark red pink border white|
  1385.                | bw = gray black border dkgray         |
  1386.                +---------------------------------------+
  1387.  
  1388. A user color scheme may be specifically selected on the SETCOLOR command line by
  1389. preceding its name with the keyword SCHEME, for example:
  1390.  
  1391.   SETCOLOR SCHEME JOE selects a color scheme named JOE
  1392.  
  1393. The SETCOLOR program also includes keyword options to reset, edit, load and save
  1394. the current color configuration. These include:
  1395.  
  1396.     RESET                 Install defaults as the current colors
  1397.     IBM or OEM            Install the OEM VGA/EGA palette as the current colors
  1398.     PALETTE               Edit the color definitions for the 16-color palette
  1399.     SAVEFILE <filename>   Save the current 16-color definitions in a file
  1400.     SAVE256 <filename>    Save the 256 VGA DAC color definitions in a file
  1401.     LOADFILE <filename>   Load a color definition file
  1402.     SAVECURRENT <file>    Save the 16 current colors as an executable program
  1403.     SAVEDEFAULT <file>    Save the 16 default colors as an executable program
  1404.     SAVEPROGRAM <file>    Save both the current and default colors as a program
  1405.  
  1406. The SAVEFILE, SAVE256 and LOADFILE keywords generate and load color definition
  1407. files. The color definition files created by SAVEFILE contain 36 lines: 32 lines
  1408. define the red, green and blue intensities for colors 0 to 15, both current and
  1409. default, and the other four define the current and default foreground,
  1410. background and border colors. Files created by SAVE256 contain 512 lines: 256
  1411. for the default DACs and 256 for the current DACs. Table 4-3 is a sample of
  1412. lines from a SAVEFILE color definition file.
  1413.  
  1414.  
  1415.  
  1416.                                        21
  1417.  
  1418.                       +------------------------------+
  1419.                       |          Table 4-3           |
  1420.                       | Sample Color Definition File |
  1421.                       +------------------------------+
  1422.                       |      Default = 142,196       |
  1423.                       |      DBorder = 0,81,162      |
  1424.                       |     DColor 2 = 16,162,81     |
  1425.                       |     DColor 3 = 113,65,16     |
  1426.                       |      DColor 4 = 0,0,105      |
  1427.                       |      DColor 5 = 97,0,97      |
  1428.                       |      Current = 135,192       |
  1429.                       |        Border = 0,0,0        |
  1430.                       |      Color 2 = 0,170,0       |
  1431.                       |     Color 3 = 0,170,170      |
  1432.                       |      Color 4 = 0,0,170       |
  1433.                       |     Color 5 = 170,0,170      |
  1434.                       +------------------------------+
  1435.  
  1436. Users are free to edit color definition files to create their own colors, to
  1437. delete any lines from them, or to put the lines in any order except that all
  1438. default color definitions must precede all current color definitions in the
  1439. file. If no file name is given for a LOADFILE, SAVEFILE or SAVE256 request, the
  1440. file name SETCOLOR.def in the current directory will be used. LOADFILE checks
  1441. the system PATH for color definition files to be loaded, so any commonly used
  1442. color files can reside in a directory on the PATH.
  1443.  
  1444. The SAVECURRENT, SAVEDEFAULT, and SAVEPROGRAM keyword options create executable
  1445. ".com" files that can be called later by name to install colors. These programs
  1446. can also be edited by the ANSICOM.exe utility program.
  1447.  
  1448. The SETCOLOR program also controls ANSIPLUS VGA monochrome monitor emulation.
  1449. Two keywords enable or disable this feature:
  1450.  
  1451.   MONOCHROME   begins VGA monochrome monitor emulation; and
  1452.   COLOR        ends VGA monochrome monitor emulation and restores colors.
  1453.  
  1454. And finally, SETCOLOR provides three reporting options:
  1455.  
  1456.   SHOW         displays the 16 current colors in a band across the screen
  1457.   HELP         gives a brief description of how to use the SETCOLOR program
  1458.   SCHEME HELP  lists the available color schemes in file SETCOLOR.sch
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.                                        22
  1476.  
  1477.                     CONTROLLING OTHER ANSIPLUS FEATURES
  1478.  
  1479. The SETAPLUS.exe utility program is used to enable and disable various ANSIPLUS
  1480. features while the system is running. It can also be used to set the video
  1481. display mode, character height, video page and graphics mode text treatment
  1482. options, to define or list key reassignments, or to define the Control-G beep
  1483. tone. SETAPLUS.exe is executed by a command of the form:
  1484.  
  1485.         SETAPLUS <keyword> [<keyword> ...]
  1486.  
  1487. where each <keyword> selects an ANSIPLUS feature or other option. As for the
  1488. SETCOLOR.exe utility, if no <keyword> is supplied, you are presented with a menu
  1489. of choices. These choices are shown in Table 4-4 below.
  1490.  
  1491.    +------------------------------------------------------------------------+
  1492.    |                             Table 4-4                                  |
  1493.    |                     SETAPLUS Main Menu Options                         |
  1494.    +-----------+------------------------------------------------------------+
  1495.    | Report    | Display current ANSIPLUS optional feature settings         |
  1496.    | Mode      | Set the video display mode                                 |
  1497.    | Height    | Set the displayed character height                         |
  1498.    | Keyboard  | Caps Lock, Ctrl-C and key read-ahead options               |
  1499.    | Assign    | Key reassignment enable/disable option and key definition  |
  1500.    | Tone      | Control-G beep tone generation options                     |
  1501.    | Color     | Mode set color, blink, bright key echo and VGA mono options|
  1502.    | Display   | Screen saver, graphics mode cursor and retrace wait options|
  1503.    | Scrolling | Scroll-Lock, scroll-back and smooth scrolling options      |
  1504.    | Undo      | Undo all feature changes since starting the main menu      |
  1505.    | Quit      | Quit and return to DOS                                     |
  1506.    +-----------+------------------------------------------------------------+
  1507.  
  1508. From the SETAPLUS command line, you control each ANSIPLUS feature with its own
  1509. selection keywords. These selectors are shown in Table 4-5 on page 24.  When
  1510. used in combination with the following keywords, each controllable feature can
  1511. be enabled and disabled easily:
  1512.  
  1513.     ON, YES, or TRUE to enable the preceding feature,
  1514.     ENABLE to enable all following listed features,
  1515.     OFF, NO, or FALSE to disable the preceding feature,
  1516.     DISABLE to disable all following listed features, and
  1517.     RESET to set all features to their default values.
  1518.  
  1519. The following examples illustrate use of the SETAPLUS command line to control
  1520. ANSIPLUS features:
  1521.  
  1522.     SETAPLUS bright off              Disable bright key echo
  1523.     SETAPLUS enable capsunlock saver Enable screen saver and Caps reset on
  1524.                                      Shift-alpha
  1525.     SETAPLUS reset                   Reset all features to their default status
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.                                        23
  1535.  
  1536.         +-------------------------------------------------------------------+
  1537.         |                           Table 4-5                               |
  1538.         |              SETAPLUS Feature Selection Keywords                  |
  1539.         +------------+------------------------------------------------------+
  1540.         | SETCOLORS  | Install default (ANSIPLUS) colors on mode sets       |
  1541.         | NOBLINK    | Enable 16-color text mode background (disable blink) |
  1542.         | BRIGHT     | Highlight echoed keys (bright key echo)              |
  1543.         | MONOCHROME | VGA monochrome monitor emulation                     |
  1544.         | SAVER      | Enable screen saver (blanker)                        |
  1545.         | MSMOUSE    | Use MS mouse Int 33h polling in screen saver         |
  1546.         | PS2MOUSE   | Use PS/2 Int 74h mouse event interrupts in saver     |
  1547.         | PSEUDOCURS | Generate pseudo-cursor in VGA/EGA graphics modes     |
  1548.         | TTYTRAP    | Trap ANSI escape sequences in BIOS Write TTY         |
  1549.         | RETRACE    | Wait for retrace before setting palette registers    |
  1550.         |            |                                                      |
  1551.         | CAPSUNLOCK | Unlock Caps Lock with shift/letter key combination   |
  1552.         | CAPSRELOCK | Relock Caps with carriage return after shift/letter  |
  1553.         | CTRLC      | Generate Control-Break when Control-C is entered     |
  1554.         | NDLAST     | Read last key in buffer with non-destructive input   |
  1555.         | KEYASSIGN  | Enable ANSI key reassignment                         |
  1556.         | BEEP       | Use ANSIPLUS Control-G beep tone generator           |
  1557.         | WINBEEP    | Allow ANSIPLUS beep tone under Windows               |
  1558.         |            |                                                      |
  1559.         | LOCK       | Allow Scroll Lock key to freeze screen               |
  1560.         | ALTLOCK    | Require Alt-Scroll-Lock when freezing screen         |
  1561.         | SCROLLBACK | Enable scroll-back of lines scrolled off top         |
  1562.         | WINBACK    | Allow scroll-back under Windows                      |
  1563.         | BIOSBACK   | Capture lines scrolled by BIOS call                  |
  1564.         | CLSBACK    | Capture erased pages never scrolled up               |
  1565.         | PROTECT    | Protect 2nd display page from scroll-back storage    |
  1566.         | SMOOTH     | Enable smooth scrolling                              |
  1567.         | WINSMOOTH  | Allow smooth scrolling under Windows                 |
  1568.         | SPEEDUP    | Speed up smooth scroll when delaying computer        |
  1569.         +------------+------------------------------------------------------+
  1570.  
  1571. Other command line options include:
  1572.  
  1573.      MODE <decimal mode number> to set the video display mode,
  1574.      HEIGHT <height> to set the text character height,
  1575.      PAGE <page> to set the video page,
  1576.  
  1577.      KEYDEF to enter key reassignment definitions from the keyboard,
  1578.      KEYFILE <file name>  to load key reassignment definitions from a file,
  1579.      LISTKEYS to list all current key reassignments,
  1580.  
  1581.      TONE <frequency, duration list> to set the Control-G beep tone,
  1582.  
  1583.      TEXT or TREATMENT to reset graphics mode text treatments,
  1584.      SHADOW, BOLD,  ITALICS, UNDERLINE or OUTLINE to enable text treatments,
  1585.  
  1586.      STATUS to report the current video mode, number of colors, etc.,
  1587.      FEATURES to report the settings of all ANSIPLUS features,
  1588.      REPORT to show both STATUS and FEATURES, and
  1589.      HELP to show all keyword options.
  1590.  
  1591.  
  1592.  
  1593.                                        24
  1594.  
  1595.  
  1596. Two keyword options are provided for managing the interrupt vectors used by
  1597. ANSIPLUS:
  1598.  
  1599.       INTERRUPT      Displays, to the extent possible, the chain of programs
  1600.                      attached to each following selected interrupt
  1601.       LINK           Relinks ANSIPLUS to the selected interrupt(s)
  1602.  
  1603. You may specify interrupt selectors as either hexadecimal numbers or special
  1604. keywords:
  1605.  
  1606.       KEYEVENT       Interrupt 09h Key Event
  1607.       VIDEO          Interrupt 10h Video
  1608.       SYSTEMSERVICE  Interrupt 15h System Services
  1609.       KEYREQUEST     Interrupt 16h Keyboard Request
  1610.       KEYBREAK       Interrupt 1Bh Keyboard Break
  1611.       TIMERTICK      Interrupt 1Ch User Timer Tick
  1612.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  1613.       MULTIPLEX      Interrupt 2Fh Multiplex, and
  1614.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  1615.  
  1616. For example, SETAPLUS INTERRUPT 2F will list the programs attached to the DOS
  1617. Int 2Fh Multiplex interrupt.
  1618.  
  1619. All the features controlled by SETAPLUS are described in Chapter 2 under
  1620. Changing the ANSIPLUS Startup Configuration, starting on page 12, except for
  1621. two:
  1622.  
  1623.  * Key reassignments can be created by SETAPLUS. You will be prompted for the
  1624.    key to reassign; after that, you type in the corresponding key reassignment,
  1625.    and terminate it with the End key.
  1626.  
  1627.  * The ANSIPLUS beep tone can be defined by SETAPLUS. To define the beep sound
  1628.    from the command line, use SETAPLUS and follow the keyword TONE with zero,
  1629.    one or more frequencies in Hertz and durations in milliseconds. For example,
  1630.  
  1631.      SETAPLUS TONE            installs the default 880hz 385ms tone, and
  1632.      SETAPLUS TONE 1397,110,1047,165    defines a two-tone Control-G beep.
  1633.  
  1634.    To define the beep sound from the SETAPLUS main menu, select Tone Definition
  1635.    and run through the feature options.
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.                                        25
  1653.  
  1654.                    EDITING ANSI ESCAPE SEQUENCE PROGRAMS
  1655.  
  1656. After using ANSIPLUS for a while, the user will find it desirable to create
  1657. short programs for frequently used video modes, color selections or definitions,
  1658. key reassignments, etc. The ANSICOM.exe utility program provides this facility:
  1659. with it, the user can create and edit small executable ".com" files or small
  1660. printable text files that contain ANSI escape sequences. ANSICOM is executed
  1661. with the following command:
  1662.  
  1663.      ANSICOM <filename>
  1664.  
  1665. where <filename> is the name of the file to be edited. Your file to edit is
  1666. selected using the following rules:
  1667.  
  1668.  * If no file name is supplied, you will be presented with a menu of ".com"
  1669.    files to select from.
  1670.  
  1671.  * If a file name is supplied, and it does not include a file type, a file type
  1672.    of ".com" is assumed.
  1673.  
  1674.  * When an existing ".com" file is edited, it is first checked for program code
  1675.    that outputs the ANSI escape sequences. If this is not found, ANSICOM will
  1676.    refuse to edit the file.
  1677.  
  1678.  * If the file to be edited is not a ".com" file, then it is assumed to be a
  1679.    non-executable printable text file.
  1680.  
  1681.  * If the named file is not found (including a search of the system PATH),
  1682.    ANSICOM will ask if a new file is to be created.
  1683.  
  1684. Once the file has been properly identified, a full-screen editing display is
  1685. presented, and you can go to work. Use the F1 key for context sensitive help.
  1686.  
  1687. The ANSICOM full screen editing display automatically parses the user's entries
  1688. and identifies the kinds of ANSIPLUS escape sequences entered, including
  1689. incomplete escape sequences. ANSICOM will not allow the user to save a file
  1690. containing an incomplete escape sequence. Beyond that, it is the user's
  1691. responsibility to be sure that the escape sequences entered will do what he
  1692. wants.
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.                                        26
  1712.  
  1713.  
  1714. V.   ANSIPLUS ESCAPE SEQUENCES
  1715.  
  1716. This chapter lists and briefly describes each of the "ANSI" Escape sequences
  1717. recognized by ANSIPLUS.  They are described in detail in the printed ANSIPLUS
  1718. manual.  In the table, "#" represents any numeric parameter and "Esc" is the
  1719. Escape character (decimal 27, hexadecimal 1Bh):
  1720.  
  1721.  
  1722.      Control Sequence    Description
  1723.      ----------------    -----------
  1724.  
  1725.                    DISPLAY MODE AND CHARACTER SET
  1726.  
  1727.      Esc [#;#h           Set video display mode
  1728.  
  1729.      Esc [#;#l           Reset video display mode
  1730.  
  1731.      Esc [!#t            Select character set height: 8, 14 or 16 scan lines
  1732.  
  1733.      Esc [!#;...;#e      Select graphics mode text treatment options: bold,
  1734.                          underline, slant, shadow, outline, or reverse
  1735.  
  1736.      Esc [!#v            Select video page
  1737.  
  1738.  
  1739.                          CURSOR POSITIONING
  1740.  
  1741.      Esc [#;#H           Set cursor position
  1742.  
  1743.      Esc [#;#f           Set cursor position
  1744.  
  1745.      Esc [#A             Move cursor up
  1746.  
  1747.      Esc [#B             Move cursor down
  1748.  
  1749.      Esc [#C             Move cursor right
  1750.  
  1751.      Esc [#D             Move cursor left
  1752.  
  1753.      Esc [#s             Save cursor position, video mode, video page or colors
  1754.  
  1755.      Esc [#u             Restore cursor position, video mode, page or colors
  1756.  
  1757.  
  1758.                    COLOR SELECTION AND DEFINITION
  1759.  
  1760.      Esc [#;...;#m       Select current color attributes for output characters
  1761.  
  1762.      Esc [!#;#;#;#;#c    Define colors available, select palette, set up color
  1763.                          blinking, restore color definitions or palette
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.                                     27
  1771.  
  1772.  
  1773.  
  1774.      Control Sequence    Description
  1775.      ----------------    -----------
  1776.  
  1777.                       ERASE, INSERT AND DELETE
  1778.  
  1779.      Esc [#;#J           Clear the screen
  1780.  
  1781.      Esc [#;#;#K         Clear a line
  1782.  
  1783.      Esc [#;#L           Insert lines on the screen or in a column range
  1784.  
  1785.      Esc [#;#M           Delete lines from the screen or a column range
  1786.  
  1787.      Esc [#;#@           Insert characters on a line or a column range
  1788.  
  1789.      Esc [#;#P           Delete characters from a line or a column range
  1790.  
  1791.  
  1792.                      DRIVER STATUS AND CONTROL
  1793.  
  1794.      Esc [#;#n           Query ANSIPLUS status: cursor position, current color
  1795.                          selection, video mode and number of colors, screen and
  1796.                          character dimensions, color definitions, feature
  1797.                          settings, tone definition, key reassignment, etc.
  1798.  
  1799.      Esc [!#;...;#d      Enable or disable ANSIPLUS driver feature settings
  1800.  
  1801.      Esc [!#;...;#g      Define the Control-G beep tone
  1802.  
  1803.      Esc [#;...;#p       Define key reassignment (also accepts quoted strings)
  1804.  
  1805.  
  1806. Besides supporting all the escape sequences accepted by the MS-DOS ANSI.sys
  1807. driver, ANSIPLUS accepts additional parameters for many, and includes several
  1808. entirely new control functions.  See Chapter VI, Technical Notes, for
  1809. differences between ANSIPLUS and the ANSI.sys driver.
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.                                     28
  1830.  
  1831. VI.  TECHNICAL NOTES
  1832.  
  1833.  
  1834.                              ANSIPLUS AND WINDOWS 3
  1835.  
  1836. Users of Windows 3.0 and 3.1 should consider using ANSIPLUS as well. The
  1837. ANSIPLUS driver works well with DOS programs under Windows 3, and there are
  1838. advantages to using it in Windows 386 Enhanced Mode. Because ANSIPLUS is a CON
  1839. driver, local copies of it are included in each Windows 386 Enhanced Mode
  1840. virtual 8086. This means that all the ANSIPLUS internal state variables, and
  1841. those of its integrated console features, will be local to each virtual 8086, so
  1842. there is no way they can interfere with each other.
  1843.  
  1844. With DOS 5.0, or with an XMS driver such as QEMM (using LOADHI) or 386MAX,
  1845. ANSIPLUS can be loaded into upper memory blocks above 640k to provide a slightly
  1846. larger program area below 640k. However, if Windows 3.0 will be run in 386
  1847. Enhanced mode, it is strongly recommended that ANSIPLUS (or any other ANSI
  1848. driver) not be loaded into high memory using these methods, and that ANSIPLUS
  1849. load itself high instead. This is because Windows 3.0 does not localize the XMS
  1850. upper memory block area above 640k for its virtual 8086's, and so only one
  1851. global copy of ANSIPLUS would be shared among all virtual machines. This can
  1852. cause trouble: if, for example, a program in one window selects colors, then
  1853. those colors would also be in force for all DOS programs in other windows! This
  1854. appaears to have been fixed in Windows 3.1.
  1855.  
  1856. The ANSIPLUS driver detects when Windows 3 is running, and automatically
  1857. disables the screen blanker. Disabling of three other features under Windows is
  1858. user-configurable:
  1859.  
  1860.  * On most computers, screen scroll-back should operate correctly under Windows.
  1861.    However, when using 256-color video drivers, Windows 3.0 and 3.1 may not
  1862.    provide a full 32k of text RAM to DOS applications running in a window.
  1863.    ANSIPLUS attempts to compensate for this, but because of the potential for
  1864.    disaster when ANSIPLUS tries to save or view lines for scroll-back, the
  1865.    default setting for scroll-back under Windows is to be disabled. If you run
  1866.    all DOS applications full screen, or if Windows and scrolling-back in a
  1867.    window work correctly in an experiment on your system, this feature should be
  1868.    enabled.
  1869.  
  1870.  * If smooth scrolling does not perform well under Windows, or if there are
  1871.    other problems, then smooth scrolling can be disabled in Windows. In general,
  1872.    if scroll-back doesn't work under Windows, then smooth scrolling won't work
  1873.    either.
  1874.  
  1875.  * When Windows is running in 386 Enhanced mode, and a DOS program running in
  1876.    the background outputs a Control-G, the background program's virtual 8086 may
  1877.    not be running fast enough to accurately time the tone. Because of this, the
  1878.    tone can drag out and sound strange. Disabling ANSIPLUS tone generation under
  1879.    Windows restores the original Windows sound driver, but makes the tone
  1880.    frequency and duration non-changeable.
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.                                        29
  1889.  
  1890.                    ANSIPLUS EXTENSIONS AND THE ANSI STANDARD
  1891.  
  1892. ANSIPLUS uses a number of added control parameters and includes entire new
  1893. control functions that are not part of the ANSI X3.64 standard, so do not expect
  1894. them to be supported by any other drivers or devices. The following added
  1895. ANSIPLUS functions are not standard ANSI:
  1896.  
  1897.     Esc [!#t            Select character set height
  1898.     Esc [!#;...;#e      Select graphics mode text treatment options
  1899.     Esc [!#v            Select video page
  1900.     Esc [!#;#;#;#;#c    Define colors available, select palette, setup blinking
  1901.     Esc [!#;...;#d      Enable or disable ANSIPLUS driver features
  1902.     Esc [!#;...;#g      Define Control-G beep tone
  1903.  
  1904. The following ANSIPLUS functions accept standard ANSI parameters, but also
  1905. accept added non-standard parameters:
  1906.  
  1907.     Esc [#;#h           Set video mode
  1908.     Esc [#s             Save cursor position, video mode, etc.
  1909.     Esc [#u             Restore cursor position, video mode, etc.
  1910.     Esc [#;#J           Clear the screen
  1911.     Esc [#;#;#K         Clear a line
  1912.     Esc [#;#L           Insert lines on the screen
  1913.     Esc [#;#M           Delete lines from the screen
  1914.     Esc [#;#@           Insert characters on a line
  1915.     Esc [#;#P           Delete characters from a line
  1916.     Esc [#;...;#m       Select current color attributes for output characters
  1917.     Esc [#;#n           Query ANSIPLUS status: cursor position, colors, etc.
  1918.     Esc [#;...;#p       Define key reassignment
  1919.  
  1920.  
  1921.                     ESCAPE SEQUENCE RECOGNIZER ENHANCEMENTS
  1922.  
  1923. To simplify program generation of control sequences, the ANSIPLUS escape
  1924. sequence recognizer syntax has been relaxed:
  1925.  
  1926.  * Blanks between parameters in escape sequences are ignored;
  1927.  
  1928.  * Commas are allowed as separators in addition to semicolons;
  1929.  
  1930.  * Either single or double quotes may be used around character parameters;
  1931.  
  1932.  * Parameter values over 255 (i.e., up to 32,767) are accepted for certain
  1933.    commands. Plus and minus signs are also accepted.
  1934.  
  1935. Unrecognized escape sequences are passed through by the driver unaltered. The
  1936. Esc character is trapped only when followed by a left bracket ("["), so programs
  1937. that write the escape character (a left arrow) to the screen will continue to do
  1938. so after the driver is installed.
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.                                        30
  1948.  
  1949.                    DIRECT ACCESS TO VIDEO RAM VS. BIOS CALLS
  1950.  
  1951. ANSIPLUS uses direct access to video RAM in all VGA/EGA text and most common
  1952. graphics modes. However, BIOS calls will be used to output characters for three
  1953. classes of graphics modes:
  1954.  
  1955.  * Modes with 256 colors;
  1956.  
  1957.  * Modes that require more than 64k bytes of video RAM (i.e., 16 color graphics
  1958.    modes exceeding 800x600 resolution); and
  1959.  
  1960.  * Unrecognized (usually CGA or Hercules) graphics modes.
  1961.  
  1962. When BIOS calls are used, output is much slower, and "transparent" mode output,
  1963. graphics mode text treatments, and insert/delete characters are also not
  1964. supported. Future versions of ANSIPLUS may extend direct video RAM access to
  1965. some of these modes.
  1966.  
  1967.  
  1968.                               INSTALLATION CHECKS
  1969.  
  1970. ANSIPLUS responds to the Int 2Fh test for ANSI.sys installation. When Int 2Fh is
  1971. called with AX=1A00h, ANSIPLUS will return AL=0FFh to indicate that ANSI.sys is
  1972. installed.
  1973.  
  1974. The Int 2Fh response is expanded if registers BX="AN", CX="SI" and DX="++".
  1975. Then, in addition to returning AL=0FFh, ANSIPLUS returns a pointer in ES:BX to
  1976. the ANSIPLUS Int 29h entry point. A further installation confirmation can be
  1977. made by checking the 8 bytes at ES:[BX-12] for the string "ANSIPLUS". The
  1978. ANSIPLUS version number will be a 4 character string at ES:[BX-4], containing,
  1979. for example, "2.05".
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.                                        31
  2007.  
  2008.                                HOOKED INTERRUPTS
  2009.  
  2010. To implement all its features, ANSIPLUS attaches itself to nine system
  2011. interrupts. Two are replaced (1Bh and 29h), and the remaining 7 are supplemented
  2012. (i.e., ANSIPLUS calls the original interrupt but extends its function). If
  2013. possible, ANSIPLUS should always be installed after any other drivers that take
  2014. over any of these interrupts without passing calls through. The following table
  2015. lists the ANSIPLUS hooked interrupts and reasons for each:
  2016.  
  2017. +------------------------------------------------------------------------------+
  2018. |                                  Table 6-1                                   |
  2019. |                          ANSIPLUS Hooked Interrupts                          |
  2020. +----------------------+-------------------------------------------------------+
  2021. |Interrupt Description | Reason                                                |
  2022. +----------------------+-------------------------------------------------------+
  2023. |1Bh Keyboard Break    | Promote Control-Break to front of key buffer          |
  2024. |                      |                                                       |
  2025. |29h DOS Write Char    | Faster DOS screen output                              |
  2026. |                      |                                                       |
  2027. |09h Key Event         | Screen saver; scroll lock; scroll-back; key buffer    |
  2028. |                      | extension; smooth scroll toggle; other special key    |
  2029. |                      | processing                                            |
  2030. |                      |                                                       |
  2031. |10h BIOS Video        | Palette/DAC control; beep tone generation; screen     |
  2032. |                      | saver; smooth scroll; scroll lock; scroll-back; BIOS  |
  2033. |                      | Write TTY ANSI trap                                   |
  2034. |                      |                                                       |
  2035. |15h System Services   | Key processing                                        |
  2036. |                      |                                                       |
  2037. |16h BIOS Get Key      | Key buffer management; highlighted key echo; scroll-  |
  2038. |                      | lock and scroll-back                                  |
  2039. |                      |                                                       |
  2040. |1Ch User Timer Tick   | Screen saver; smooth scroll; color blinking; beep tone|
  2041. |                      | generation                                            |
  2042. |                      |                                                       |
  2043. |2Fh Multiplex         | Installation checks; special functions; Windows exit  |
  2044. |                      | processing                                            |
  2045. |                      |                                                       |
  2046. |74h PS/2 Mouse Event  | Screen saver                                          |
  2047. +----------------------+-------------------------------------------------------+
  2048.  
  2049. The DOS KEYB program for international keyboard support hooks the Int 09h Key
  2050. Event interrupt without passing calls through to whatever was installed before
  2051. (ie., to ANSIPLUS). Therefore, if the KEYB program is being used to set up the
  2052. keyboard, the following command MUST be executed after loading KEYB, otherwise
  2053. most ANSIPLUS keyboard related features will not work:
  2054.  
  2055.     SETAPLUS LINK KEYEVENT
  2056.  
  2057. This command will re-install ANSIPLUS on the key event interrupt. The INSTALL
  2058. program will automatically add this command to AUTOEXEC.bat if it finds a
  2059. reference in it to KEYB.
  2060.  
  2061. If the DISPLAY.sys device driver for code page switching is being used, the
  2062. ANSIPLUS.sys device driver must be installed before DISPLAY.sys in CONFIG.sys.
  2063. The INSTALL program will also automatically handle this.
  2064.  
  2065.                                        32
  2066.  
  2067.  
  2068.  
  2069. If you suspect that a system interrupt is no longer accessible to ANSIPLUS
  2070. because of a TSR or device driver that has been loaded after ANSIPLUS, you can
  2071. test this with the command:
  2072.  
  2073.     SETAPLUS INTERRUPT <intnum>
  2074.  
  2075. which displays, to the extent possible, the chain of programs attached to any
  2076. selected interrupt. The <intnum> may be either a hexadecimal interrupt number or
  2077. one of the following keywords:
  2078.  
  2079.       KEYEVENT       Interrupt 09h Key Event
  2080.       VIDEO          Interrupt 10h Video
  2081.       SYSTEMSERVICE  Interrupt 15h System Services
  2082.       KEYREQUEST     Interrupt 16h Keyboard Request
  2083.       KEYBREAK       Interrupt 1Bh Keyboard Break
  2084.       TIMERTICK      Interrupt 1Ch User Timer Tick
  2085.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  2086.       MULTIPLEX      Interrupt 2Fh Multiplex, and
  2087.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  2088.  
  2089. If ANSIPLUS is missing from the listing, it can be relinked with the command:
  2090.  
  2091.     SETAPLUS LINK <intnum>
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.                                        33
  2125.  
  2126.