home *** CD-ROM | disk | FTP | other *** search
/ New Horizons Shareware Collection / HORIZONS1.BIN / ANSIPLUS.DOC < prev    next >
Text File  |  1994-03-21  |  125KB  |  2,830 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                   ANSIPLUS Enhanced Console Device Driver
  24.  
  25.                         User's Guide, Release 3.10
  26.  
  27.                           Shareware Documentation
  28.  
  29.                               March 21, 1994
  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.                COPYRIGHT (C) 1992-1994 by Kristofer Sweger
  62.                      P.O. Box 378, Larkspur, CA 94977
  63.                            All Rights Reserved
  64.  
  65. The ANSIPLUS console device driver, supporting utility programs, and this
  66. User's Guide are Copyrighted (C) 1992-1994 by Kristofer Sweger.  This software
  67. and accompanying documentation are protected by United States Copyright law and
  68. also by International Treaty provisions.  The ANSIPLUS computer program and
  69. this documentation may not be reproduced, copied, disclosed, or transferred in
  70. any form (machine-readable or photo-copy included), except as provided here
  71. under "Limited License" (see page 3), without the express prior written
  72. approval of the author.
  73.  
  74. U.S. Government Information: Use, duplication, or disclosure by the U.S.
  75. Government of the computer software and documentation in this package shall be
  76. subject to the restricted rights applicable to commercial computer software as
  77. set forth in subdivision (b)(3)(ii) of the Rights in Technical Data and
  78. Computer Software clause at 252.227-7013 (DFARS 52.227-7013).  The Contractor/
  79. manufacturer is: Kristofer Sweger, P.O.  Box 378, Larkspur, CA 94977.
  80.  
  81.                           DISCLAIMER OF WARRANTY
  82.  
  83. Kristofer Sweger makes no warranty of any kind, express or implied, including,
  84. without limitation, any warranties of performance, merchantability and/or
  85. fitness for a particular purpose.  This software and accompanying documentation
  86. are provided "as is," without warranty of any kind.  The entire risk as to
  87. results and performance is assumed by you.
  88.  
  89. Kristofer Sweger shall not be liable for any damages, whether direct, indirect,
  90. consequential or incidental arising from a failure of the ANSIPLUS programs to
  91. operate in the manner desired by the user.  Nor shall Kristofer Sweger be
  92. liable for any data, property or other damages which may be caused directly or
  93. indirectly by use of or inability to use the software, even if Kristofer Sweger
  94. has been advised of the possibility of such damages.  In no event shall the
  95. liability for any damages exceed the price paid for the license to use the
  96. software, regardless of the form and/or extent of the claim.  By using the
  97. software you agree to this.
  98.  
  99. The author further reserves the right to revise or alter the contents of this
  100. documentation or the ANSIPLUS software package from time to time without
  101. notifying any person or group of such changes or alterations.
  102.  
  103. The Limited License and Disclaimer of Warranty shall be construed, interpreted
  104. and governed by the laws of the State of California.
  105.  
  106.                                 TRADEMARKS
  107.  
  108. Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.  IBM
  109. and PS/2 are registered trademarks of IBM Corporation.  Windows is a trademark
  110. of Microsoft Corporation.  4DOS is a registered trademark of JP Software, Inc.
  111. Norton Utilities is a registered trademark of Symantec Corporation.  QEMM is a
  112. registered trademark of Quarterdeck Office Systems, Inc.  386MAX is a trademark
  113. of Qualitas, Inc.  Other product names are the trademarks of their respective
  114. manufacturers.  Other trademarked names may appear in this manual.  The author
  115. states that he is using the trademarked names only for editorial purposes, and
  116. to the benefit of the trademark owner, with no intention of infringing upon any
  117. trademark.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                              Table of Contents
  125.  
  126.  
  127.  
  128.   I. Introduction
  129.  
  130.           Product description . . . . . . . . . . . . . . . . . . . . .  1
  131.           Registration  . . . . . . . . . . . . . . . . . . . . . . . .  2
  132.           Limited License . . . . . . . . . . . . . . . . . . . . . . .  3
  133.           Technical Support . . . . . . . . . . . . . . . . . . .more.
  134.  
  135. See "Features Summary" in the ANSIPLUS documentation for more information about
  136. ANSIPLUS features.
  137.  
  138.  
  139. ANSIPLUS Packing List
  140. -------- ------- ----
  141.  
  142.      File                Description
  143.      ----                -----------
  144.  
  145.      ANSIPLUS.sys        ANSIPLUS console device driver
  146.      ANSIPLUS.doc        ANSIPLUS Shareware documentation
  147.      SETCOLOR.exe        Color control utility program
  148.      SETAPLUS.exe        Driver features control utility program
  149.      ANSICOM.exe         ANSI escape sequence editor
  150.      NEWAPLUS.exe        ANSIPLUS bootup configuration program
  151.      APLUSLIB.exe        Execution library for the utility programs
  152.      SETCOLOR.sch        Color schemes file for SETCOLOR.exe
  153.      CONSETUP.com        Sample escape sequence program
  154.      PUSHVID.com         Save current video mode, video page and colors
  155.      POPVID.com          Restore saved video mode, page and colors
  156.      LOCKPAL.com         Lock the 16-color palette
  157.      UNLOKPAL.com        Unlock the 16-color p . . . . . . . . . . . . . . . . . . . 38
  158.           ANSIPLUS and the 4DOS or NDOS command shells  . . . . . . . . 42
  159.           ANSIPLUS extensions and the ANSI standard . . . . . . . . . . 42
  160.           Escape sequence recognizer enhancements . . . . . . . . . . . 43
  161.           Direct access to video RAM vs. BIOS calls . . . . . . . . . . 43
  162.           Installation checks . . . . . . . . . . . . . . . . . . . . . 43
  163.           Hooked interrupts . . . . . . . . . . . . . . . . . . . . . . 44
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175. I.   INTRODUCTION
  176.  
  177. The DOS console device driver provides the critical interface between you and
  178. your personal computer.  It controls the output you see from DOS and accepts
  179. your keyboard input, and you spend a whole lot of time using it.
  180. Unfortunately, the standard CON and ANSI device drivers supplied with DOS do
  181. not take full advantage of the capabilities of the major video controllers
  182. currently in use: VGA and SVGA.  In addition, the standard personal computer
  183. BIOS (the "Basic Input Output System" that is part of the computer's hardware)
  184. has limitations that have had to be addressed individually by several TSR
  185. (Terminate and Stay Resident) programs or device drivers, by work-arounds and
  186. special drivers in major application programs, or by development of graphical
  187. user interfaces such as Windows.
  188.  
  189. The ANSIPLUS console device driver integrates major console elements missing
  190. from DOS and the personal computer BIOS into a single compact device driver
  191. that can easily be controlled and personalized.  With ANSIPLUS installed:
  192.  
  193.  * User interaction with the DOS command processor and many applications will
  194.    be significantly improved.
  195.  
  196.  * Screen output will be faster than with DOS's ANSI and non-ANSI drivers.
  197.  
  198.  * The user will have complete control over colors and VGA/EGA capabilities.
  199.  
  200.  * Users of Windows 3 will have access to ANSIPLUS features in all windowed and
  201.    full screen DOS sessions.
  202.  
  203.  * The user will also benefit from all the other display and keyboard features
  204.    provided by ANSIPLUS.
  205.  
  206. This is a fully functional Shareware copy of the ANSIPLUS product.  As such, it
  207. is made available to the general computing public for evaluation.  Users are
  208. licensed to operate ANSIPLUS on their personal computers for the purpose of
  209. test and evaluation for a limited trial period of thirty days.  After
  210. evaluation, if the user decides the ANSIPLUS programs are not of sufficient
  211. merit to warrant purchase through registration with Kristofer Sweger, all
  212. ANSIPLUS programs should be removed from their personal computer.  If ANSIPLUS
  213. is found to be useful and is in regular use, then registration is required.
  214.  
  215. This manual is organized in six chapters:
  216.  
  217.  * Chapter 1 introduces ANSIPLUS and covers product licensing and support;
  218.  
  219.  * Chapter 2 summarizes ANSIPLUS features for those who want to know what it
  220.    can do;
  221.  
  222.  * Chapter 3 discusses installing and configuring ANSIPLUS on your computer;
  223.  
  224.  * Chapter 4 describes keyboard functions and utility programs accessible to
  225.    users after installation;
  226.  
  227.  * Chapter 5 lists ANSIPLUS escape sequences; and
  228.  
  229.  * Chapter 6 contains several technical notes of interest to programmers and
  230.    others.
  231.  
  232.                                        1
  233.  
  234.  
  235.                                 REGISTRATION
  236.  
  237. By paying the registration fee for ANSIPLUS, registered users are granted a
  238. license to use the software on any single computer system.  Registered users
  239. also receive:
  240.  
  241.  * The TSR-capable registered version of the ANSIPLUS driver, ANSIPLUS.exe.
  242.    This driver may be loaded into memory from the DOS command line, from a
  243.    batch file (AUTOEXEC.bat), or from CONFIG.sys with DEVICE=, DEVICEHIGH=, or
  244.    INSTALL= commands.  The Registered ANSIPLUS driver also doesn't have that
  245.    pesky time delay in the sign-on message.  The registered version is NOT
  246.    Shareware, so it may not be copied for others.
  247.  
  248.  * A printed copy of the ANSIPLUS manual, which contains detailed documentation
  249.    on using the ANSIPLUS Escape sequences.  This information is provided only
  250.    in the printed manual, and is not included in either the Shareware version
  251.    or on the Registered diskettes.  (Diskette-only registration does not
  252.    include the printed manual.)
  253.  
  254.  * The most recent versions of the ANSIPLUS utility programs and other files in
  255.    the ANSIPLUS package.
  256.  
  257.  * Free BBS updates.  Registered ANSIPLUS users can obtain free updates by
  258.    installing future Shareware versions of ANSIPLUS over their registered
  259.    copies.  The ANSIPLUS installation program will automatically register a
  260.    Shareware copy when it is installed on a disk that loads a registered copy
  261.    of ANSIPLUS with its CONFIG.sys.
  262.  
  263. Registration helps support further improvements to ANSIPLUS.  The easiest way
  264. to register ANSIPLUS is to print out the registration form file, REGISTER.pls,
  265. fill it out, and mail with payment to:
  266.  
  267.           Kristofer Sweger
  268.           P.O. Box 378
  269.           Larkspur, CA 94977
  270.  
  271. Be sure to specify whether you want a 3.5" or 5.25" diskette, and to include
  272. the mailing address for your registered ANSIPLUS and manual.
  273.  
  274. Payment may be by check drawn on a United States or Canadian bank, money order,
  275. Eurocheque in U.S. dollars, or credit card (Visa or Master Card only).  Credit
  276. card orders are also accepted by telephone on the ANSIPLUS support line,
  277. 415/924-5407, and signed credit card orders may be sent by fax to 415/924-0258.
  278. We are pleased to accept purchase orders from established U.S. companies and
  279. government agencies.  However, orders under $100 must be prepaid.  For orders
  280. of $100 or more, our terms are net 30 days.  Credit references may be required.
  281.  
  282. Pricing is shown in REGISTER.pls.  California residents or businesses operating
  283. in California must add California sales tax.  Other additional charges for
  284. shipping to destinations outside the United States or Canada, delivery of a Zip
  285. file via CompuServe, or processing a EuroCheque may apply.
  286.  
  287. Multi-computer licenses for use of ANSIPLUS are available upon request at a
  288. substantially reduced fee per machine.  Call the ANSIPLUS support line for a
  289. price quotation.
  290.  
  291.                                        2
  292.  
  293.  
  294.                               LIMITED LICENSE
  295.  
  296. Non-registered users of ANSIPLUS are licensed ONLY to evaluate the programs and
  297. device driver for up to thirty days for the sole purpose of determining whether
  298. or not it meets their requirements.  All other use requires registration.  Any
  299. other use of non-registered copies of ANSIPLUS by any person, business,
  300. corporation, or government organization, is not permitted.
  301.  
  302. Registered copies of ANSIPLUS may NOT be copied for others.  However,
  303. permission is hereby granted for individuals to copy the non-registered
  304. ANSIPLUS package for their own use (for evaluation and backup purposes) or for
  305. other individuals to evaluate, provided all of the following conditions are
  306. met:
  307.  
  308.  * The ANSIPLUS package, including all related program and documentation files,
  309.    cannot be modified in any way and must be distributed in its entirety, with
  310.    no additions.  The following computer files constitute the ANSIPLUS
  311.    Shareware package:
  312.  
  313.      ANSIPLUS.sys        ANSIPLUS Shareware console device driver
  314.      ANSIPLUS.doc        ANSIPLUS Shareware documentation
  315.      SETCOLOR.exe        Color control utility program
  316.      SETAPLUS.exe        Driver features control utility program
  317.      ANSICOM.exe         ANSI escape sequence editor
  318.      NEWAPLUS.exe        ANSIPLUS bootup configuration program
  319.      APLUSLIB.exe        Execution library for the utility programs
  320.      SETCOLOR.sch        Color schemes file for SETCOLOR.exe
  321.      CONSETUP.com        Sample escape sequence program
  322.      PUSHVID.com         Save current video mode, video page and colors
  323.      POPVID.com          Restore saved video mode, page and colors
  324.      LOCKPAL.com         Lock the 16-color palette
  325.      UNLOKPAL.com        Unlock the 16-color palette
  326.      WINVGA16.com        MS Windows 16-color VGA driver palette change
  327.      APLUS.pif           Sample Windows PIF file
  328.      INSTALL.exe         Installation program
  329.      INSTALL.inf         Installation control file
  330.      REGISTER.pls        ANSIPLUS registration form
  331.      README.pls          Release notes
  332.  
  333.  * No price or other compensation may be charged for the ANSIPLUS package.  A
  334.    distribution cost may be charged for the cost of the diskette, shipping and
  335.    handling, as long as the total per disk does not exceed US $6.00 in the
  336.    United States and Canada, or US $10.00 internationally.
  337.  
  338.  * The ANSIPLUS package cannot be bundled or included with other goods or
  339.    services, nor can it be included in any commercial software packaging offer,
  340.    nor can it be "rented" or "leased" to others, without specific prior written
  341.    agreement from Kristofer Sweger.
  342.  
  343. All rights not expressly granted here are reserved to Kristofer Sweger.
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                                        3
  351.  
  352.  
  353.  
  354.                              TECHNICAL SUPPORT
  355.  
  356. We want our users to be satisfied, and we find the interaction with real users
  357. of ANSIPLUS to be of great value.  Many ANSIPLUS features are the result of
  358. user input.  If you have a problem evaluating ANSIPLUS or want to make a
  359. suggestion, comment, or complaint, please contact us immediately, whether you
  360. have registered or not.  There are several ways you can reach ANSIPLUS support:
  361.  
  362.  * Electronic mail via CompuServe at 72713,1241
  363.  
  364.  * Electronic mail via Internet at 72713.1241@compuserve.com
  365.  
  366.  * Fax at 415/924-0258
  367.  
  368.  * Voice telephone at 415/924-5407
  369.  
  370.  * U.S. mail at P.O. Box 378, Larkspur, CA 94977 USA
  371.  
  372. The ANSIPLUS technical support telephone line, 415/924-5407, can be called
  373. weekdays from 10:00 AM to 5:00 PM, Pacific Time.  We ask that you recognize
  374. that this service can easily be overwhelmed by calls with questions that are
  375. already answered in the documentation provided.  When you do call, please try
  376. to have all your questions (and any necessary supporting data) ready so that we
  377. can deal with them efficiently in one short session.
  378.  
  379. If you are reporting a software problem, we will need specific information
  380. about your computer system and how to recreate the problem:
  381.  
  382.  * What is the problem, or what is not behaving as expected?
  383.  
  384.  * What exactly must be done to cause the problem to appear?
  385.  
  386.  * What did you do to try to fix or work around the problem?
  387.  
  388.  * What is your software and hardware environment?  This includes the version
  389.    of ANSIPLUS you are using, your computer type, DOS version, video
  390.    controller, any memory managers, other device drivers or TSRs loaded, and
  391.    any other software or hardware in use at the time.
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.                                        4
  410.  
  411. II.  FEATURES SUMMARY
  412.  
  413. Although many of the ANSIPLUS features described here may seem technical, each
  414. meets a need, and they all cooperate as parts of one compact console device
  415. driver.  In this chapter, they have been collected into three major groups:
  416. VGA/EGA display features, integrated console functions, and other ANSIPLUS
  417. features.  The remaining chapters give details regarding specific features.
  418.  
  419.                          VGA/EGA DISPLAY FEATURES
  420.  
  421. The ANSIPLUS enhanced DOS console device driver is tailored to take advantage
  422. of SVGA, VGA and EGA display capabilities:
  423.  
  424. Mode recognition    For any SVGA/VGA/EGA display mode, the driver can properly
  425.                     address the entire screen.  ANSIPLUS automatically
  426.                     recognizes and adapts to various VGA or EGA screen modes,
  427.                     both text and graphics, including extended modes with large
  428.                     numbers of lines and/or columns.  ANSIPLUS can also
  429.                     automatically adapt to and compensate for older video
  430.                     controllers with very limited numbers of colors or shades
  431.                     (i.e., CGA or monochrome boards).
  432.  
  433. Speed               In text and in 16-color VGA/EGA graphics display modes, the
  434.                     driver bypasses the ROM BIOS and goes straight to the video
  435.                     RAM, so it can operate much faster than either the original
  436.                     DOS console driver or the DOS ANSI driver. Programs that
  437.                     write large character strings to the standard output
  438.                     (console) file handle in "raw" mode can generate their
  439.                     output many times faster.
  440.  
  441. Color selection     ANSIPLUS provides full control over colors. In color text
  442.                     modes, sixteen foreground and background colors are
  443.                     supported.  In 16-color VGA/EGA graphics modes, ANSIPLUS
  444.                     allows mixing of background colors, for a total of 136
  445.                     possible background colors.  In 256-color VGA graphics
  446.                     modes, all 256 foreground and background colors are
  447.                     supported.
  448.  
  449. Palette control     Control over VGA/EGA palette registers and VGA DAC
  450.                     registers allows selecting and maintaining colors using the
  451.                     video controller's full capabilities.  The driver traps all
  452.                     video mode changes, and installs the palette and/or DAC
  453.                     colors of the user's, or of ANSIPLUS's color scheme.
  454.                     Applications that set their own palettes will continue to
  455.                     do so, but those that do not can now use custom color
  456.                     choices.  Blinking can also be kept disabled to allow 16
  457.                     background colors in text modes.
  458.  
  459. Text size           ANSIPLUS allows selection of alternate VGA/EGA character
  460.                     sets, giving control over the character height, and thus
  461.                     the number of text lines used in any VGA/EGA video mode.
  462.  
  463. Smooth scrolling    ANSIPLUS supports smooth scrolling of the screen (for fast
  464.                     CPUs with 16-bit VGA/EGA), so the screen can be read while
  465.                     it is moving. Options are provided to control the use and
  466.                     rate of smooth scrolling.
  467.  
  468.                                        5
  469.  
  470.  
  471. Extended modes      The ANSI Set Mode control sequence has been expanded to
  472.                     allow specifying SVGA/VGA/EGA modes that are based on full
  473.                     AX and/or BX CPU register values, extending ANSI-type
  474.                     control to Super VGA/EGA controllers that require such
  475.                     register settings.  Super VGA controllers that conform to
  476.                     the VESA standard are also automatically recognized, and
  477.                     VESA extended set mode calls are made by the ANSIPLUS
  478.                     driver for modes of 100h or higher.
  479.  
  480.  
  481.                        INTEGRATED CONSOLE FUNCTIONS
  482.  
  483. The ANSIPLUS driver efficiently integrates several useful console functions
  484. that in the past had to be provided by separate TSR programs or device drivers:
  485.  
  486. Screen saver        A screen saver blanks the VGA/EGA screen after several
  487.                     minutes of screen, keyboard and mouse inactivity.  The
  488.                     screen can be brought back by any keystroke (including
  489.                     shift keys) or by mouse movement or buttons.  The screen
  490.                     saver feature can be enabled or disabled by the user, and
  491.                     is automatically disabled in certain situations.
  492.  
  493. Keyboard buffer     As many PC users eventually discover, the standard personal
  494.                     computer BIOS provides a keyboard input type-ahead buffer
  495.                     of only 15 characters, which is enough for only the
  496.                     shortest of commands.  ANSIPLUS extends this by 113
  497.                     keystrokes for a total type-ahead of 128 keystrokes
  498.                     (configurable for more if necessary).
  499.  
  500. Repeated keys       Another problem with the standard BIOS keystroke buffer
  501.                     occurs when keys are held down too long, and the buffer
  502.                     rapidly fills with repeated (or "typematic") keys, which
  503.                     are then processed long after the key is lifted.
  504.                     Spreadsheet users often experience this when holding down
  505.                     one of the arrow keys.  ANSIPLUS disables repeat key
  506.                     type-ahead, but does allow repeat keys that are immediately
  507.                     consumed by programs, so the type-ahead buffer cannot be
  508.                     filled with unintended keystrokes.  Repeated digits are
  509.                     also suppressed, making it impossible to inaccurately enter
  510.                     a number just because a key is held down too long.  The
  511.                     rate at which repeated keys are generated is also
  512.                     configurable.
  513.  
  514. Key stacking        ANSIPLUS supports key stacking, which can load the keyboard
  515.                     buffer with a series of keystrokes and feed them into
  516.                     programs or commands as if they had been typed at the
  517.                     keyboard.  This feature can be useful for automating
  518.                     startup of programs, software testing, and demonstrations.
  519.                     Keys can be added to the buffer by ANSI escape sequence, by
  520.                     ANSIPLUS utility program command, or, for users of the 4DOS
  521.                     4.0+ or NDOS Version 7.0+ command shells, by KEYSTACK
  522.                     command.
  523.  
  524.  
  525.  
  526.  
  527.                                        6
  528.  
  529. Scroll-back         Every DOS user sooner or later needs to recall something
  530.                     that was on the screen, but has scrolled off the top.
  531.                     Programmers often encounter this with error messages, and
  532.                     other users with file directory listings.  To address this
  533.                     problem, ANSIPLUS supports screen scroll-back: all lines
  534.                     scrolled and cleared from the screen in text modes are
  535.                     captured by the ANSIPLUS driver so that the user can stop
  536.                     at any time and browse through recent screen contents.
  537.  
  538. Scroll lock         Large directory listings and other rapidly generated screen
  539.                     output can often fly by on the screen too fast to be read.
  540.                     Hitting the Scroll Lock key will freeze the screen when
  541.                     ANSIPLUS or the BIOS next tries to scroll it.  When the
  542.                     screen is frozen, several keystroke options allow control
  543.                     over subsequent screen output.
  544.  
  545. Beep tone           The standard personal computer BIOS Control-G beep tone
  546.                     generator waits in a programmed loop until sound output is
  547.                     completed.  Sometimes, error or other conditions detected
  548.                     in a running program can generate a rapid sequence of
  549.                     beeps, and the computer will just hang for what seems an
  550.                     eternity, beeping away.  ANSIPLUS has an
  551.                     interrupt-controlled tone generator that lets the beep tone
  552.                     be finished in parallel with subsequent processing.
  553.                     Multiple beeps are ignored if a tone is currently being
  554.                     generated, so programs cannot be slowed down by a rapid
  555.                     series of beeps.  Options are provided for defining the
  556.                     tone and using or not using the tone generator.
  557.  
  558.                           OTHER ANSIPLUS FEATURES
  559.  
  560. Other ANSIPLUS features include:
  561.  
  562. User control        Menu driven, mouse controllable utilities give the user
  563.                     full control over selected colors, color palettes, border
  564.                     colors, video modes, text height, key reassignment, beep
  565.                     tone definition, driver table sizes, and all other
  566.                     configurable features.
  567.  
  568. Loading options     At load time, the ANSIPLUS driver can divide itself into
  569.                     sharable code (about 21K) and unshared code/data (about 5K)
  570.                     sections, placing the shared code in XMS upper memory
  571.                     blocks (from 640K to 1M), in high memory (1M to 1M+64K), or
  572.                     in expanded memory (EMS), and leaving only the unshared
  573.                     part in low memory.  The registered driver can be loaded as
  574.                     either a TSR program or a device driver.
  575.  
  576. Bright key echo     ANSIPLUS highlights user-typed keys when they are displayed
  577.                     by DOS on the screen, giving a clear visual separation of
  578.                     typed entries from computer output.  If unwanted, this
  579.                     feature can be disabled.
  580.  
  581. ANSI support        All DOS ANSI.sys escape sequences are supported, plus
  582.                     additional ANSI/VT-100 escape sequences for clearing the
  583.                     screen, erasing lines, inserting and deleting lines, and
  584.                     inserting and deleting characters.
  585.  
  586.                                        7
  587.  
  588.  
  589. Windows aware       ANSIPLUS features have been tested and adjusted for maximum
  590.                     compatibility in Windows DOS sessions, both full screen and
  591.                     within a window. The ANSIPLUS driver detects when Windows
  592.                     is running, and automatically disables or alters certain
  593.                     features, such as the screen blanker, that may interfere.
  594.  
  595. Mono/CGA support    ANSIPLUS should give reasonable and readable displays in
  596.                     all display modes, including those with a very limited
  597.                     number of colors or shades.  ANSI-type programs written in
  598.                     terms of 16 colors will be executable on machines with
  599.                     simpler video capabilities, if ANSIPLUS is running on that
  600.                     machine.
  601.  
  602. Key processing      ANSIPLUS includes several special key processing options:
  603.  
  604.                     (1) the shift-alphabetic keys can cause Caps-Lock to
  605.                         unlock, much like a typewriter releases its shift lock
  606.                         whenever a shift key is pressed;
  607.  
  608.                     (2) the Enter key can restore Caps-Lock after it was
  609.                         unlocked by a shift-alphabetic key, thus restoring Caps
  610.                         on completion of an "entry";
  611.  
  612.                     (3) Control-C can cause a Control-Break, for those users
  613.                         who prefer the Control-C key; and
  614.  
  615.                     (4) the DOS "Non-Destructive" read function can return the
  616.                         last key in the keyboard buffer instead of the first,
  617.                         so that it always reflects what has last been typed.
  618.  
  619. Key reassignment    ANSIPLUS has the ability to translate single keystrokes to
  620.                     full commands or other pre-determined key sequences.  These
  621.                     key reassignments can be applied either to keys entered
  622.                     through DOS or to all keys entered via BIOS Interrupt 16h.
  623.                     Both expansion of keys and changes to key reassignments can
  624.                     also be enabled or disabled independently.  When key
  625.                     reassignment changes are disabled, a distinctive tone
  626.                     sounds on any attempt to redefine a key, making it easy to
  627.                     detect ANSI-type files that contain key redefinitions.
  628.  
  629. Line wrapping       When the length of a line displayed on the screen exactly
  630.                     equals the width of the screen, the standard DOS console
  631.                     device drivers cause a blank line to be output.  ANSIPLUS
  632.                     suppresses output of these unintended blank lines.
  633.  
  634. Graphics cursor     The DOS console drivers do not show a cursor on the screen
  635.                     when in graphics modes.  ANSIPLUS can display a cursor when
  636.                     keyed entries are requested by DOS in a graphics mode.
  637.  
  638. BIOS TTY ANSI       ANSIPLUS provides an option to trap and execute ANSI
  639.                     control sequences in BIOS Int 10h Write TTY output as well
  640.                     as in DOS standard console output.
  641.  
  642.  
  643.  
  644.  
  645.                                        8
  646.  
  647.  
  648. Transparent mode    On occasion, it is undesirable to have the ANSI driver fill
  649.                     in the background color of each character space as it
  650.                     writes characters.  ANSIPLUS includes a "transparent"
  651.                     background mode that will write each output character in
  652.                     the current foreground color over whatever background is
  653.                     currently at the cursor position.
  654.  
  655. Text treatments     In 16-color graphics modes, ANSIPLUS can apply bold,
  656.                     underline, black shadow, slant (italics), or black outline
  657.                     text treatments, in any combination, to output characters
  658.                     for emphasis or improved legibility.
  659.  
  660. Esc pass-through    Unlike the ANSI.sys driver, the Esc character is trapped by
  661.                     ANSIPLUS only when followed by a left bracket ("["), so
  662.                     programs that write Esc (a left arrow) to the screen will
  663.                     continue to do so after ANSIPLUS is installed.
  664.  
  665. VGA mono emulation  Because application developers with VGA color monitors
  666.                     sometimes need to see how their systems will look when run
  667.                     with a monochrome VGA monitor, ANSIPLUS provides an option
  668.                     to emulate a monochrome VGA monitor on a color monitor.
  669.  
  670. Status reporting    To allow programs to query ANSIPLUS about more than just the
  671.                     current cursor location, the device status report has been
  672.                     extended to report information about the current video
  673.                     mode, video page, numbers of rows, columns and colors,
  674.                     current or default definition of colors, and more.
  675.  
  676. Installation checks To facilitate developing applications that can use ANSIPLUS
  677.                     features, ANSIPLUS responds to standard Int 2Fh ANSI.sys
  678.                     installation checks, and includes extensions that can
  679.                     distinguish ANSIPLUS from ANSI.sys.
  680.  
  681. Free BBS Updates    When a Shareware copy of ANSIPLUS is installed on a disk
  682.                     that boots a Registered copy, the INSTALL program will
  683.                     convert the new Shareware copy into a Registered copy with
  684.                     the same serial number and signon message as the Registered
  685.                     ANSIPLUS already on the disk.  Registered users can thus
  686.                     benefit from future improvements to ANSIPLUS at no cost, if
  687.                     they have access to CompuServe or a bulletin board system
  688.                     (BBS) that maintains recent Shareware versions of ANSIPLUS.
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.                                        9
  705.  
  706. III. INSTALLING ANSIPLUS
  707.  
  708.  
  709.         INSTALLING THE ANSIPLUS DEVICE DRIVER AND UTILITY PROGRAMS
  710.  
  711. The ANSIPLUS package includes an installation and configuration program called
  712. INSTALL.exe, which should properly handle most installations.  INSTALL analyzes
  713. the runtime environment, CONFIG.sys and AUTOEXEC.bat of the target drive,
  714. locates the source files, copies ANSIPLUS to the target drive (or to any
  715. sub-directories of the user's choice), and updates CONFIG.sys and AUTOEXEC.bat.
  716.  
  717. Starting with MS-DOS 6.0, the CONFIG.sys file can contain menus and multiple
  718. configuration blocks.  When a CONFIG.sys menu is being used, a new ANSIPLUS
  719. installation will require selecting a configuration block to receive the
  720. ANSIPLUS DEVICE= command, and an update will require selecting a block that
  721. either already refers to ANSIPLUS, or to which it will be added.  INSTALL makes
  722. an initial choice of configuration block, and this can be corrected by the user
  723. before copying the ANSIPLUS release files by using the "Revise Parameters"
  724. option on the Installation menu.
  725.  
  726. The INSTALL program also gives an opportunity (via the Installation menu) to
  727. set the destination directory for each installed file or for classes of files.
  728. If the directory is not specified for a file, the following assumptions will
  729. apply:
  730.  
  731.  * If an ANSIPLUS file name matches the name of a file in the default
  732.    directory, root directory, or on the system PATH of the destination drive,
  733.    then the ANSIPLUS file will be copied over the matched file (i.e., updated).
  734.    This is intended to make installation of ANSIPLUS updates a snap.
  735.  
  736.  * New files are added to a directory for each class of file (i.e., driver,
  737.    utility program, or documentation/other).  If any file in the class is being
  738.    updated, then the class directory will be the same as the updated files.
  739.    Otherwise, the class directory will be "\ANSIPLUS".
  740.  
  741. It is recommended that you put all of the ANSIPLUS utility programs (SETCOLOR,
  742. SETAPLUS, ANSICOM, NEWAPLUS and APLUSLIB) on your system PATH so that they can
  743. be used easily.  It is critical that the execution library, APLUSLIB.exe, be
  744. located either in the same directory as the other utility programs or on the
  745. system PATH.  If it is not, the utility programs will not run!  You may also
  746. want to place the ANSIPLUS.sys device driver in the root directory.
  747.  
  748. For those who are not content to use default driver feature and other settings,
  749. after the release files have been copied to the target drive, the configuration
  750. section of the INSTALL program lets the user set the startup (boot) driver
  751. table sizes, colors, and feature settings, as well as high memory loading
  752. options that affect CONFIG.sys.  These configurations can be performed either
  753. at installation time, or any time later on an installed drive by using the
  754. NEWAPLUS.exe program.  Context sensitive help (via the F1 key) is provided for
  755. all entries.  Startup configuration changes are described in the following
  756. section, starting on page 13.
  757.  
  758. Before installing ANSIPLUS, or any other new device driver, be sure you have a
  759. bootable floppy disk as insurance against trouble getting your system to run
  760. after the device driver is installed.
  761.  
  762.  
  763.                                        10
  764.  
  765.  
  766. International users should be aware of the following:
  767.  
  768.  * If you are using the KEYB program to set up your keyboard, the following
  769.    command MUST be executed after you load KEYB, otherwise most ANSIPLUS
  770.    keyboard related features will not work:
  771.  
  772.             SETAPLUS LINK KEYEVENT
  773.  
  774.    The INSTALL program will automatically add this command to your AUTOEXEC.bat
  775.    file if it finds a reference in it to KEYB.
  776.  
  777.  * If you are using the DISPLAY.sys device driver for code page switching, the
  778.    ANSIPLUS.sys device driver must be installed before DISPLAY.sys in your
  779.    CONFIG.sys file.  The INSTALL program will automatically handle this in most
  780.    cases.  However, under DOS 6.0, if ANSIPLUS is installed in a configuration
  781.    block that will be processed by MS-DOS after the configuration block that
  782.    contains DISPLAY.sys, this situation will not be detected by INSTALL.  This
  783.    must be corrected by directly editing CONFIG.sys.  If you are also using
  784.    Windows, see "ANSIPLUS and Windows 3" starting on page 38 for Windows
  785.    configuration changes you must make if you are using DISPLAY.sys.
  786.  
  787. Stacker users should note: On systems using Stacker or similar disk compression
  788. utilities that can change the hard disk drive letters around, INSTALL should
  789. still be able to locate CONFIG.sys, AUTOEXEC.bat or the ANSIPLUS driver file if
  790. it was previously installed.  When CONFIG.sys is not found on the (hard disk)
  791. target drive, other drives will be searched for it, starting with drive C:.
  792. AUTOEXEC.bat is then assumed to reside on either the target drive or the same
  793. drive as CONFIG.sys.  And if the ANSIPLUS driver is not found where CONFIG.sys
  794. says it will be, the same path on other drives will be searched for it as well.
  795. In the event that these search rules still cannot locate the correct files, a
  796. system environment variable (SET ANSIPLUS=d:) may be used to identify the drive
  797. with CONFIG.sys and the ANSIPLUS driver, and this will override the search.
  798.  
  799. It is strongly recommended that ANSIPLUS be permanently excluded from automated
  800. memory loading optimizations, such as DOS 6+ MEMMAKER, QEMM OPTIMIZE, or 386MAX
  801. MAXIMIZE.  There are three reasons for this:
  802.  
  803.  * The ANSIPLUS "/U" memory loading option, which loads ANSIPLUS shared code to
  804.    upper memory blocks, is likely to confuse the optimizers because the driver
  805.    memory requirements change depending on whether ANSIPLUS is loaded low or
  806.    high, and when the driver is loaded low, ANSIPLUS allocates some upper
  807.    memory blocks itself.
  808.  
  809.  * Changes you make at a later date with the NEWAPLUS program to driver table
  810.    sizes can result in a larger load size for the ANSIPLUS driver.  This could
  811.    cause the driver or something loaded after it to be loaded low instead of
  812.    high, either because the driver is larger than the (QEMM) response file
  813.    expects, or it has become too large for everything to fit in the space
  814.    available.
  815.  
  816.  * ANSIPLUS has seven memory loading options that may be easily selected using
  817.    NEWAPLUS.exe.  Some of these options let you place part of the driver in EMS
  818.    memory or HMA, which the memory managers cannot do.  The memory managers
  819.    give only two choices: low or high.  You therefore have more control using
  820.    NEWAPLUS.
  821.  
  822.                                        11
  823.  
  824.  
  825. ANSIPLUS can be permanently excluded from MEMMAKER by adding a line containing
  826. "*ANSIPLUS" to the file MEMMAKER.inf.  Exclusion from QEMM's OPTIMIZE is
  827. accomplished by adding a line containing "ANSIPLUS" to the file OPTIMIZE.exc in
  828. the QEMM directory (create this file if it doesn't exist).
  829.  
  830. The following examples illustrate using INSTALL to install ANSIPLUS:
  831.  
  832.  * If you received ANSIPLUS on a floppy disk and want to install it on your
  833.    hard disk, use the following installation procedure:
  834.  
  835.      (1) Set the default directory to the hard disk (i.e., get a C> prompt).
  836.  
  837.      (2) Insert the ANSIPLUS diskette in drive A: (or other floppy drive).
  838.  
  839.      (3) Enter the following command:
  840.  
  841.             A:INSTALL
  842.  
  843.  * If you received ANSIPLUS as a ZIP file (named ANSIPLUS.zip in this example),
  844.    use the following procedure:
  845.  
  846.      (1) Create a temporary sub-directory on the hard disk to contain the
  847.          unzipped ANSIPLUS files.  Move ANSIPLUS.zip to this directory and make
  848.          it be the default directory.  This directory must be different from
  849.          the directory that will receive the installed ANSIPLUS files.
  850.  
  851.      (2) Unzip the files into the directory with the command:
  852.  
  853.             PKUNZIP ANSIPLUS
  854.  
  855.      (3) Then enter the command:
  856.             INSTALL
  857.  
  858.           After installation is complete, you may delete the files in the
  859.           temporary sub-directory (but keep the ZIP file as a backup).
  860.  
  861.  * To install ANSIPLUS on bootable disk B:, from hard disk directory C:\APLUS,
  862.    enter the command:
  863.  
  864.             C:\APLUS\INSTALL B:
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.                                        12
  882.  
  883.                 CHANGING THE ANSIPLUS STARTUP CONFIGURATION
  884.  
  885. Changes to the startup configuration for ANSIPLUS are made with the NEWAPLUS
  886. program.  (INSTALL also lets you make these changes, but INSTALL.exe is
  887. actually a tiny program that calls NEWAPLUS.exe to perform the installation.)
  888. All changes that you make with the NEWAPLUS.exe program will take effect only
  889. after you reboot your computer.  You run NEWAPLUS with a command of the form:
  890.  
  891.             NEWAPLUS <target>
  892.  
  893. where <target> is the drive letter for a bootable diskette or hard disk
  894. partition with ANSIPLUS installed.  If <target> is omitted, the drive that was
  895. originally used to load MS-DOS will be selected.  After NEWAPLUS confirms that
  896. the target disk contains ANSIPLUS, you are presented with a startup
  897. configuration menu that has eleven revision option groups:
  898.  
  899. Initial Colors
  900.  
  901.  * Color selection sub-menus let you choose from the current 16-color palette
  902.    the screen colors that will be used for text foreground and background when
  903.    the system starts up.  ANSIPLUS maintains two sets of foreground and
  904.    background colors: those that are currently on the screen, and "default"
  905.    colors to be applied when an ANSI Set Graphics Rendition reset (i.e., Esc
  906.    [0m) is detected.  The startup selections for both color combinations can be
  907.    controlled from this sub-menu.
  908.  
  909. Palette Definition
  910.  
  911.  * The color palette determines the precise colors you will see in 16 color
  912.    video modes.  ANSIPLUS maintains two palettes: the current palette on the
  913.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  914.    whenever the video display mode is changed.  All changes you make using the
  915.    NEWAPLUS color palette option will apply to the default palette.
  916.  
  917. Border Color
  918.  
  919.  * The border color is generated for the "overscan" region on the outside edges
  920.    of the screen.  You can select any available color as the default border
  921.    color, which will be installed when ANSIPLUS starts up and whenever the
  922.    display mode is set.
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.                                        13
  941.  
  942.  
  943. Loading Option
  944.  
  945. ANSIPLUS can be loaded into memory up to seven different ways, depending on
  946. your computer's capabilities and what is contained in CONFIG.sys:
  947.  
  948.  * ANSIPLUS can be loaded into low memory below 640K. This is the default.
  949.    The following CONFIG.sys command loads ANSIPLUS to low memory:
  950.  
  951.        DEVICE=ANSIPLUS.sys
  952.  
  953.  * ANSIPLUS can load itself into upper memory blocks.  At load time, the driver
  954.    can divide itself into two sections: sharable code totaling about 21K, and
  955.    unsharable code/data totaling about 5K.  The shared code can be placed in
  956.    XMS upper memory blocks (from 640K to 1M), in high memory (1M to 1M+64K), or
  957.    in expanded memory (EMS), leaving only the unsharable 5K in low memory.
  958.    Because all ANSIPLUS driver data remains in low memory as part of the DOS
  959.    CON driver, it will be localized under Windows 3.0.  Under DOS 5.0 or later,
  960.    this option should work whether DOS=UMB appears in CONFIG.sys or not.  The
  961.    following CONFIG.sys command loads ANSIPLUS into the XMS upper memory
  962.    blocks:
  963.  
  964.        DEVICE=ANSIPLUS.sys /U
  965.  
  966.  * ANSIPLUS can load itself into the high memory addressed just above 1
  967.    megabyte (the "HMA").  Under DOS 5.0 or later, with the DOS=HIGH line in
  968.    CONFIG.sys, ANSIPLUS shares this memory with DOS; if DOS=HIGH is not used,
  969.    but an XMS driver is installed, the HMA is obtained from the XMS driver; or,
  970.    for earlier DOS versions or systems not using an XMS driver, the HMA is
  971.    taken in the same manner as the VDISK.sys driver allocates extended memory.
  972.    When ANSIPLUS is loaded into the HMA, certain (antique) programs that assume
  973.    memory addresses over one megabyte will "wrap around" to addresses starting
  974.    at zero may not operate correctly.  If you experience any problems, load
  975.    ANSIPLUS into XMS upper memory blocks, expanded memory or low memory
  976.    instead.  The following CONFIG.sys command will load ANSIPLUS into the high
  977.    memory area:
  978.  
  979.        DEVICE=ANSIPLUS.sys /H
  980.  
  981.  * ANSIPLUS can load itself into expanded memory (EMS) which conforms to LIM
  982.    (Lotus-Intel-Microsoft) Specification 4.0 or 3.2, eliminating the need for
  983.    21K of scarce UMB, HMA or low memory resources.  Because expanded memory may
  984.    be shared with other programs, drivers or TSRs, there is a chance of a
  985.    software interaction that may prevent an application from running, keep
  986.    Windows from loading, or cause the system to fail.  (For example, Version 6
  987.    of 386MAX will refuse to let Windows start in 386 Enhanced mode when
  988.    ANSIPLUS is running in EMS.  This limitation does not exist for the EMM386
  989.    or QEMM386 memory managers.) If you experience any problems using ANSIPLUS
  990.    in EMS, do not use the feature.  Load ANSIPLUS into XMS upper memory, the
  991.    HMA, or low memory instead.  The following CONFIG.sys command will load
  992.    ANSIPLUS into expanded memory:
  993.  
  994.        DEVICE=ANSIPLUS.sys /E
  995.  
  996.  
  997.  
  998.  
  999.                                        14
  1000.  
  1001.  
  1002.  * ANSIPLUS can be loaded high by DEVICEHIGH or equivalent.  This method is not
  1003.    recommended for users of Windows 3.0 386 Enhanced Mode because the variables
  1004.    in the ANSIPLUS driver will not be localized.  Localization of upper memory
  1005.    blocks is done correctly by Windows 3.1.  See "ANSIPLUS and Windows 3,"
  1006.    starting on page 38 for a discussion of this issue if you are using Windows
  1007.    3.0.  The following CONFIG.sys command will load ANSIPLUS high using EMM386:
  1008.  
  1009.        DEVICEHIGH=ANSIPLUS.sys
  1010.  
  1011.  * ANSIPLUS can be loaded high, and then its shared code can be placed in HMA.
  1012.    This requires only 5K of XMS upper memory after ANSIPLUS has completed its
  1013.    initialization.  However, upper memory space for the entire driver must be
  1014.    available when it is first loaded:
  1015.  
  1016.        DEVICEHIGH=ANSIPLUS.sys /H
  1017.  
  1018.  * ANSIPLUS can be loaded high, and then its shared code can be placed in EMS:
  1019.  
  1020.        DEVICEHIGH=ANSIPLUS.sys /E
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.                                        15
  1059.  
  1060.  
  1061. Keyboard
  1062.  
  1063.  * By default, ANSIPLUS increases the keyboard buffer capacity to 128
  1064.    characters, which should hold at least as much as most users can type ahead
  1065.    accurately.  To expand the computer's keyboard buffer capacity, an extension
  1066.    buffer is retained within ANSIPLUS, and whenever the ROM BIOS buffer has
  1067.    space available for keys held in the ANSIPLUS buffer, they are moved into
  1068.    the standard ROM BIOS buffer.  You configure this buffer by specifying the
  1069.    total number of keys to be buffered.
  1070.  
  1071.  * The keyboard repeat rate determines how fast keys will be generated when a
  1072.    key is held down and not lifted.  For systems with enhanced keyboards,
  1073.    ANSIPLUS lets this rate be configured anywhere from 2 to 300 characters per
  1074.    second.  For most applications, an ANSIPLUS repeat rate setting greater than
  1075.    30 characters per second will take precedence over the keyboard repeat rate
  1076.    set by other programs, such as the DOS MODE program.  Because of imprecise
  1077.    timing under Windows, however, this feature is disabled when Windows is
  1078.    running.  If desired, it may also be disabled entirely to use the standard
  1079.    rate.
  1080.  
  1081.  * The keyboard typematic delay, which determines how long a key must be held
  1082.    down before repeated keys will start to be generated, is also configurable.
  1083.    ANSIPLUS accepts four settings from 250 ms to 1000 ms.
  1084.  
  1085.  * Normally, the Caps Lock key locks the alphabetic keys in upper case, and
  1086.    when a shift key is held down, letters are entered in lower case.  This
  1087.    continues until Caps Lock is pressed again to unlock the Caps, and can often
  1088.    be confusing if you forget that Caps were locked.  ANSIPLUS has an option to
  1089.    have shift-alphabetic keys cause the Caps to unlock, much like a typewriter
  1090.    releases its shift lock whenever a shift key is pressed.
  1091.  
  1092.  * In many cases, when Caps Lock has been released by a shift-alphabetic key
  1093.    combination, mixed upper and lower case characters are needed for only a
  1094.    single entry, and Caps Lock should be reinstated thereafter.  ANSIPLUS
  1095.    includes an option to turn Caps Lock back on again when the Enter key is
  1096.    pressed after Caps were unlocked by a shift-alphabetic key, thus restoring
  1097.    Caps Lock on completion of an "entry."
  1098.  
  1099.  * For those users who find it more convenient to break out of programs with
  1100.    the Control-C key combination than with Control-Break, ANSIPLUS has an
  1101.    option to generate a keyboard break whenever Control-C is entered.
  1102.  
  1103.  * The "Non-Destructive" read function of the DOS driver reads an input key
  1104.    from the keyboard unofficially just to see what it is, allowing it to really
  1105.    be read later.  This function is used to see what has been typed, and to
  1106.    read it or flush the keyboard buffer only if it matches some criterion (such
  1107.    as Escape or Control-C).  Because the standard DOS keyboard driver always
  1108.    looks at the first key in the buffer, if it doesn't meet the criterion, no
  1109.    matter what is typed later will not be checked.  ANSIPLUS gets around this
  1110.    with an option to return the last key from the buffer instead of the first.
  1111.  
  1112.  * Key stacking can be disabled to use another key stacking driver (for
  1113.    example, NDOS KEYSTACK.sys), or when typing files that contain unknown ANSI
  1114.    escape sequences that might execute undesired commands.  When disabled, a
  1115.    warning tone will sound on any attempt to stack keys by ANSI escape
  1116.    sequence.
  1117.                                        16
  1118.  
  1119.  
  1120. Assigning Keys
  1121.  
  1122.  * ANSIPLUS has the ability to translate single keystrokes to full commands or
  1123.    other pre-determined key sequences.  This feature is called key
  1124.    reassignment, and it can be enabled or disabled without affecting the
  1125.    contents of the key reassignment tables stored within the ANSIPLUS device
  1126.    driver.
  1127.  
  1128.  * Ordinarily, key reassignment applies only to input keys requested from DOS,
  1129.    so programs that bypass DOS and use BIOS Interrupt 16h for keyboard input
  1130.    will not have any keys reassigned.  This is usually desirable, since major
  1131.    applications generally have built-in assumptions about the meaning of
  1132.    function and Alt keys, and these should be operative.  An ANSIPLUS feature
  1133.    is provided for those cases when you want to reassign keys for applications
  1134.    that bypass DOS and use Int 16h for keyboard input.  If you enable this
  1135.    feature, key reassignment will apply to all keystrokes entered through both
  1136.    Int 16h and DOS.  If it is disabled, key reassignment will only apply for
  1137.    keys requested from DOS.
  1138.  
  1139.  * ANSIPLUS can also prevent ANSI key reassignment redefinition.  This can be
  1140.    useful before trying ANSI files that contain unknown ANSI sequences that
  1141.    might redefine keys to execute undesired commands.  A warning tone (like the
  1142.    theme from "Dragnet") will sound whenever an attempt to redefine a key
  1143.    reassignment is detected.
  1144.  
  1145.  * The space allocated for storing ANSI keystroke reassignments may also be
  1146.    configured.  Each key reassignment requires approximately four bytes plus
  1147.    the length of the reassignment.  You configure the total table size in
  1148.    bytes.
  1149.  
  1150.  
  1151. Tone Definition
  1152.  
  1153.  * The ANSIPLUS driver includes a timer-interrupt controlled Control-G beep
  1154.    tone generator that lets the beep tone be finished in parallel with
  1155.    subsequent processing.  Multiple beeps are ignored if a tone is currently
  1156.    being output, so programs cannot be slowed down by a rapid series of beeps.
  1157.    The tone generator is used for both standard DOS console output and BIOS Int
  1158.    10h Write TTY calls.  If the tone generator is disabled, the original DOS
  1159.    beep tone will be used.
  1160.  
  1161.  * When Windows 3 is running in 386 Enhanced mode, and a DOS program running in
  1162.    the background outputs a Control-G, the background program's virtual 8086
  1163.    may not be running fast enough to accurately time the tone.  Because of
  1164.    this, the tone can drag out and sound strange.  Disabling ANSIPLUS tone
  1165.    generation under Windows restores the original Windows sound driver, but
  1166.    makes the tone frequency and duration non-configurable.
  1167.  
  1168.  * The beep tone definition is stored in a table in the ANSIPLUS driver that
  1169.    requires four bytes per frequency and duration.  You can configure the size
  1170.    of this table by specifying the maximum number of notes allowed in the beep.
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.                                        17
  1177.  
  1178.  
  1179. Color Control
  1180.  
  1181.  * The ANSIPLUS driver ordinarily traps all video mode changes and installs the
  1182.    palette and/or DAC colors of the user's, or of ANSIPLUS's default color
  1183.    scheme.  Applications that set their own palettes will continue to do so,
  1184.    but those that do not will use the installed color choices.  If this feature
  1185.    is disabled, the VGA/EGA controller manufacturer's colors (the "OEM" colors)
  1186.    will be loaded when the video mode changes.
  1187.  
  1188.  * Some 256-color DOS applications assume that the OEM 256-color palette has
  1189.    been loaded when the 256-color mode was selected, and never define the
  1190.    colors that they will use.  A feature is provided to disable ANSIPLUS color
  1191.    loading for DOS 256-color modes if you are running such an application.
  1192.  
  1193.  * Some 256-color drivers for Windows apparently assume that the OEM 256-color
  1194.    palette has been loaded when the 256-color mode was selected, and never
  1195.    define the colors that Windows will use.  Because of this, ANSIPLUS normally
  1196.    does not load its default colors when a 256-color mode is selected under
  1197.    Windows.  However, a separate feature is provided to allow this if desired.
  1198.  
  1199.  * In color text modes, the VGA and EGA allow either sixteen background colors
  1200.    with no blinking foreground text, or eight background colors with foreground
  1201.    text that may or may not blink.  In monochrome text mode 07h, when blinking
  1202.    is disabled there are three backgrounds possible: black, gray or white, and
  1203.    with blinking enabled there are two: black and gray.  If blinking is
  1204.    disabled, ANSIPLUS will display sixteen (or three) background colors, and
  1205.    when it is enabled, you will see only eight (or two) background colors.
  1206.  
  1207.  * ANSIPLUS highlights user-typed keys when they are displayed on the screen,
  1208.    giving a clear visual separation of typed entries from computer output.
  1209.    Over dark backgrounds, the key is shown in white, and over light backgrounds
  1210.    it is shown in black.  If this feature is not wanted, it can be disabled.
  1211.  
  1212.  * Because application developers with VGA color monitors sometimes need to see
  1213.    how their systems will look when run with a VGA monochrome monitor, ANSIPLUS
  1214.    provides emulation of monochrome monitor VGA on a color monitor.  In normal
  1215.    operation, this feature should be disabled.
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.                                        18
  1236.  
  1237. Display Control
  1238.  
  1239.  * The ANSIPLUS screen saver blanks the VGA/EGA screen after several minutes of
  1240.    screen, keyboard and mouse inactivity.  The screen is brought back by any
  1241.    keystroke, including shift keys, or, if a mouse is connected, by moving it
  1242.    or pressing a button.  The screen saver is automatically disabled under
  1243.    Windows and when certain games or other programs that take over the timer
  1244.    are running, and does not interfere with any known programs.  However, if
  1245.    this feature is not desired, it can be turned off.
  1246.  
  1247.  * The time of inactivity before the screen goes blank is configurable between
  1248.    one and twenty minutes.
  1249.  
  1250.  * As a "last resort" test for system activity, the screen saver can read scan
  1251.    codes from the keyboard controller at port 60h.  This test should only be
  1252.    needed when you are running an application that completely takes over all
  1253.    keyboard interrupts and directly controls the screen display as well.  On
  1254.    some computers, enabling this feature can interfere with processing of the
  1255.    arrow and page up/down keys on enhanced keyboards, or with a PS/2 type
  1256.    mouse, so the feature should be disabled unless it is really needed to keep
  1257.    the screen saver from blanking the screen during a specific application.
  1258.  
  1259.  * During periods of keyboard inactivity, ANSIPLUS's screen saver uses MS mouse
  1260.    Int 33h calls to test the status of the mouse.  In the unlikely event these
  1261.    calls interfere with the mouse driver, they can be disabled.
  1262.  
  1263.  * On the IBM PS/2, the mouse is usually connected to the pointing device port,
  1264.    and mouse activity will cause interrupts on the Mouse Event interrupt number
  1265.    74h, so ANSIPLUS monitors this interrupt to unblank the screen.  If this
  1266.    interrupt is used for another purpose on your computer, this feature should
  1267.    be disabled.
  1268.  
  1269.  * The DOS console drivers do not show a cursor on the screen when using a
  1270.    graphics mode.  ANSIPLUS can display a pseudo-cursor when keyed entries are
  1271.    requested by DOS in a graphics mode.  If this feature is desired, it can be
  1272.    enabled.  If it interferes with the appearance of a graphics mode program,
  1273.    it should be left disabled.
  1274.  
  1275.  * Because almost all applications that use 256-color graphics modes assume
  1276.    that DOS does not place a cursor on the screen, the ANSIPLUS pseudo-cursor
  1277.    is normally disabled when in a 256-color mode.  If desired, you can enable
  1278.    the cursor.
  1279.  
  1280.  * Programs that write screen output using ROM BIOS Int 10h Function 14 (Write
  1281.    TTY) ordinarily cannot use ANSI Escape sequences for screen control.
  1282.    ANSIPLUS includes a feature to allow this.
  1283.  
  1284.  * When the VGA/EGA video controller does not allow setting a palette register
  1285.    unless a vertical retrace is in progress, or when "snow" or other problems
  1286.    occur during palette color changes, ANSIPLUS provides an option to wait for
  1287.    a vertical retrace whenever setting a palette register.  Otherwise, this
  1288.    feature should remain disabled.
  1289.  
  1290.  * ANSIPLUS contains an internal stack for saving and restoring video context
  1291.    information (rows and columns, colors, display modes, etc.).  The default
  1292.    size allows 25 pushes, but this can be configured to a larger value if
  1293.    needed.
  1294.                                        19
  1295.  
  1296. Screen Scroll-Back
  1297.  
  1298.  * As lines are scrolled off the top of the screen, the ANSIPLUS driver can
  1299.    save them for later viewing.  This viewing is called screen scroll-back.
  1300.    Most of the time this is a very useful and unobtrusive feature, but if it is
  1301.    not desired, or if storage of the saved lines in either expanded memory
  1302.    (EMS) or unused portions of the video RAM is found to interfere with
  1303.    something, it can be disabled.
  1304.  
  1305.  * Ordinarily, when ANSIPLUS is initialized by DOS, it will try to allocate 64K
  1306.    of expanded memory (LIM EMS 4.0) for scroll-back.  When EMS is used for
  1307.    scroll-back, storage capacity will be about 1,000 lines, and the scroll-back
  1308.    data will be preserved as long as the computer is on.  (If the ANSIPLUS
  1309.    shared code was loaded into EMS, it will share the same 64K area as scroll-
  1310.    back, reducing capacity by 30 percent.) If EMS memory is unavailable, then
  1311.    scroll-back will be stored in unused portions of the video RAM instead,
  1312.    cutting capacity to about 500 lines, which will be lost every time the
  1313.    display mode changes.  A configurable feature is provided that can prevent
  1314.    DOS EMS memory from being allocated for scroll-back and force any
  1315.    scroll-back data to reside in video RAM.
  1316.  
  1317.  * Under Windows, when a 386 Enhanced Mode DOS session starts, ANSIPLUS will
  1318.    try to allocate 64K of private expanded memory (EMS) for scroll-back (48K if
  1319.    ANSIPLUS shared code was loaded into EMS).  If the EMS is not available (for
  1320.    example, if the Windows PIF file for the application does not provide
  1321.    expanded memory), then video RAM will be used for scroll-back instead.
  1322.    ANSIPLUS provides a configurable feature that can prevent Windows EMS from
  1323.    being allocated for scroll-back and force any Windows DOS session
  1324.    scroll-back to reside in video RAM.  This is not recommended, however,
  1325.    because scroll-back in video RAM under Windows is not reliable when used
  1326.    with many Windows video drivers.
  1327.  
  1328.  * The recommended location for scroll-back data under Windows is expanded
  1329.    memory (EMS).  When EMS memory cannot be used, if you want to use
  1330.    scroll-back under Windows, you must enable a feature that allows using video
  1331.    RAM for scroll-back instead.  When running DOS applications in 386 Enhanced
  1332.    Mode, Windows will not maintain a full 32K of text mode RAM unless the
  1333.    Windows PIF file specifies "High Graphics" and "Retain Video Memory", and
  1334.    even then some Windows 3.1 video drivers (eg., 256-color ET-4000) will not
  1335.    work correctly when video RAM outside the visible screen is accessed,
  1336.    resulting in loss of scroll-back text or incomplete updating of the screen.
  1337.    You therefore should exercise caution before relying on this feature.  For
  1338.    further information, see "ANSIPLUS and Windows 3" starting on page 38.
  1339.  
  1340.  * Another feature only applies when video RAM is used to hold scroll-back
  1341.    data.  On systems running a suitable XMS driver such as QEMM or HIMEM,
  1342.    ANSIPLUS can allocate XMS memory to hold scroll-back data when changing
  1343.    video display modes or when running graphics mode applications (including
  1344.    Windows).  DOS sessions under Windows 3.1 can also use XMS memory for this
  1345.    purpose if they are run from a PIF file that provides at least 32K of XMS
  1346.    memory.  If the ANSIPLUS driver will be loaded into the High Memory Area
  1347.    (HMA) and is not sharing this area with DOS, then ANSIPLUS will preserve
  1348.    scroll-back in HMA instead of XMS memory, except when Windows is is running;
  1349.    otherwise, XMS memory will be used.  Because calls to some XMS drivers may
  1350.    require a lot of stack space, this feature should be disabled if you have
  1351.    reliability problems during display mode changes.
  1352.  
  1353.                                        20
  1354.  
  1355.  
  1356.  * ANSIPLUS captures for scroll-back all standard DOS output that is scrolled
  1357.    off the top of the screen or cleared from the screen.  An option is provided
  1358.    to capture full lines scrolled off the top by BIOS calls, as well as screens
  1359.    not containing DOS output, when they are cleared by BIOS call.
  1360.  
  1361.    Under Windows 3.1, when a DOS session is running in a window, some Windows
  1362.    video drivers (for example, the Microsoft Windows 3.1 VGA driver) trap BIOS
  1363.    scrolling calls completely and do not pass them through to the DOS virtual
  1364.    8086, making it impossible for ANSIPLUS to reliably capture lines scrolled
  1365.    by BIOS call when Windows is running.
  1366.  
  1367.  * Every time that video page 0 (the normal video page for all DOS output) is
  1368.    cleared, the first through last non-blank lines on the screen (plus one
  1369.    above and below) are captured for scroll-back.  When the second and higher
  1370.    video pages are cleared, they will not be saved unless lines have been
  1371.    scrolled off the top.  An option is provided to capture the higher video
  1372.    pages too when they are cleared.
  1373.  
  1374.  * When EMS memory is not used for scroll-back, ANSIPLUS stores captured screen
  1375.    lines in unused parts of the video RAM, with usage based on whether a
  1376.    display page has ever been selected for display.  Almost all text mode
  1377.    applications select a page before filling it with text, so ANSIPLUS should
  1378.    generally know what is used and what isn't.  However, a few applications,
  1379.    such as the Norton Utilities Version 7, appear to use the second video page
  1380.    without ever selecting it to save the original contents of the screen as the
  1381.    program starts up.  This action will wipe out any scroll-back data in the
  1382.    second page, and when the original screen is cleared by the program,
  1383.    scroll-back lines may be stored into the saved screen, causing gibberish to
  1384.    be restored to the screen when the program terminates.  To address this
  1385.    problem, a configurable feature is provided to protect the second video page
  1386.    from scroll-back storage.  However, when this feature is enabled, storage
  1387.    capacity for scroll-back in the video RAM will be reduced by one page.
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.                                        21
  1413.  
  1414.  
  1415. Other Scrolling
  1416.  
  1417.  * ANSIPLUS uses the Scroll-Lock key as a hot key for freezing fast screen
  1418.    output and for activating screen scroll-back.  If these features are not
  1419.    desired, or to run those few applications that use Scroll-Lock for other
  1420.    purposes, the ANSIPLUS Scroll-Lock key can be disabled.  However, before you
  1421.    completely disable ANSIPLUS's Scroll-Lock key, try the Alt-Scroll-Lock
  1422.    combination instead (see next option).
  1423.  
  1424.  * An alternative hot key is Alt-Scroll-Lock.  If this key is enabled, the Alt
  1425.    key must be pressed simultaneously with the Scroll-Lock key to cause the
  1426.    ANSIPLUS Scroll-Lock function to be activated.  If it is disabled, the
  1427.    Scroll-Lock key will function with or without any other simultaneous key.
  1428.  
  1429.  * Smooth scrolling can gradually move the entire screen's text up so it can be
  1430.    read while it moves.  This feature can also be toggled on and off by the
  1431.    Shift-Scroll Lock key combination.  Smooth scrolling will appear
  1432.    unacceptably choppy on computers with lower powered CPUs and/or video
  1433.    controllers that cannot move a full screen of text in the video RAM
  1434.    completely during a vertical retrace.  If this occurs, the feature should
  1435.    not be used.
  1436.  
  1437.  * Smooth scrolling may interfere with certain Windows video display drivers
  1438.    when the DOS session is run in a window, not full screen.  For example, the
  1439.    256-color drivers for the Tseng ET4000 may leave undrawn black areas on the
  1440.    screen when scrolling occurs in a window while smooth scrolling is active.
  1441.    Because of this, smooth scrolling should be disabled under Windows unless
  1442.    you are certain that your video driver can handle it or that you will be
  1443.    running all DOS sessions full screen.
  1444.  
  1445.  * Because it takes time to smoothly scroll the screen, smooth scrolling of
  1446.    large amounts of screen output can significantly delay the computer.  An
  1447.    option is provided to increase the scrolling rate when the smooth scrolling
  1448.    operation is taking a significant proportion of the computer's time.  This
  1449.    can help, for example, to prevent data overruns when smooth scrolling is
  1450.    used with a communications program that scrolls the entire screen.
  1451.  
  1452.  * ANSIPLUS normally handles all text mode scrolling itself directly in the
  1453.    video display RAM.  This may confuse some other device drivers or TSRs that
  1454.    are installed and need to know when the screen is being scrolled.  In such
  1455.    cases, a feature can be enabled to cause BIOS calls for screen scrolling.
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.                                        22
  1472.  
  1473. IV.  USING ANSIPLUS
  1474.  
  1475. This chapter describes your controls over ANSIPLUS when it is running.  Five
  1476. subjects are covered: special keyboard functions; selecting and defining colors
  1477. with the SETCOLOR.exe utility program; controlling other ANSIPLUS features with
  1478. the SETAPLUS.exe utility program; creating batch files for configuring
  1479. applications; and editing ANSI-type escape sequence programs and files with the
  1480. ANSICOM.exe program.
  1481.  
  1482.                         SPECIAL KEYBOARD FUNCTIONS
  1483.  
  1484. ANSIPLUS uses special keyboard control to implement its scrolling functions.
  1485. To activate these, the Scroll-Lock (or Alt and Scroll-Lock) key is used as a
  1486. hot key toggle:
  1487.  
  1488.   Scroll-Lock       enables or disables screen scroll freezing and scroll-back
  1489.   Shift-Scroll-Lock enables or disables smooth scrolling
  1490.  
  1491. When your Scroll-Lock toggle is recognized by the computer, you will hear a
  1492. short tone.  When the screen is frozen by Scroll-Lock, (as indicated by the
  1493. light on enhanced keyboards), normal key input is disabled and the following
  1494. keys apply:
  1495.  
  1496.   Home          Go to the top of the lines saved for scroll-back
  1497.   PageUp        Scroll up one page
  1498.   Shift         Scroll up one-half page tab
  1499.   Up arrow      Scroll up one line
  1500.  
  1501.   End           Go to the bottom (i.e., the original screen display)
  1502.   PageDn        Scroll down one page
  1503.   Tab           Scroll down one-half page
  1504.   Down arrow    Scroll down one line
  1505.  
  1506.   Ctrl-Home     Delete all scroll-back older than that visible on the screen
  1507.   Ctrl-End      Delete all scroll-back visible on the screen or newer
  1508.  
  1509.   Left          View a lower numbered display page arrow
  1510.   Right         View a higher numbered display page arrow
  1511.  
  1512.   Escape        Cancel scroll lock, return to normal key processing
  1513.   Scroll lock   Cancel scroll lock, return to normal key processing
  1514.  
  1515. If you try to exceed the limit of travel up, down, left or right, a short low
  1516. pitched tone will sound.  If you enter any key other than those above, you will
  1517. hear a short warbling sound, Scroll Lock will be canceled, the screen will
  1518. return to its normal display, and the key will be passed back to the running
  1519. program.  If the screen was frozen during output, the PageDn, Tab and Down
  1520. arrow keys will allow one page, one-half page, and one line of additional
  1521. output, respectively, before freezing the screen again.  Pressing a shift key
  1522. will release the screen as long as the shift key is held down.
  1523.  
  1524. Another special key combination is used with the ANSIPLUS screen saver.  If the
  1525. screen saver is enabled, the following key combination may be used to blank the
  1526. screen without waiting the full blanking time:
  1527.  
  1528.   Alt-Ctrl-Scroll Lock      Blank the screen immediately
  1529.  
  1530.                                        23
  1531.  
  1532.                        SELECTING AND DEFINING COLORS
  1533.  
  1534. The SETCOLOR.exe utility program provides extensive control over colors for
  1535. your running system.  With this program, the user can view the current colors,
  1536. select colors for use, create and apply named color schemes, edit the color
  1537. palette, set the border color, and save and load color definitions.  Changes
  1538. made with SETCOLOR.exe are in effect only as long as your system is running.
  1539. To change the colors for system bootup, use the NEWAPLUS.exe program.
  1540. SETCOLOR.exe is executed by a command of the form:
  1541.  
  1542.         SETCOLOR <keyword> [<keyword> ...]
  1543.  
  1544. where each <keyword> selects a foreground or background color or other option.
  1545. If no <keyword> is supplied, you are presented with a menu of choices:
  1546.  
  1547.  * Color selection submenus let you choose from the current 16-color palette
  1548.    the screen colors that will be used for text foreground and background.
  1549.    ANSIPLUS maintains two sets of foreground and background colors: those that
  1550.    are currently on the screen, and default colors to be applied when an ANSI
  1551.    Set Graphics Rendition reset (i.e., Esc [0m) is detected.  You can control
  1552.    both color combinations from this sub-menu.
  1553.  
  1554.  * The color palette determines the precise colors you will see in 16 color
  1555.    video modes.  ANSIPLUS maintains two palettes: the current palette on the
  1556.    screen, and a default palette that is loaded when ANSIPLUS first starts and
  1557.    whenever the video display mode is changed.  You can control both palettes
  1558.    using this option, but unless you specifically set the default for each
  1559.    color you redefine, your colors will only apply until the next display mode
  1560.    change.
  1561.  
  1562.  * The border color is generated for the "overscan" region on the outside edges
  1563.    of the screen.  Again, ANSIPLUS maintains both a current border color and a
  1564.    default border color.  You can select any available color as border color,
  1565.    and can control both the current and default borders with this option.  As
  1566.    for palette changes, unless you specifically set the default border color,
  1567.    your border color will apply only until the next display mode change.
  1568.  
  1569. From the command line, colors may be selected by name or code number, where
  1570. codes 0-15 identify the 16 palette colors, 128-143 select foreground colors,
  1571. and 192-207 select background colors.  The relationship between color names and
  1572. code numbers is depicted in Table 4-1:
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.                                        24
  1590.  
  1591.        +--------------------------------------------------------+
  1592.        |                      Table 4-1                         |
  1593.        |                Color Names and Codes                   |
  1594.        +-------------------+--------+--------------+------------+
  1595.        |                   | Color  |  Foreground  | Background |
  1596.        | Color Name        |  Code  |     Code     |    Code    |
  1597.        +-------------------+--------+--------------+------------+
  1598.        | BLACK             |    0   |      128     |     192    |
  1599.        | DKGRAY            |    8   |      136     |     200    |
  1600.        | GRAY              |    7   |      135     |     199    |
  1601.        | WHITE             |   15   |      143     |     207    |
  1602.        | RED               |    9   |      137     |     201    |
  1603.        | DKRED             |    1   |      129     |     193    |
  1604.        | BROWN             |    3   |      131     |     195    |
  1605.        | YELLOW            |   11   |      139     |     203    |
  1606.        | GREEN             |    2   |      130     |     194    |
  1607.        | LTGREEN           |   10   |      138     |     202    |
  1608.        | CYAN              |    6   |      134     |     198    |
  1609.        | LTCYAN            |   14   |      142     |     206    |
  1610.        | BLUE              |    4   |      132     |     196    |
  1611.        | LTBLUE            |   12   |      140     |     204    |
  1612.        | MAGENTA or PURPLE |    5   |      133     |     197    |
  1613.        | LTMAGENTA or PINK |   13   |      141     |     205    |
  1614.        +-------------------+--------+--------------+------------+
  1615.  
  1616. In 256 color modes, you may also use 256-511 to select the foreground, 512-767
  1617. to select the background, or 0-255 after the BORDER keyword to select the
  1618. border color.
  1619.  
  1620. Several modifying keywords can assist the color selection:
  1621.  
  1622.     DARK, DIM or NORMAL for low intensity colors,
  1623.     LIGHT, BRIGHT or INTENSE for high intensity colors,
  1624.     FOREGROUND or FGD for foreground following,
  1625.     BACKGROUND,  BGD, or ON for background following,
  1626.     REVERSE to swap the current foreground and background,
  1627.     BORDER for border color selection following, or
  1628.     DEFAULT to select the current colors as the default colors.
  1629.  
  1630. If named colors or color codes 0-15 are specified without the foreground or
  1631. background keywords, then the first color is assumed to be the foreground and
  1632. the second the background.  Keywords may also be shortened; the first partial
  1633. match will be used.  Several examples may help to clarify these rules:
  1634.  
  1635.     SETCOLOR bgd blue                sets the background to dark blue
  1636.     SETCOLOR light cyan blue default default colors are light cyan foreground
  1637.                                      and blue background
  1638.     SETCOLOR 7,0                     gray foreground, black background
  1639.     SETCOLOR bright green on blue    high intensity green foreground, dark blue
  1640.                                      background
  1641.     SETCOLOR border cyan             set the border color to cyan
  1642.     SETCOLOR reverse                 reverses (swaps) the current foreground
  1643.                                      and background colors
  1644.     SETCOLOR rev                     reverses foreground and background
  1645.  
  1646.  
  1647.  
  1648.                                        25
  1649.  
  1650. Any unmatched keywords are checked against user-defined color schemes in a file
  1651. named SETCOLOR.sch.  This editable ASCII text file, which should be placed in
  1652. the same directory as the SETCOLOR.exe program, contains any number of named
  1653. color schemes of the user's choice.  User supplied color schemes are entered
  1654. into the file with a text editor, with each line entered in the form:
  1655.  
  1656.          <name> = <keyword> [<keyword> ...]
  1657.  
  1658. where <name> is the name of the user supplied color scheme, and <keyword> is
  1659. any valid SETCOLOR program keyword or other option.  Table 4-2 shows the
  1660. SETCOLOR.sch file included with ANSIPLUS as a sample:
  1661.  
  1662.                +---------------------------------------+
  1663.                |               Table 4-2               |
  1664.                |       Sample Color Schemes File       |
  1665.                +---------------------------------------+
  1666.                | evening = light cyan blue border 17   |
  1667.                | night = light blue black border 17    |
  1668.                | dawn = yellow cyan border 35          |
  1669.                | daylight = light blue white border 17 |
  1670.                | sun = bright red yellow border 46     |
  1671.                | sky = blue light blue border 17       |
  1672.                | forest = black green border 24        |
  1673.                | earth = yellow brown border 38        |
  1674.                | regal = pink purple border 21         |
  1675.                | candycane = dark red pink border white|
  1676.                | bw = gray black border dkgray         |
  1677.                +---------------------------------------+
  1678.  
  1679. A user color scheme may be specifically selected on the SETCOLOR command line
  1680. by preceding its name with the keyword SCHEME, for example:
  1681.  
  1682.   SETCOLOR SCHEME JOE selects a color scheme named JOE
  1683.  
  1684. The SETCOLOR program also includes keyword options to reset, edit, load and
  1685. save the current color configuration.  These include:
  1686.  
  1687.     RESET                 Install defaults as the current colors
  1688.     IBM or OEM            Install the OEM VGA/EGA palette as the current colors
  1689.     PALETTE               Edit the color definitions for the 16-color palette
  1690.     SAVEFILE <filename>   Save the current 16-color definitions in a file
  1691.     SAVE256 <filename>    Save the 256 VGA DAC color definitions in a file
  1692.     LOADFILE <filename>   Load a color definition file
  1693.     SAVECURRENT <file>    Save the 16 current colors as an executable program
  1694.     SAVEDEFAULT <file>    Save the 16 default colors as an executable program
  1695.     SAVEPROGRAM <file>    Save both the current and default colors as a program
  1696.  
  1697. The SAVEFILE, SAVE256 and LOADFILE keywords generate and load color definition
  1698. files.  The color definition files created by SAVEFILE contain 36 lines: 32
  1699. lines define the red, green and blue intensities for colors 0 to 15, both
  1700. current and default, and the other four define the current and default
  1701. foreground, background and border colors.  Files created by SAVE256 contain 512
  1702. lines: 256 for the default DACs and 256 for the current DACs.  Table 4-3 is a
  1703. sample of lines from a SAVEFILE color definition file.
  1704.  
  1705.  
  1706.  
  1707.                                        26
  1708.                       +------------------------------+
  1709.                       |          Table 4-3           |
  1710.                       | Sample Color Definition File |
  1711.                       +------------------------------+
  1712.                       |      Default = 142,196       |
  1713.                       |      DBorder = 0,81,162      |
  1714.                       |     DColor 2 = 16,162,81     |
  1715.                       |     DColor 3 = 113,65,16     |
  1716.                       |      DColor 4 = 0,0,105      |
  1717.                       |      DColor 5 = 97,0,97      |
  1718.                       |      Current = 135,192       |
  1719.                       |        Border = 0,0,0        |
  1720.                       |      Color 2 = 0,170,0       |
  1721.                       |     Color 3 = 0,170,170      |
  1722.                       |      Color 4 = 0,0,170       |
  1723.                       |     Color 5 = 170,0,170      |
  1724.                       +------------------------------+
  1725.  
  1726. Users are free to edit color definition files to create their own colors, to
  1727. delete any lines from them, or to put the lines in any order except that all
  1728. default color definitions must precede all current color definitions in the
  1729. file.  If no file name is given for a LOADFILE, SAVEFILE or SAVE256 request,
  1730. the file name SETCOLOR.def in the current directory will be used.  LOADFILE
  1731. checks the system PATH for color definition files to be loaded, so any commonly
  1732. used color files can reside in a directory on the PATH.
  1733.  
  1734. The SAVECURRENT, SAVEDEFAULT, and SAVEPROGRAM keyword options create executable
  1735. ".com" files that can be called later by name to install colors.  These
  1736. programs can also be edited by the ANSICOM.exe utility program.
  1737.  
  1738. To provide additional user control over 16-color programs, such as DBASE III or
  1739. DOS 5.0 EDIT.com, that set their own palettes or border colors but do not
  1740. restore the palette on completion, or to simply force a color scheme on a
  1741. program that defines its own, ANSIPLUS can lock the color palette, preventing a
  1742. program from loading the PAL/DAC and border color registers by BIOS calls.
  1743. This feature is controlled by two SETCOLOR options:
  1744.  
  1745.   LOCKPAL      enable locked color palette, ignore BIOS calls defining colors
  1746.   UNLOCKPAL    disable locked color palette, allow programs to define colors
  1747.  
  1748. Palette locking should only be used when all other means of control fail.  It
  1749. is intended to be invoked as part of batch files that execute applications to
  1750. be controlled, locking the palette before the program runs, and unlocking it
  1751. after it completes.  The feature should never be enabled all of the time
  1752. because it will keep well behaved programs from making color changes too.
  1753.  
  1754. The SETCOLOR program also controls ANSIPLUS VGA monochrome monitor emulation.
  1755. Two keywords enable or disable this feature:
  1756.  
  1757.   MONOCHROME   begins VGA monochrome monitor emulation; and
  1758.   COLOR        ends VGA monochrome monitor emulation and restores colors.
  1759.  
  1760. And finally, SETCOLOR provides three reporting options:
  1761.  
  1762.   SHOW         displays the 16 current colors in a band across the screen
  1763.   HELP         gives a brief description of how to use the SETCOLOR program
  1764.   SCHEME HELP  lists the available color schemes in file SETCOLOR.sch
  1765.  
  1766.                                        27
  1767.  
  1768.                     CONTROLLING OTHER ANSIPLUS FEATURES
  1769.  
  1770. The SETAPLUS.exe utility program is used to enable and disable various ANSIPLUS
  1771. features while the system is running.  It can also be used to set the video
  1772. display mode, character height, video page and graphics mode text treatment
  1773. options, to define or list key reassignments, or to define the Control-G beep
  1774. tone.  Changes made with SETAPLUS.exe are in effect only as long as your system
  1775. is running.  To change ANSIPLUS features for system bootup, use the NEWAPLUS
  1776. program.  SETAPLUS.exe is executed by a command of the form:
  1777.  
  1778.         SETAPLUS <keyword> [<keyword> ...]
  1779.  
  1780. where each <keyword> selects an ANSIPLUS feature or other option.  As for the
  1781. SETCOLOR.exe utility, if no <keyword> is supplied, you are presented with a
  1782. menu of choices.  These choices are shown in Table 4-4 below.
  1783.  
  1784.    +------------------------------------------------------------------------+
  1785.    |                             Table 4-4                                  |
  1786.    |                     SETAPLUS Main Menu Options                         |
  1787.    +-----------+------------------------------------------------------------+
  1788.    | Report    | Display current ANSIPLUS optional feature settings         |
  1789.    | Mode      | Set the video display mode                                 |
  1790.    | Height    | Set the displayed character height                         |
  1791.    | Tone      | Control-G beep tone generation options                     |
  1792.    | Keyboard  | Caps Lock, Ctrl-C and key read-ahead options               |
  1793.    | Assign    | Key reassignment enable/disable option and key definition  |
  1794.    | Color     | Mode set color, blink, bright key echo and VGA mono options|
  1795.    | Display   | Screen saver, graphics mode cursor and retrace wait options|
  1796.    | Scrollback| Scroll-back options                                        |
  1797.    | Other     | Scroll-Lock and smooth scrolling options                   |
  1798.    | Undo      | Undo all feature changes since starting the main menu      |
  1799.    | Quit      | Quit and return to DOS                                     |
  1800.    +-----------+------------------------------------------------------------+
  1801.  
  1802. From the SETAPLUS command line, you control each ANSIPLUS feature with its own
  1803. selection keywords.  These selectors are shown in Table 4-5 on page 29.  When
  1804. used in combination with the following keywords, each controllable feature can
  1805. be enabled and disabled easily:
  1806.  
  1807.     ON, YES, or TRUE to enable the preceding feature,
  1808.     ENABLE to enable all following listed features,
  1809.     OFF, NO, or FALSE to disable the preceding feature,
  1810.     DISABLE to disable all following listed features, and
  1811.     RESET to set all features to their default values.
  1812.  
  1813. The following examples illustrate use of the SETAPLUS command line to control
  1814. ANSIPLUS features:
  1815.  
  1816.     SETAPLUS bright off              Disable bright key echo
  1817.     SETAPLUS enable capsunlock saver Enable screen saver and Caps reset on
  1818.                                      Shift-alpha
  1819.     SETAPLUS reset                   Reset all features to their default status
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.                                        28
  1826.  
  1827.  
  1828.  
  1829.  
  1830.         +-------------------------------------------------------------------+
  1831.         |                           Table 4-5                               |
  1832.         |              SETAPLUS Feature Selection Keywords                  |
  1833.         +------------+------------------------------------------------------+
  1834.         | SETCOLORS  | Install default (ANSIPLUS) colors on mode sets       |
  1835.         | DOSSET256  | Load default colors on DOS 256-color mode sets       |
  1836.         | WINSET256  | Load default colors on Windows 256-color mode sets   |
  1837.         | NOBLINK    | Enable 16-color text mode background (disable blink) |
  1838.         | BRIGHT     | Highlight echoed keys (bright key echo)              |
  1839.         | LOCKPAL    | Prevent palette/DAC color changes by programs        |
  1840.         | MONOCHROME | VGA monochrome monitor emulation                     |
  1841.         | SAVER      | Enable screen saver (blanker)                        |
  1842.         | READ60H    | Read key controller scan codes in screen saver       |
  1843.         | MSMOUSE    | Use MS mouse Int 33h polling in screen saver         |
  1844.         | PS2MOUSE   | Use PS/2 Int 74h mouse event interrupts in saver     |
  1845.         | PSEUDOCURS | Generate pseudo-cursor in VGA/EGA graphics modes     |
  1846.         | CURSOR256  | Generate pseudo-cursor in 256-color graphics modes   |
  1847.         | TTYTRAP    | Trap ANSI escape sequences in BIOS Write TTY         |
  1848.         | RETRACE    | Wait for retrace before setting palette registers    |
  1849.         |            |                                                      |
  1850.         | CAPSUNLOCK | Unlock Caps Lock with shift/letter key combination   |
  1851.         | CAPSRELOCK | Relock Caps with carriage return after shift/letter  |
  1852.         | CTRLC      | Generate Control-Break when Control-C is entered     |
  1853.         | NDLAST     | Read last key in buffer with non-destructive input   |
  1854.         | STACK      | Enable key stacking                                  |
  1855.         | KEYASSIGN  | Enable ANSI key reassignment                         |
  1856.         | BIOSASSIGN | Apply key reassignment at BIOS Int 16h level         |
  1857.         | NODEFKEY   | Prevent ANSI key reassignment redefinition           |
  1858.         | BEEP       | Use ANSIPLUS Control-G beep tone generator           |
  1859.         | WINBEEP    | Allow ANSIPLUS beep tone under Windows               |
  1860.         |            |                                                      |
  1861.         | LOCK       | Allow Scroll Lock key to freeze screen               |
  1862.         | ALTLOCK    | Require Alt-Scroll-Lock when freezing screen         |
  1863.         | SCROLLBACK | Enable scroll-back of lines scrolled off top         |
  1864.         | DOSEMS     | Use expanded memory for DOS scroll-back              |
  1865.         | WINEMS     | Use expanded memory for Windows scroll-back          |
  1866.         | WINVRAM    | Allow video RAM for Windows scroll-back              |
  1867.         | XMSBACK    | Preserve scroll-back data using XMS or HMA memory    |
  1868.         | BIOSBACK   | Capture lines scrolled by BIOS call                  |
  1869.         | CLSBACK    | Capture erased pages never scrolled up               |
  1870.         | PAGEPROTECT| Protect 2nd display page from scroll-back storage    |
  1871.         | SMOOTH     | Enable smooth scrolling                              |
  1872.         | WINSMOOTH  | Allow smooth scrolling under Windows                 |
  1873.         | SPEEDUP    | Speed up smooth scroll when delaying computer        |
  1874.         | BIOSCROLL  | Use BIOS calls for text mode screen scrolling        |
  1875.         +------------+------------------------------------------------------+
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.                                        29
  1885.  
  1886.  
  1887. Other command line options include:
  1888.  
  1889.      MODE <decimal mode number> to set the video display mode,
  1890.      HEIGHT <height> to set the text character height,
  1891.      PAGE <page> to set the video page,
  1892.      KEYDEF to enter key reassignment definitions from the keyboard,
  1893.      LISTKEYS to list all current key reassignments,
  1894.      SAVEKEYS to save current key reassignments in a file,
  1895.      LOADKEYS <file name>  to load key reassignment definitions from a file,
  1896.      KEYSTACK <text> to add keys or delays to the keyboard buffer,
  1897.      RATE <char/sec> to set the keyboard "typematic" repeat rate,
  1898.      DELAY <quartersecs> to set the typematic key delay,
  1899.      SAVESCROLLTEXT <file name> to save scrollback to a file (text only),
  1900.      SAVESCROLLANSI <file name> to save scrollback with ANSI color control,
  1901.      BLANKTIME <minutes> to set the screen saver blanking time,
  1902.      TONE <frequency, duration list> to set the Control-G beep tone,
  1903.      TEXT or TREATMENT to reset graphics mode text treatments,
  1904.      SHADOW, BOLD,  ITALICS, UNDERLINE or OUTLINE to enable text treatments,
  1905.      STATUS to report the current video mode, number of colors, etc.,
  1906.      FEATURES to report the settings of all ANSIPLUS features,
  1907.      REPORT to show both STATUS and FEATURES, and
  1908.      HELP to show all keyword options.
  1909.  
  1910. Two keyword options are provided for managing the interrupt vectors used by
  1911. ANSIPLUS:
  1912.  
  1913.       INTERRUPT      Displays, to the extent possible, the chain of programs
  1914.                      attached to each following selected interrupt
  1915.       LINK           Relinks ANSIPLUS to the selected interrupt(s)
  1916.  
  1917. You may specify interrupt selectors as either hexadecimal numbers or special
  1918. keywords:
  1919.  
  1920.       KEYEVENT       Interrupt 09h Key Event
  1921.       VIDEO          Interrupt 10h Video
  1922.       SYSTEMSERVICE  Interrupt 15h System Services
  1923.       KEYREQUEST     Interrupt 16h Keyboard Request
  1924.       KEYBREAK       Interrupt 1Bh Keyboard Break
  1925.       TIMERTICK      Interrupt 1Ch User Timer Tick
  1926.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  1927.       MULTIPLEX      Interrupt 2Fh Multiplex, and
  1928.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  1929.  
  1930. For example, SETAPLUS INTERRUPT 2F will list the programs attached to the DOS
  1931. Int 2Fh Multiplex interrupt.
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.                                        30
  1944.  
  1945.  
  1946. All the features controlled by SETAPLUS are described in Chapter 3 under
  1947. "Changing the ANSIPLUS Startup Configuration", starting on page 13, except for
  1948. three:
  1949.  
  1950.  * To reassign keys, use the KEYDEF keyword.  You will be prompted for the key
  1951.    to reassign; after that, you type in the corresponding key reassignment, and
  1952.    terminate it with the End key.
  1953.  
  1954.  * To add keys to the keyboard buffer, use the keyword KEYSTACK, followed by
  1955.    any number of quoted strings, key scan and character codes (scan code times
  1956.    256 plus ASCII character code), or time delay directives (/Wnnn for timer
  1957.    ticks, or /Dnnn for milliseconds).  The following example enters "Dir",
  1958.    waits one second, then enters " *.*" and a carriage return:
  1959.  
  1960.      SETAPLUS KEYSTACK "Dir" /W18 " *.*" 13
  1961.  
  1962.  * To define the beep sound from the command line, use SETAPLUS and follow the
  1963.    keyword TONE with zero, one or more frequencies in Hertz and durations in
  1964.    milliseconds.  For example,
  1965.  
  1966.      SETAPLUS TONE            installs the default 880hz 385ms tone, and
  1967.      SETAPLUS TONE 1397,110,1047,165    defines a two-tone Control-G beep.
  1968.  
  1969.    To define the beep sound from the SETAPLUS main menu, select Tone Definition
  1970.    and run through the feature options.
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.                                        31
  2003.  
  2004.                         CREATING APPLICATION BATCH FILES
  2005.  
  2006. Almost all DOS applications should run without change when ANSIPLUS is
  2007. installed.  However, in a few cases it may be desirable to create a batch file
  2008. that prepares the system for an application, runs it, and then cleans up
  2009. afterward.  There are three reasons for creating these application batch files:
  2010.  
  2011.  * To restore the normal DOS command shell video mode and colors after the
  2012.    program ends;
  2013.  
  2014.  * To install a color palette for the program to use when it runs; or
  2015.  
  2016.  * To enable or disable ANSIPLUS features that conflict with the program.
  2017.  
  2018. Many DOS application programs do not completely restore the video state on
  2019. completion.  The common problems seen (with examples in parentheses) are:
  2020.  
  2021.  * The program sets the color palette, usually to the OEM default, but doesn't
  2022.    restore it on completion (DOS 5.0 EDIT.com, DBASE III).
  2023.  
  2024.  * The program sets the border color, but doesn't restore it, or sets it to
  2025.    black on completion (DBASE III).
  2026.  
  2027.  * The program turns blink on, but doesn't restore it on completion (DOS 5.0
  2028.    EDIT.com, DBASE III).
  2029.  
  2030.  * The program selects a video mode, but doesn't restore the original one on
  2031.    completion (DOS 5.0 EDIT.com, DBASE III).
  2032.  
  2033.  * The program selects a video mode and restores it on completion, but doesn't
  2034.    restore the text height if it is not standard for the video mode (Quattro
  2035.    Pro 3.0 and others).
  2036.  
  2037. There are four simple options for restoring the ANSIPLUS video mode and colors
  2038. after running an application that sets its own mode, palette or border color:
  2039.  
  2040.  * The first option can be used to restore only the border color after an
  2041.    application has run.  Suppose the border color is normally palette code 17,
  2042.    then the following batch file will set the border after the application (in
  2043.    this example, DOS EDIT.com) runs:
  2044.  
  2045.         @ECHO OFF
  2046.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2047.         SETCOLOR BORDER 17
  2048.  
  2049.  * The second option will restore the entire default ANSIPLUS palette and
  2050.    border color after the application runs:
  2051.  
  2052.         @ECHO OFF
  2053.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2054.         SETCOLOR RESET
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.                                        32
  2062.  
  2063.  
  2064.  * The third option requires creating a small .com file that will load an
  2065.    entire color scheme.  This can be done at any time by hitting the letter "S"
  2066.    from the SETCOLOR.exe palette definition screen, or it can be done from the
  2067.    DOS command level with a command like:
  2068.  
  2069.         SETCOLOR SAVEPROGRAM MYCOLORS
  2070.  
  2071.    This will create a program called MYCOLORS.com, which loads the 16-color
  2072.    palette and border colors that were in effect when the program was created.
  2073.    The batch file for the application can then use this program to restore the
  2074.    color scheme on completion:
  2075.  
  2076.         @ECHO OFF
  2077.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2078.         MYCOLORS
  2079.  
  2080.  * The fourth option saves and restores the video mode, character height and
  2081.    foreground/background color selection, and loads the ANSIPLUS default
  2082.    palette after the application completes.  The batch file uses the
  2083.    PUSHVID.com and POPVID.com programs provided with ANSIPLUS:
  2084.  
  2085.         @ECHO OFF
  2086.         PUSHVID
  2087.         C:\DOS\EDIT.com %1 %2 %3 %4 %5 %6 %7 %8 %9
  2088.         POPVID
  2089.  
  2090.    This is the best technique to use when running DOS in a text mode other than
  2091.    25 lines by 80 columns, because it will restore both the video display mode
  2092.    and text height.
  2093.  
  2094. The options for controlling colors used by applications depend on whether
  2095. custom colors are desired for the application and whether the application loads
  2096. its own palette:
  2097.  
  2098.  * If the application ordinarily uses ANSIPLUS's colors when it runs, then it
  2099.    will use any ANSIPLUS color palette in effect when it begins execution, so a
  2100.    .com color scheme file saved from the SETCOLOR.exe palette definition
  2101.    screen, or by a SETCOLOR SAVEPROGRAM APPCOLOR command, can be used to load a
  2102.    custom color scheme before running the application:
  2103.  
  2104.         @ECHO OFF
  2105.         APPCOLOR
  2106.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2107.         MYCOLORS
  2108.  
  2109.    Because most DOS application programs select a video mode when they start
  2110.    up, be sure that the color scheme saved in APPCOLOR.com is saved as a
  2111.    default color scheme.
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.                                        33
  2121.  
  2122.  
  2123.  * To use the ANSIPLUS palette for an application that installs its own
  2124.    palette, the palette must be locked before the program starts and unlocked
  2125.    after it completes:
  2126.  
  2127.         @ECHO OFF
  2128.         LOCKPAL
  2129.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2130.         UNLOKPAL
  2131.  
  2132.    Warning: Palette locking should only be used when all other means of control
  2133.    fail.  The feature should never be left enabled all of the time because it
  2134.    will keep well behaved programs from making any color changes.
  2135.  
  2136.  * To use custom colors for an application that wants to install its own
  2137.    palette, the custom colors are loaded before the palette is locked:
  2138.  
  2139.         @ECHO OFF
  2140.         APPCOLOR
  2141.         LOCKPAL
  2142.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2143.         UNLOKPAL
  2144.         MYCOLORS
  2145.  
  2146. In the event of a conflict between an ANSIPLUS feature and an application, the
  2147. feature can be disabled before running the application and enabled again after
  2148. it completes.  For example, the following batch file turns off the screen saver
  2149. while running an application:
  2150.  
  2151.         @ECHO OFF
  2152.         SETAPLUS DISABLE SAVER
  2153.         <application> %1 %2 %3 %4 %5 %6 %7 %8 %9
  2154.         SETAPLUS ENABLE SAVER
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.                                        34
  2180.  
  2181.                      EDITING ANSI ESCAPE SEQUENCE PROGRAMS
  2182.  
  2183. After using ANSIPLUS for a while, the user will find it desirable to create
  2184. short programs for frequently used video modes, color selections or
  2185. definitions, key reassignments, etc.  The ANSICOM.exe utility program provides
  2186. this facility: with it, the user can create and edit small executable ".com"
  2187. files or small printable text files that contain ANSI escape sequences.
  2188. ANSICOM is executed with the following command:
  2189.  
  2190.      ANSICOM <filename>
  2191.  
  2192. where <filename> is the name of the file to be edited.  Your file to edit is
  2193. selected using the following rules:
  2194.  
  2195.  * If no file name is supplied, you will be presented with a menu of ".com"
  2196.    files to select from.
  2197.  
  2198.  * If a file name is supplied, and it does not include a file type, a file type
  2199.    of ".com" is assumed.
  2200.  
  2201.  * When an existing ".com" file is edited, it is first checked for program code
  2202.    that outputs the ANSI escape sequences.  If this is not found, ANSICOM will
  2203.    refuse to edit the file.
  2204.  
  2205.  * If the file to be edited is not a ".com" file, then it is assumed to be a
  2206.    non-executable printable text file.
  2207.  
  2208.  * If the named file is not found (including a search of the system PATH),
  2209.    ANSICOM will ask if a new file is to be created.
  2210.  
  2211. Once the file has been properly identified, a full-screen editing display is
  2212. presented, and you can go to work.  Use the F1 key for context sensitive help.
  2213.  
  2214. The ANSICOM full screen editing display automatically parses the user's entries
  2215. and identifies the kinds of ANSIPLUS escape sequences entered, including
  2216. incomplete escape sequences.  ANSICOM will not allow the user to save a file
  2217. containing an incomplete escape sequence.  Beyond that, it is the user's
  2218. responsibility to be sure that the escape sequences entered will do what he
  2219. wants.
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.                                        35
  2239.  
  2240.  
  2241. V.   ANSIPLUS ESCAPE SEQUENCES
  2242.  
  2243. This chapter lists and briefly describes each of the "ANSI" Escape sequences
  2244. recognized by ANSIPLUS.  They are described in detail in the printed ANSIPLUS
  2245. manual.  In the table, "#" represents any numeric parameter and "Esc" is the
  2246. Escape character (decimal 27, hexadecimal 1Bh):
  2247.  
  2248.  
  2249.      Control Sequence    Description
  2250.      ----------------    -----------
  2251.  
  2252.                    DISPLAY MODE AND CHARACTER SET
  2253.  
  2254.      Esc [#;#h           Set video display mode
  2255.  
  2256.      Esc [#;#l           Reset video display mode
  2257.  
  2258.      Esc [!#t            Select character set height: 8, 14 or 16 scan lines
  2259.  
  2260.      Esc [!#;...;#e      Select graphics mode text treatment options: bold,
  2261.                          underline, slant, shadow, outline, or reverse
  2262.  
  2263.      Esc [!#v            Select video page
  2264.  
  2265.  
  2266.                          CURSOR POSITIONING
  2267.  
  2268.      Esc [#;#H           Set cursor position
  2269.  
  2270.      Esc [#;#f           Set cursor position
  2271.  
  2272.      Esc [#A             Move cursor up
  2273.  
  2274.      Esc [#B             Move cursor down
  2275.  
  2276.      Esc [#C             Move cursor right
  2277.  
  2278.      Esc [#D             Move cursor left
  2279.  
  2280.      Esc [#s             Save cursor position, video mode, video page or colors
  2281.  
  2282.      Esc [#u             Restore cursor position, video mode, page or colors
  2283.  
  2284.  
  2285.                    COLOR SELECTION AND DEFINITION
  2286.  
  2287.      Esc [#;...;#m       Select current color attributes for output characters
  2288.  
  2289.      Esc [!#;#;#;#;#c    Define colors available, select palette, set up color
  2290.                          blinking, restore color definitions or palette
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.                                        36
  2298.  
  2299.  
  2300.  
  2301.      Control Sequence    Description
  2302.      ----------------    -----------
  2303.  
  2304.                       ERASE, INSERT AND DELETE
  2305.  
  2306.      Esc [#;#J           Clear the screen
  2307.  
  2308.      Esc [#;#;#K         Clear a line
  2309.  
  2310.      Esc [#;#L           Insert lines on the screen or in a line range
  2311.  
  2312.      Esc [#;#M           Delete lines from the screen or a line range
  2313.  
  2314.      Esc [#;#@           Insert characters on a line or a column range
  2315.  
  2316.      Esc [#;#P           Delete characters from a line or a column range
  2317.  
  2318.  
  2319.                      DRIVER STATUS AND CONTROL
  2320.  
  2321.      Esc [#;#n           Query ANSIPLUS status: cursor position, current color
  2322.                          selection, video mode and number of colors, screen and
  2323.                          character dimensions, color definitions, feature
  2324.                          settings, tone definition, key reassignment, etc.
  2325.  
  2326.      Esc [!#;...;#d      Enable or disable ANSIPLUS driver feature settings
  2327.  
  2328.      Esc [!#;...;#g      Define the Control-G beep tone
  2329.  
  2330.      Esc [#;...;#p       Define key reassignment (accepts quoted strings)
  2331.  
  2332.      Esc [!#;...;#k      Add keys to keyboard buffer (accepts quoted strings)
  2333.  
  2334.  
  2335. Besides supporting all the escape sequences accepted by the MS-DOS ANSI.sys
  2336. driver, ANSIPLUS accepts additional parameters for many, and includes several
  2337. entirely new control functions. See Chapter 6, Technical Notes, for differences
  2338. between ANSIPLUS and the ANSI.sys driver.
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.                                        37
  2357.  
  2358. VI.  TECHNICAL NOTES
  2359.  
  2360.                              ANSIPLUS AND WINDOWS 3
  2361.  
  2362. Users of Windows 3.0 and 3.1 should consider using ANSIPLUS as well.  The
  2363. ANSIPLUS driver works well with DOS programs under Windows 3, and there are
  2364. advantages to using it in Windows 386 Enhanced Mode.  Because ANSIPLUS is a CON
  2365. driver, local copies of it are included in each Windows 386 Enhanced Mode
  2366. virtual 8086.  This means that all the ANSIPLUS internal state variables, and
  2367. those of its integrated console features, will be local to each virtual 8086,
  2368. so there is no way they can interfere with each other.  This section discusses
  2369. how to work around the limitations imposed on ANSIPLUS DOS sessions by Windows
  2370. or by Windows in combination with other software.
  2371.  
  2372.  
  2373. Loading Options
  2374.  
  2375. With DOS 5.0 or later, or with an XMS memory manager such as QEMM (using
  2376. LOADHI) or 386MAX, ANSIPLUS can be loaded into upper memory blocks above 640K
  2377. to provide a larger program area below 640K.  All ANSIPLUS memory loading
  2378. options are compatible with Windows, with the following exceptions:
  2379.  
  2380.  * When the ANSIPLUS shared code has been loaded into expanded memory, Version
  2381.    6 of 386MAX (and possibly other versions) will refuse to let Windows start
  2382.    in 386 Enhanced mode.  The 386MAX memory manager complains that expanded
  2383.    memory cache software is running.  This limitation does not exist for the
  2384.    EMM386 or QEMM386 memory managers.  To get Windows to run with ANSIPLUS and
  2385.    386MAX, load the ANSIPLUS driver into XMS upper memory, HMA, or low memory
  2386.    instead.
  2387.  
  2388.  * If Windows 3.0 (not 3.1!) will be run in 386 Enhanced mode, it is strongly
  2389.    recommended that the entire ANSIPLUS driver (or any other ANSI driver) not
  2390.    be loaded into high memory by DEVICEHIGH or equivalent, and that ANSIPLUS
  2391.    load itself high instead.  This is because Windows 3.0 does not localize the
  2392.    XMS upper memory block area above 640K for its virtual 8086's, and so only
  2393.    one global copy of ANSIPLUS would be shared among all virtual machines.
  2394.    This can cause trouble: if, for example, a program in one window selects
  2395.    colors, then those colors would also be in force for all DOS programs in
  2396.    other windows!
  2397.  
  2398.  
  2399. Smooth Scrolling
  2400.  
  2401. Smooth scrolling should operate correctly for full screen DOS programs under
  2402. Windows.  However, when a DOS session is run in a window, smooth scrolling may
  2403. interfere with some Windows video display drivers.  For example, the 256-color
  2404. drivers for the Tseng ET4000 may leave undrawn black areas on the screen when
  2405. scrolling occurs in a window while smooth scrolling is active.  Because of
  2406. this, smooth scrolling should be disabled under Windows unless you are certain
  2407. that your video driver can tolerate the direct port access to the video
  2408. controller required for smooth scrolling, or that all DOS sessions will be run
  2409. full screen.
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.                                        38
  2416.  
  2417.  
  2418. Scroll-Back
  2419.  
  2420. The recommended storage location for scroll-back data under Windows is expanded
  2421. memory (EMS).  Use of EMS for scroll-back instead of video RAM (as was done by
  2422. ANSIPLUS drivers before Release 3.10) eliminates compatibility problems with
  2423. Windows video drivers apparently caused by memory accesses to video RAM not on
  2424. the visible part of the virtual screen.
  2425.  
  2426. The standard Windows 3.1 DOSPRMPT.pif and _DEFAULT.pif files both allow
  2427. programs to access EMS memory.  A sample PIF file with suggested PIF settings
  2428. (for the MS-DOS prompt) is included with the ANSIPLUS package in the file
  2429. APLUS.pif.  These settings are recommended, but not necessary, for all DOS
  2430. applications that depend on scroll-back under Windows.
  2431.  
  2432. Under Windows, when a 386 Enhanced Mode DOS session starts, ANSIPLUS will try
  2433. to allocate 64K of private expanded memory (EMS) for scroll-back (48K if
  2434. ANSIPLUS shared code was loaded into EMS).  If the EMS is not available (for
  2435. example, if the Windows PIF file for the application does not provide expanded
  2436. memory), then the driver will attempt to use video RAM for scroll-back instead,
  2437. if that option has been specifically enabled.  ANSIPLUS provides a configurable
  2438. feature that can prevent Windows EMS from being allocated for scroll-back and
  2439. force any Windows DOS session scroll-back to reside in video RAM.  This is not
  2440. advised, however, because scroll-back in video RAM under Windows is not
  2441. reliable when used with many Windows video drivers.
  2442.  
  2443. Using video RAM for scroll-back under Windows has problems, particularly for
  2444. DOS applications run in a window.  One difficulty is that when a DOS
  2445. application is run in 386 Enhanced Mode, Windows will not maintain a full 32K
  2446. of text mode RAM unless the Windows PIF file specifies "High Graphics" and
  2447. "Retain Video Memory".  If these PIF settings are not used, then the first time
  2448. that ANSIPLUS needs to access the scroll-back storage area, Windows may present
  2449. a message claiming that there is not enough memory for the application to
  2450. correctly display information.  If this happens, just click on OK, then hit
  2451. Alt-Enter to switch to a full screen display and proceed.  Scroll-back data
  2452. will also likely be lost when the focus is switched from task to task, as with
  2453. the Alt-Tab key, or when changing display modes.  Even with these PIF settings,
  2454. some Windows 3.1 video drivers (eg., 256-color ET-4000) will not work correctly
  2455. when video RAM outside the visible screen is accessed, resulting in loss of
  2456. scroll-back text or incomplete updating of the screen.  You therefore should
  2457. exercise caution before relying on video RAM for scroll-back under Windows.
  2458.  
  2459. Starting with ANSIPLUS Release 3.1, scroll-back lines are captured under
  2460. Windows as they are completed, rather than as they scroll off the top of the
  2461. screen.  This change was necessary because some Windows video drivers (eg.,
  2462. Microsoft VGA) trap BIOS scrolling requests completely and do not pass them
  2463. through to the DOS virtual 8086 when running a DOS session in a window.  This
  2464. makes it impossible for ANSIPLUS to know when the screen has scrolled if a BIOS
  2465. call was used to do it.  Some important DOS programs now mix DOS output and
  2466. BIOS calls for scrolling (eg., 4DOS 5.0 and NDOS 8.0 when displaying
  2467. multi-colored directories).
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473.  
  2474.                                        39
  2475.  
  2476.  
  2477. Color Palettes
  2478.  
  2479. Full screen DOS programs in Windows will use the same colors that they do when
  2480. run under DOS.  When the same program is run in a window, its 16-color palette
  2481. will be determined entirely by Windows and the Windows video driver.  ANSIPLUS
  2482. will have no control over the palette when running in a window.
  2483.  
  2484. With earlier versions of ANSIPLUS under Windows, when a DOS session was run in
  2485. a window using Microsoft's 16-color VGA video driver, only 13 distinct colors
  2486. were available on the ANSIPLUS 16 color palette (ie., 3 colors were duplicated:
  2487. brown was the same as dark red, light blue was the same as light cyan, and pink
  2488. was white.) Other video drivers do not seem to have this problem because they
  2489. do not try to adapt to color palette settings made by programs running in a
  2490. window.
  2491.  
  2492. Starting with ANSIPLUS Release 3.10, the standard ANSIPLUS palette has been
  2493. adjusted slightly to allow brown to show as dark yellow and light blue as light
  2494. blue under the Microsoft VGA driver.  Users of the Microsoft VGA driver can
  2495. convert pink to light magenta by running the WINVGA16.com program provided with
  2496. ANSIPLUS.  Including WINVGA16.com in AUTOEXEC.bat will change pink to light
  2497. magenta for all DOS applications in and out of Windows.  Running it within a
  2498. Windows DOS session will change the color for only that DOS session.
  2499. WINVGA16.com will not work if run in WINSTART.bat because it is not a TSR.
  2500.  
  2501. Some 256-color drivers for Windows apparently assume that the OEM 256-color
  2502. palette has been loaded when the 256-color mode was selected, and never define
  2503. the colors that Windows will use.  Because of this, ANSIPLUS normally does not
  2504. load its default colors when a 256-color mode is selected under Windows.  This
  2505. can be overridden by a configurable feature.
  2506.  
  2507.  
  2508. Beep Tone
  2509.  
  2510. When Windows is running in 386 Enhanced mode, and a DOS program running in the
  2511. background outputs a Control-G, the background program's virtual 8086 may not
  2512. be running fast enough to accurately time the tone.  Because of this, the tone
  2513. can drag out and sound strange.  Disabling ANSIPLUS tone generation under
  2514. Windows restores the original Windows sound driver, but makes the tone
  2515. frequency and duration non-changeable.
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.                                        40
  2534.  
  2535.  
  2536. International Usage
  2537.  
  2538. When the DISPLAY.sys driver is used with Windows 3.0 or 3.1, the colors and
  2539. other variables of either ANSIPLUS or the DOS ANSI.sys driver are not localized
  2540. to each virtual 8086.  This appears to be because DISPLAY.sys is a CON device
  2541. driver that calls the previous CON driver (ie., ANSIPLUS) to control the
  2542. console, so DOS actually has two CON drivers active at the same time.  Windows
  2543. only localizes the first CON driver it finds on the DOS device chain, and this
  2544. will be the most recent CON device installed, which is DISPLAY.sys, not
  2545. ANSIPLUS.  Two system setup changes are required to circumvent the problem:
  2546.  
  2547.  (1) Enter the following command to change the name of the ANSIPLUS driver in
  2548.      memory from "CON" to "CONAPLUS":
  2549.  
  2550.          SETAPLUS LOCALCON
  2551.  
  2552.      This command is automatically inserted into AUTOEXEC.bat by the ANSIPLUS
  2553.      INSTALL program when DISPLAY.sys is detected.
  2554.  
  2555.  (2) Add the following command to the [386Enh] section of the Windows
  2556.      SYSTEM.ini file (put it right after the "LOCAL=CON" line):
  2557.  
  2558.          LOCAL=CONAPLUS
  2559.  
  2560.      This causes Windows to localize the ANSIPLUS driver to each virtual 8086.
  2561.      The SYSTEM.ini file is not altered by the ANSIPLUS INSTALL program.
  2562.  
  2563. If the DISPLAY.sys driver is in use and ANSIPLUS shared code has been loaded
  2564. into expanded memory, the SETAPLUS LOCALCON command must be executed before
  2565. Windows is started, and the LOCAL=CONAPLUS line MUST be added to SYSTEM.ini!
  2566. If it is not, Windows will probably crash the first time a DOS program or
  2567. session is started.
  2568.  
  2569. These system setup changes are totally unnecessary if the DISPLAY.sys driver is
  2570. not being used.
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.                                        41
  2593.  
  2594.  
  2595.                   ANSIPLUS and the 4DOS or NDOS Command Shells
  2596.  
  2597. The ANSIPLUS driver is compatible with the 4DOS and NDOS command shells.  Two
  2598. ANSIPLUS features are specifically adapted to 4DOS/NDOS:
  2599.  
  2600.  * ANSIPLUS supports key stacking (for 4DOS 4.0+ and NDOS Version 7.0+), so the
  2601.    KSTACK.com TSR does not need to be loaded.  When ANSIPLUS key stacking is
  2602.    enabled, ANSIPLUS emulates the 4DOS/NDOS Int 2Fh function D44Fh key stacking
  2603.    interface, so the 4DOS/NDOS KEYSTACK command will work, and loading the
  2604.    KSTACK.com driver will report that it is already installed.
  2605.  
  2606.    ANSIPLUS key stacking capacity is limited to the size of ANSIPLUS's key
  2607.    buffer, which is configurable by INSTALL/NEWAPLUS up to 512 keys.  ANSIPLUS
  2608.    key stacking can be disabled if KSTACK.com or KEYSTACK.sys is preferred.
  2609.  
  2610.  * The SETCOLOR.exe utility program can be used as a replacement for the 4DOS
  2611.    or NDOS internal COLOR command, since SETCOLOR supports the syntax and all
  2612.    options of COLOR, plus many additional options.  To do this, two commands
  2613.    should be added to AUTOEXEC.bat:
  2614.  
  2615.         SETDOS /i-COLOR
  2616.         ALIAS COLOR SETCOLOR
  2617.  
  2618.  
  2619.                    ANSIPLUS EXTENSIONS AND THE ANSI STANDARD
  2620.  
  2621. ANSIPLUS uses a number of added control parameters and includes entire new
  2622. control functions that are not part of the ANSI X3.64 standard, so do not
  2623. expect them to be supported by any other drivers or devices.  The following
  2624. added ANSIPLUS functions are not standard ANSI:
  2625.  
  2626.     Esc [!#t            Select character set height
  2627.     Esc [!#;...;#e      Select graphics mode text treatment options
  2628.     Esc [!#v            Select video page
  2629.     Esc [!#;#;#;#;#c    Define colors available, select palette, setup blinking
  2630.     Esc [!#;...;#d      Enable or disable ANSIPLUS driver features
  2631.     Esc [!#;...;#g      Define Control-G beep tone
  2632.     Esc [!#;...;#k      Add keys to keyboard buffer
  2633.  
  2634. The following ANSIPLUS functions accept standard ANSI parameters, but also
  2635. accept added non-standard parameters:
  2636.  
  2637.     Esc [#;#h           Set video mode
  2638.     Esc [#s             Save cursor position, video mode, etc.
  2639.     Esc [#u             Restore cursor position, video mode, etc.
  2640.     Esc [#;#J           Clear the screen
  2641.     Esc [#;#;#K         Clear a line
  2642.     Esc [#;#L           Insert lines on the screen
  2643.     Esc [#;#M           Delete lines from the screen
  2644.     Esc [#;#@           Insert characters on a line
  2645.     Esc [#;#P           Delete characters from a line
  2646.     Esc [#;...;#m       Select current color attributes for output characters
  2647.     Esc [#;#n           Query ANSIPLUS status: cursor position, colors, etc.
  2648.     Esc [#;...;#p       Define key reassignment
  2649.  
  2650.  
  2651.                                        42
  2652.  
  2653.  
  2654.                     ESCAPE SEQUENCE RECOGNIZER ENHANCEMENTS
  2655.  
  2656. To simplify program generation of control sequences, the ANSIPLUS escape
  2657. sequence recognizer syntax has been relaxed:
  2658.  
  2659.  * Blanks between parameters in escape sequences are ignored;
  2660.  
  2661.  * Commas are allowed as separators in addition to semicolons;
  2662.  
  2663.  * Either single or double quotes may be used around character parameters;
  2664.  
  2665.  * Parameter values over 255 (i.e., up to 32,767) are accepted for certain
  2666.    commands. Plus and minus signs are also accepted.
  2667.  
  2668. Unrecognized escape sequences are passed through by the driver unaltered.  The
  2669. Esc character is trapped only when followed by a left bracket ("["), so
  2670. programs that write the escape character (a left arrow) to the screen will
  2671. continue to do so after the driver is installed.
  2672.  
  2673.  
  2674.                    DIRECT ACCESS TO VIDEO RAM VS. BIOS CALLS
  2675.  
  2676. ANSIPLUS uses direct access to video RAM in all VGA/EGA text and most common
  2677. graphics modes.  However, BIOS calls will be used to output characters for
  2678. three classes of graphics modes:
  2679.  
  2680.  * Modes with 256 colors;
  2681.  
  2682.  * Modes that require more than 64K bytes of video RAM (i.e., 16 color graphics
  2683.    modes exceeding 800x600 resolution); and
  2684.  
  2685.  * Unrecognized (usually CGA or Hercules) graphics modes.
  2686.  
  2687. When BIOS calls are used, output is much slower, and "transparent" mode output,
  2688. graphics mode text treatments, and insert/delete characters are also not
  2689. supported.  Future versions of ANSIPLUS may extend direct video RAM access to
  2690. some of these modes.
  2691.  
  2692.  
  2693.                               INSTALLATION CHECKS
  2694.  
  2695. ANSIPLUS responds to the Int 2Fh test for ANSI.sys installation.  When Int 2Fh
  2696. is called with AX=1A00h, ANSIPLUS will return AL=0FFh to indicate that ANSI.sys
  2697. is installed.
  2698.  
  2699. The Int 2Fh response is expanded if registers BX=414Eh ("AN"), CX=5349h ("SI")
  2700. and DX=2B2Bh ("++").  Then, in addition to returning AL=0FFh, ANSIPLUS returns
  2701. a pointer in ES:BX to the ANSIPLUS Int 29h entry point, and, for Version 3.10
  2702. or later ANSIPLUS drivers, the major driver version number is returned in CH
  2703. and minor version number in CL.  A further installation confirmation can be
  2704. made by checking the 8 bytes at ES:[BX-12] for the string "ANSIPLUS".  The
  2705. ANSIPLUS version number will be a 4 character string at ES:[BX-4], containing,
  2706. for example, "3.10".
  2707.  
  2708.  
  2709.  
  2710.                                        43
  2711.  
  2712.                                HOOKED INTERRUPTS
  2713.  
  2714. To implement all its features, ANSIPLUS attaches itself to nine system
  2715. interrupts.  Two are replaced (1Bh and 29h), and the remaining 7 are
  2716. supplemented (i.e., ANSIPLUS calls the original interrupt but extends its
  2717. function).  If possible, ANSIPLUS should always be installed after any other
  2718. drivers that take over any of these interrupts without passing calls through.
  2719. The following table lists the ANSIPLUS hooked interrupts and reasons for each:
  2720.  
  2721. +------------------------------------------------------------------------------+
  2722. |                                  Table 6-1                                   |
  2723. |                          ANSIPLUS Hooked Interrupts                          |
  2724. +----------------------+-------------------------------------------------------+
  2725. |Interrupt Description | Reason                                                |
  2726. +----------------------+-------------------------------------------------------+
  2727. |1Bh Keyboard Break    | Promote Control-Break to front of key buffer          |
  2728. |                      |                                                       |
  2729. |29h DOS Write Char    | Faster DOS screen output                              |
  2730. |                      |                                                       |
  2731. |09h Key Event         | Screen saver; scroll lock; scroll-back; key buffer    |
  2732. |                      | extension; smooth scroll toggle; other special key    |
  2733. |                      | processing                                            |
  2734. |                      |                                                       |
  2735. |10h BIOS Video        | Palette/DAC control; beep tone generation; screen     |
  2736. |                      | saver; smooth scroll; scroll lock; scroll-back; BIOS  |
  2737. |                      | Write TTY ANSI trap                                   |
  2738. |                      |                                                       |
  2739. |15h System Services   | Key processing                                        |
  2740. |                      |                                                       |
  2741. |16h BIOS Get Key      | Key buffer management; highlighted key echo; scroll-  |
  2742. |                      | lock and scroll-back; key reassignment; repeat rate   |
  2743. |                      |                                                       |
  2744. |1Ch User Timer Tick   | Screen saver; smooth scroll; color blinking; beep tone|
  2745. |                      | generation                                            |
  2746. |                      |                                                       |
  2747. |2Fh Multiplex         | Installation checks; special functions; Windows init  |
  2748. |                      | and exit processing; 4DOS/NDOS key stacking           |
  2749. |                      |                                                       |
  2750. |74h PS/2 Mouse Event  | Screen saver                                          |
  2751. +----------------------+-------------------------------------------------------+
  2752.  
  2753. The DOS KEYB program for international keyboard support hooks the Int 09h Key
  2754. Event interrupt without passing calls through to whatever was installed before
  2755. (ie., to ANSIPLUS). Therefore, if the KEYB program is being used to set up the
  2756. keyboard, the following command MUST be executed after loading KEYB, otherwise
  2757. most ANSIPLUS keyboard related features will not work:
  2758.  
  2759.     SETAPLUS LINK KEYEVENT
  2760.  
  2761. This command will re-install ANSIPLUS on the key event interrupt. The INSTALL
  2762. program will automatically add this command to AUTOEXEC.bat if it finds a
  2763. reference in it to KEYB.
  2764.  
  2765. If the DISPLAY.sys device driver for code page switching is being used, the
  2766. ANSIPLUS.sys device driver must be installed before DISPLAY.sys in CONFIG.sys.
  2767. The INSTALL program will also automatically handle this.
  2768.  
  2769.                                        44
  2770.  
  2771.  
  2772.  
  2773. If you suspect that a system interrupt is no longer accessible to ANSIPLUS
  2774. because of a TSR or device driver that has been loaded after ANSIPLUS, you can
  2775. test this with the command:
  2776.  
  2777.     SETAPLUS INTERRUPT <intnum>
  2778.  
  2779. which displays, to the extent possible, the chain of programs attached to any
  2780. selected interrupt.  The <intnum> may be either a hexadecimal interrupt number
  2781. or one of the following keywords:
  2782.  
  2783.       KEYEVENT       Interrupt 09h Key Event
  2784.       VIDEO          Interrupt 10h Video
  2785.       SYSTEMSERVICE  Interrupt 15h System Services
  2786.       KEYREQUEST     Interrupt 16h Keyboard Request
  2787.       KEYBREAK       Interrupt 1Bh Keyboard Break
  2788.       TIMERTICK      Interrupt 1Ch User Timer Tick
  2789.       DOSTTY         Interrupt 29h DOS Fast TTY Output
  2790.       MULTIPLEX      Interrupt 2Fh Multiplex, and
  2791.       PS2MOUSE       Interrupt 74h PS/2 Mouse Event
  2792.  
  2793. If ANSIPLUS is missing from the listing, it can be relinked with the command:
  2794.  
  2795.     SETAPLUS LINK <intnum>
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.                                        45
  2829.  
  2830.