home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / screen / hsatxt / hsa_text.doc < prev    next >
Encoding:
Text File  |  1988-07-02  |  76.8 KB  |  2,110 lines

  1.  
  2.  
  3.      Hardwood Software Associates
  4.      
  5.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  6.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  7.      
  8.      
  9.      
  10.      
  11.      
  12.      
  13.      
  14.      
  15.      
  16.      
  17.      
  18.      
  19.      
  20.      
  21.                                   H S A _ T E X T
  22.                                   H S A _ T E X T
  23.                          Text Screen Control Library for C
  24.      
  25.                                          by
  26.      
  27.                             Hardwood Software Associates
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.      
  62.      14-Apr-88                                                          Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      Hardwood Software Associates
  72.      
  73.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  74.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  75.      
  76.      
  77.                             Hardwood Software Associates
  78.                             ____________________________
  79.      
  80.      HSA_TEXT is copyrighted by Hardwood Software Associates.  You are granted
  81.      a limited license to use HSA_TEXT. You may also copy and distribute it,
  82.      provided that the following conditions are met:
  83.      
  84.           1. No fee may be charged for such copying and distribution.
  85.           2. HSA_TEXT may ONLY be distributed in its original, unmodified state.
  86.      
  87.      This library is being distributed as a shareware product.  This means that if
  88.      you find this useful you should send $20.00 (USA currency or check only) to:
  89.      
  90.                      Hardwood Software Associates
  91.                      364 Benson Road
  92.                      Northbridge, Ma 01534
  93.      
  94.      In exchange for this sum you will receive a disk containing the source code for
  95.      the library and distibution files for several other HSA libraries. Remember
  96.      only you can support shareware.  Your support encourages growth.  If you use
  97.                                                                               ___
  98.      it you should support it.
  99.                    _______    
  100.      
  101.      Registration allows a single person to use an HSA library; multiple
  102.      programmers require multiple registrations.
  103.      
  104.      Registered users may receive a source disk of the latest version of the
  105.      library by sending $10.00.
  106.      
  107.      
  108.      No royalties are required when HSA_TEXT functions are used, although we
  109.      would not refuse them if offered.  We would appreciate a credit on the
  110.      title page of any applications that make use of HSA_TEXT. We would be
  111.      very interested in hearing how HSA_TEXT is used and would love to receive
  112.      copies of applications.
  113.      
  114.      The author, Richard "Spike" Evans may be reached on CompuServe at
  115.      [75026,3604].
  116.      
  117.      All comments and suggestions are welcome.  We love to get mail.
  118.      
  119.      Please be advised that all the usual non-warranty warranties apply to
  120.      HSA_TEXT.  Hardwood Software Associates does not guarantee that HSA_TEXT
  121.      will do any thing useful  at all;  although it has for us.  Nor does
  122.      Hardwood Software Associates warrant that HSA_TEXT will not do anything
  123.      harmful; although it has not for us.
  124.      
  125.      
  126.                                      Trademarks
  127.                                      __________
  128.      
  129.      
  130.                 IBM P.C. is a trademark of International Business Machines
  131.                 Lattice is a trademark of Lattice, Inc.
  132.      
  133.      14-Apr-88                                                          Page 2
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.      Hardwood Software Associates
  143.      
  144.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  145.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  146.      
  147.                 Microsoft C is a trademark of Microsoft Corporation
  148.                 Turbo C is a trademark of Borland International
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.      
  200.      14-Apr-88                                                          Page 3
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.      Hardwood Software Associates
  210.      
  211.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  212.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  213.      
  214.      
  215.                                     INTRODUCTION
  216.                                     ____________
  217.      
  218.      HSA_TEXT is a library of 72 C functions that provide direct, fast control
  219.      over the IBM PC screen in text mode.  The functions have been developed
  220.      and tested for the Microsoft version 5.00, and Turbo C version 1.5
  221.      compilers. HSA_TEXT is written entirely in assembler for speed and memory
  222.      efficiency.
  223.      
  224.      
  225.      
  226.      
  227.      The library is contained in several modules, grouped by function.  These
  228.      modules are designed to prevent the inclusion of unused functions in your
  229.      program.  These modules are:
  230.      
  231.              TX_ATTR  - Attribute Setting
  232.              TX_BLK   - Functions that operate on blocks of screen
  233.              TX_CLR   - Functions that clear portions of the screen
  234.              TX_CUR   - Functions that control the cursor
  235.              TX_FILL  - Character fill functions
  236.              TX_MISC  - Miscellaneous functions
  237.              TX_MOWS  - Mouse support functions
  238.              TX_SCROL - Screen scrolling functions
  239.              TX_STAT  - Status functions
  240.              TX_STR   - String display functions
  241.              MOWS_COM - Mouse functions common to GRAF and TEXT
  242.              STAT_COM - Functions common to GRAF and TEXT
  243.      
  244.      This distribution contains two object library files:
  245.      
  246.              SM_HSA_T.LIB - Small memory model library (Microsoft)
  247.              ST_HSA_T.LIB - Small memory model library (Turbo)
  248.      
  249.      The library has also been tested with the Lattice version 3.10 compiler.
  250.      In an effort to keep download times low and because of lack of interest
  251.      the Lattice library is no longer included with the shareware distribution.
  252.      
  253.      After receiving the source files, other memory models may be easily
  254.      created as required.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.      
  268.      14-Apr-88                                                          Page 4
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.      Hardwood Software Associates
  278.      
  279.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  280.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  281.      
  282.      
  283.                               GENERAL - "TX" FUNCTIONS
  284.                               ________________________
  285.      
  286.      The "tx" functions are a set of low level functions that give you fast
  287.      efficient control of the text screen.  Functions are provided to display
  288.      strings and characters on the screen.  The screen attributes of the
  289.      displayed information is easily controlled.  Sections of the screen may
  290.      be saved and restored to program memory.  The size and location of the
  291.      cursor is easily manipulated.
  292.      
  293.      The screen is addressed by row and column.  The row and column addresses
  294.      passed to all functions are  0  based.  The upper left corner of the
  295.      screen is row 0, column 0.  The functions keep track of the next
  296.      sequential screen location  (row and  column),  this location  is
  297.      referred  to  as  the current location. If the row address passed to any
  298.      function is equal to -1 the current location is used.
  299.      
  300.      The functions that set the screen attribute, without displaying any
  301.      characters, set what is referred to as the current attribute.
  302.      
  303.      There are several functions in this library that display C strings on the
  304.      screen.  The screen location to start displaying the string may be
  305.      specified, or the current location may be used (functions with "_c" in
  306.      the name).  The screen attribute for the string may also be specified
  307.      (functions with "_a" in the name), or the current attribute may be used.
  308.      The hsa_attr.h file contains definitions for attributes and a macro
  309.      (MAKE_ATTR) to aid in creating screen attributes.
  310.      
  311.      The tx_mows functions in this library provide low level access to a
  312.      mouse.  These functions support many different mice.  Development and
  313.      testing was done with a Logitech mouse.  Many of the functions return the
  314.      mouse type.  These types are defined in the hsa_tx.h header file.  Also
  315.      defined in the header file are definitions for the mouse buttons. Before
  316.      any of these functions are used tx_mows_reset must be called. This
  317.      document is designed to be used with the software documentation provided
  318.      with the mouse, therefore the details of the actions are not discussed.
  319.      
  320.      The header file hsa_tx.h defines all the "tx" functions included in the
  321.      HSA_TEXT function library.  Also included in hsa_tx.h are several useful
  322.      constants, macros, and structures.
  323.      
  324.      Several of the functions have an entry in the documentation listing
  325.      called alias.  This was done because these functions are particularly
  326.      difficult to spell.
  327.      
  328.      Tx_demo.c contains the source code for the tx_demo.exe demonstration
  329.      program; it provides an example of how to use many of the tx functions.
  330.      Refer to MSC_TX.BAT and TCC_TX.BAT for information on how to compile and
  331.      link for the Microsoft and Turbo C compilers.
  332.  
  333.  
  334.  
  335.      
  336.      14-Apr-88                                                          Page 5
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.      Hardwood Software Associates
  346.      
  347.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  348.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  349.      
  350.      
  351.      
  352.      NAME:         MAKE_ATTR - Generate an attribute byte
  353.                    MAKE_ATTR                             
  354.      MODULE:       MACRO in hsa_attr.h
  355.      SYNOPSIS:     MAKE_ATTR (fore,back)
  356.                       int fore;               Foreground color
  357.                       int back;               Background color
  358.      DESCRIPTION:  Generate an attribute byte from the desired foreground and
  359.                    background colors.  The colors defined in hsa_attr.h are:
  360.                     SCR_BLACK,SCR_BLUE,SCR_GREEN,SCR_CYAN,SCR_RED,SCR_MAGENTA,
  361.                     SCR_YELLOW,SCR_WHITE.
  362.                    Also useful are SCR_INTENSE_BIT and SCR_BLINK_BIT which may
  363.                    be ored with the attribute.
  364.      
  365.      NAME:         REVERSE_ATTR - Reverse foreground and background
  366.                    REVERSE_ATTR                                    
  367.      MODULE:       MACRO in hsa_attr.h
  368.      SYNOPSIS:     REVERSE_ATTR (attr)
  369.                       int attr;               Attribute byte
  370.      DESCRIPTION:  Swaps the foreground and background colors in the attribute
  371.                    byte, preserving the intense and blink bits.
  372.      
  373.      NAME:         TX_ADAPT_1 - Returns current adapter type
  374.                    TX_ADAPT_1                               
  375.      MODULE:       STAT_COM
  376.      SYNOPSIS:     tx_adapt_1 ();
  377.      DESCRIPTION:  Returns the type of adapter that is currently
  378.                    being used by the BIOS
  379.      RETURNS:      1 = Monochrome (Hercules)
  380.                    2 = Color
  381.                    3 = EGA (64K memory)
  382.                    4 = EGA (128K memory)
  383.                    5 = EGA (192K memory)
  384.                    6 = EGA (256K memory)
  385.      
  386.      NAME:         TX_ATTR - Read the current screen attribute
  387.                    TX_ATTR                                    
  388.      MODULE:       TX_STAT
  389.      SYNOPSIS:     tx_attr ();
  390.      RETURNS:      Current screen attribute
  391.      SEE ALSO:     tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,
  392.                    tx_reverse,tx_under
  393.      
  394.      NAME:         TX_ATTR_SET - Set the current screen attribute
  395.                    TX_ATTR_SET                                   
  396.      MODULE:       TX_STAT
  397.      SYNOPSIS:     tx_attr_set (attribute);
  398.                       short attribute;        Attribute to use
  399.      DESCRIPTION:  Set the current screen attribute.
  400.      NOTE:         hsa_attr.h contains definitions for all attributes and
  401.                    a MAKE_ATTR macro to create the attribute bytes.
  402.      SEE ALSO:     tx_attr,tx_b_b,tx_blink,tx_bold,tx_norm,tx_reverse,tx_under
  403.      
  404.  
  405.  
  406.  
  407.      
  408.      14-Apr-88                                                          Page 6
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.      Hardwood Software Associates
  418.      
  419.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  420.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  421.      
  422.      NAME:         TX_B_B - Set to intense blinking white on black
  423.                    TX_B_B                                         
  424.      MODULE:       TX_ATTR
  425.      SYNOPSIS:     tx_b_b ();
  426.      DESCRIPTION:  Set current attribute to intense blinking white on black.
  427.      SEE ALSO:     tx_attr,tx_attr_set,tx_blink,tx_bold,tx_norm,
  428.                    tx_reverse,tx_under
  429.      
  430.      NAME:         TX_BIOS - Use BIOS for all I/O
  431.                    TX_BIOS                       
  432.      MODULE:       TX_STAT
  433.      SYNOPSIS:     tx_bios ();
  434.      DESCRIPTION:  Use BIOS calls for all operations to screen.  Although this is
  435.                    much slower than tx_direct, it is more portable.
  436.      SEE ALSO:     tx_direct
  437.      
  438.      NAME:         TX_BLINK - Set to blinking white on black
  439.                    TX_BLINK                                 
  440.      MODULE:       TX_ATTR
  441.      SYNOPSIS:     tx_blink ();
  442.      DESCRIPTION:  Set current attribute to blinking white on black.
  443.      SEE ALSO:     tx_attr,tx_attr_set,tx_b_b,tx_bold,tx_norm,tx_reverse,tx_under
  444.      
  445.      NAME:         TX_BOLD - Set to intense white on black
  446.                    TX_BOLD                                
  447.      MODULE:       TX_ATTR
  448.      SYNOPSIS:     tx_bold ();
  449.      DESCRIPTION:  Set current attribute to intense white on black.
  450.      SEE ALSO:     tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_norm,
  451.                    tx_reverse,tx_under
  452.      
  453.      NAME:         TX_CHR - Display a character at a specified location
  454.                    TX_CHR                                              
  455.      MODULE:       TX_FILL
  456.      SYNOPSIS:     tx_chr (row,column,chr);
  457.                       int row;                Row for display
  458.                       int column;             Column for display
  459.                       char chr;               Character to display
  460.      DESCRIPTION:  Move a character to the screen using the current screen
  461.                    attribute.
  462.      SEE ALSO:     tx_chr_a,tx_chr_c,tx_chr_a_c
  463.      
  464.      NAME:         TX_CHR_A - Display character at specified location
  465.                    TX_CHR_A                                          
  466.                               and attribute
  467.      MODULE:       TX_FILL
  468.      SYNOPSIS:     tx_chr_a (row,column,chr,attr);
  469.                       int row;                Row for display
  470.                       int column;             Column for display
  471.                       char chr;               Character to display
  472.                       int attr;               Attribute for character
  473.      DESCRIPTION:  Move a character to the screen using the specified
  474.                    screen attribute.
  475.      SEE ALSO:     tx_chr,tx_chr_c,tx_chr_a_c,tx_chr_o,tx_chr_o_c
  476.      
  477.  
  478.  
  479.  
  480.      
  481.      14-Apr-88                                                          Page 7
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.      Hardwood Software Associates
  491.      
  492.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  493.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  494.      
  495.      NAME:         TX_CHR_C - Display a character, continued from current
  496.                    TX_CHR_C                                              
  497.                               location
  498.      MODULE:       TX_FILL
  499.      SYNOPSIS:     tx_chr_c (chr);
  500.                    char chr;                  Character to display
  501.      DESCRIPTION:  Move the character to the screen using the current
  502.                    screen attribute.  The character is displayed on the
  503.                    screen at the next current location.
  504.      SEE ALSO:     tx_chr,tx_chr_a,tx_chr_a_c,tx_chr_o,tx_chr_o_c
  505.      
  506.      NAME:         TX_CHR_A_C - Display a character with specified
  507.                    TX_CHR_A_C                                     
  508.                                 attribute, continued from current location
  509.      ALIAS:        TX_CHR_C_A
  510.                    TX_CHR_C_A
  511.      MODULE:       TX_FILL
  512.      SYNOPSIS:     tx_chr_a_c (chr,attr);
  513.                    tx_chr_c_a (chr,attr);
  514.                       char chr;               Character to display
  515.                       int attr;               Attribute for character
  516.      DESCRIPTION:  Move the character to the screen using the specified
  517.                    screen attribute.  The character is displayed on the
  518.                    screen at the current location.
  519.      SEE ALSO:     tx_chr,tx_chr_a,tx_chr_c,tx_chr_o,tx_chr_o_c
  520.      
  521.      NAME:         TX_CHR_O - Display a character only at a specified location
  522.                    TX_CHR_O                                                   
  523.      MODULE:       TX_FILL
  524.      SYNOPSIS:     tx_chr_o (row,column,chr);
  525.                       int row;                Row for display
  526.                       int column;             Column for display
  527.                       char chr;               Character to display
  528.      DESCRIPTION:  Move the character to the screen. Move the character only,
  529.                    no change is made to the screen attribute of the screen.
  530.                    This is useful when replacing existing screen data.
  531.      SEE ALSO:     tx_chr,tx_chr_a,tx_chr_c,tx_chr_a_c,tx_chr_o_c
  532.      
  533.      NAME:         TX_CHR_O_C - Display a character only, continued
  534.                    TX_CHR_O_C                                      
  535.                                 from current location
  536.      MODULE:       TX_FILL
  537.      SYNOPSIS:     tx_chr_o_c (chr);
  538.                       char chr;               Character to display
  539.      DESCRIPTION:  Move the character to the screen at the current location.
  540.                    Move the character only, no change is made to the screen
  541.                    attribute of the screen.
  542.      SEE ALSO:     tx_chr,tx_chr_a,tx_chr_c,tx_chr_a_c,tx_chr_o
  543.      
  544.      NAME:         TX_CLR - Clear the entire screen
  545.                    TX_CLR                          
  546.      MODULE:       TX_CLR
  547.      SYNOPSIS:     tx_clr ();
  548.      DESCRIPTION:  Clears the screen to blanks, using the current screen
  549.                    attribute.
  550.      SEE ALSO:     tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
  551.      
  552.  
  553.      
  554.      14-Apr-88                                                          Page 8
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.      Hardwood Software Associates
  564.      
  565.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  566.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  567.      
  568.      NAME:         TX_CLR_A - Clear the entire screen
  569.                    TX_CLR_A                          
  570.      MODULE:       TX_CLR
  571.      SYNOPSIS:     tx_clr_a (attr);
  572.                       int attr;               Attribute for character
  573.      DESCRIPTION:  Clears the screen to blanks, using the specified screen
  574.                    attribute.
  575.      SEE ALSO:     tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
  576.      
  577.      NAME:         TX_CLR_EOL - Clear to the end of the line
  578.                    TX_CLR_EOL                               
  579.      MODULE:       TX_CLR
  580.      SYNOPSIS:     tx_clr_eol ();
  581.      DESCRIPTION:  Clear the screen from the current location to the end of row,
  582.                    using the current screen attribute.
  583.      SEE ALSO:     tx_clr,tx_clr_a,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
  584.      
  585.      NAME:         TX_CLR_EOL_A - Clear to the end of the line
  586.                    TX_CLR_EOL_A                               
  587.      MODULE:       TX_CLR
  588.      SYNOPSIS:     tx_clr_eol_a (attr);
  589.                       int attr;               Attribute for character
  590.      DESCRIPTION:  Clear the screen from the current location to the end of row,
  591.                    using the current screen attribute.
  592.      SEE ALSO:     tx_clr,tx_clr_a,tx_clr_eol,tx_clr_rows,tx_clr_rows_a
  593.      
  594.      NAME:         TX_CLR_ROWS - Clear a block of lines on the screen
  595.                    TX_CLR_ROWS                                       
  596.      MODULE:       TX_CLR
  597.      SYNOPSIS:     tx_clr_rows (start,end);
  598.                       int start;              First line to clear
  599.                                                  (-1 if current)
  600.                       int end;                Last line to clear
  601.                                                  (-1 if current)
  602.      DESCRIPTION:  Clears the screen from the start line to the end line, using
  603.                    the current screen attribute.
  604.      SEE ALSO:     tx_clr,tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows_a
  605.      
  606.      NAME:         TX_CLR_ROWS_A - Clear a block of lines on the screen
  607.                    TX_CLR_ROWS_A                                       
  608.      MODULE:       TX_CLR
  609.      SYNOPSIS:     tx_clr_rows_a (start,end,attr);
  610.                       int start;              First line to clear
  611.                                                  (-1 if current)
  612.                       int end;                Last line to clear
  613.                                                  (-1 if current)
  614.                       int attr;               Attribute for character
  615.      DESCRIPTION:  Clears the screen from the start line to the end line, using
  616.                    the specified screen attribute.
  617.      SEE ALSO:     tx_clr,tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows
  618.      
  619.      NAME:         TX_COL - Read the current location column
  620.                    TX_COL                                   
  621.      MODULE:       TX_STAT
  622.      SYNOPSIS:     tx_col ();
  623.      RETURNS:      Current location column
  624.      SEE ALSO:     tx_row,tx_up,tx_down,tx_nl,tx_loc
  625.      
  626.      
  627.      14-Apr-88                                                          Page 9
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.      Hardwood Software Associates
  637.      
  638.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  639.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  640.      
  641.      NAME:         TX_CONF - Set crt screen memory address and
  642.                    TX_CONF                                    
  643.                              6845 index register address
  644.      MODULE:       TX_STAT
  645.      SYNOPSIS:     tx_conf (tx_seg,tx_6845_i);
  646.                       unsigned tx_seg;    Segment address of crt
  647.                                           memory for direct mode
  648.                       unsigned tx_6845_i; 6845 index register address
  649.      DESCRIPTION:  If the arguments are not equal to 0 or -1 then
  650.                    the segment for the screen memory and/or the 6845
  651.                    index register address are updated.
  652.      CAUTION:      This must be called after every call to tx_direct as
  653.                    tx_direct sets the segment and 6845 address to the
  654.                    default for the current monitor type.
  655.      SEE ALSO:     tx_direct,tx_snow,tx_no_snow
  656.      
  657.      NAME:         TX_CUR_HIDE - Hide the cursor
  658.                    TX_CUR_HIDE                  
  659.      MODULE:       TX_CUR
  660.      SYNOPSIS:     tx_cur_hide ();
  661.      SEE ALSO:     tx_cur_show,tx_cur_set
  662.      
  663.      NAME:         TX_CUR_SET - Set the cursor start / stop scan lines
  664.                    TX_CUR_SET                                         
  665.      MODULE:       TX_CUR
  666.      SYNOPSIS:     tx_cur_set (start,end);
  667.                       int start;              Start scan line of cursor
  668.                       int end;                End scan line of cursor
  669.      DESCRIPTION:  Set the size of the cursor.
  670.      SEE ALSO:     tx_cur_hide,tx_cur_show
  671.      
  672.      NAME:         TX_CUR_SHOW - Show the cursor
  673.                    TX_CUR_SHOW                  
  674.      MODULE:       TX_CUR
  675.      SYNOPSIS:     tx_cur_show ();
  676.      SEE ALSO:     tx_cur_hide,tx_cur_set
  677.      
  678.      NAME:         TX_DIRECT - Access screen hardware directly
  679.                    TX_DIRECT                                  
  680.      MODULE:       TX_STAT
  681.      SYNOPSIS:     tx_direct ();
  682.      DESCRIPTION:  Access screen directly.  This is much faster but not
  683.                    as portable as the BIOS mode.
  684.      NOTE:         If the current state is not 7 (monochrome) tx_snow is
  685.                    called to prevent screen interference.
  686.      SEE ALSO:     tx_bios,tx_conf
  687.      
  688.      NAME:         TX_DOWN - Move the current location one row down
  689.                    TX_DOWN                                         
  690.      MODULE:       TX_CUR
  691.      SYNOPSIS:     tx_down ();
  692.      SEE ALSO:     tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
  693.      
  694.  
  695.  
  696.  
  697.  
  698.  
  699.      
  700.      14-Apr-88                                                          Page 10
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.      Hardwood Software Associates
  710.      
  711.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  712.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  713.      
  714.      NAME:         TX_FILL - Fill with the specified number of a character
  715.                    TX_FILL                                                
  716.      MODULE:       TX_FILL
  717.      SYNOPSIS:     tx_fill (row,column,chr,number);
  718.                       int row;                Row for display
  719.                       int column;             Column for display
  720.                       char chr;               Character to display
  721.                       int number;             Number of times to
  722.                                               display character
  723.      DESCRIPTION:  Move the character to the screen the specified
  724.                    number of times using the current screen attribute.
  725.      SEE ALSO:     tx_fill_a,tx_fill_c,tx_fill_a_c
  726.      
  727.      NAME:         TX_FILL_A - Fill with the specified number of a character
  728.                    TX_FILL_A                                                
  729.      MODULE:       TX_FILL
  730.      SYNOPSIS:     tx_fill_a (row,column,chr,number,attr);
  731.                       int row;                Row for display
  732.                       int column;             Column for display
  733.                       char chr;               Character to display
  734.                       int number;             Number of times to
  735.                                               display character
  736.                       int attr;               Attribute to use
  737.      DESCRIPTION:  Move the character to the screen the specified
  738.                    number of times, using the specified attribute.
  739.      SEE ALSO:     tx_fill,tx_fill_c,tx_fill_a_c
  740.      
  741.      NAME:         TX_FILL_C - Fill with the specified number of a
  742.                    TX_FILL_C                                      
  743.                                character, continued from current location
  744.      MODULE:       TX_FILL
  745.      SYNOPSIS:     tx_fill_c (chr,number);
  746.                       char chr;               Character to display
  747.                       int number;             Number of times to
  748.                                               display character
  749.      DESCRIPTION:  Move the character to the screen the specified
  750.                    number of times.  Uses the current attribute.
  751.                    Starts at current location.
  752.      SEE ALSO:     tx_fill,tx_fill_a,tx_fill_a_c
  753.      
  754.      NAME:         TX_FILL_A_C - Fill with the specified number of a
  755.                    TX_FILL_A_C                                      
  756.                                  character, continued from current location
  757.      ALIAS:        TX_FILL_C_A
  758.                    TX_FILL_C_A
  759.      MODULE:       TX_FILL
  760.      SYNOPSIS:     tx_fill_a_c (chr,number,attr);
  761.                    tx_fill_c_a (chr,number,attr);
  762.                       char chr;               Character to display
  763.                       int number;             Number of times to
  764.                                               display character
  765.                       int attr;               Attribute to use
  766.      DESCRIPTION:  Move the character to the screen the specified
  767.                    number of times.  Starts at current location.
  768.      SEE ALSO:     tx_fill,tx_fill_a,tx_fill_c
  769.      
  770.  
  771.      
  772.      14-Apr-88                                                          Page 11
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.      Hardwood Software Associates
  782.      
  783.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  784.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  785.      
  786.      NAME:         TX_GET_STATUS / TX_PUT_STATUS - CRT status save/restore
  787.                    TX_GET_STATUS   TX_PUT_STATUS                          
  788.      MODULE:       TX_STAT
  789.      SYNOPSIS:     tx_get_status (&buffer);
  790.                    tx_put_status (&buffer);
  791.                       struct                  Status buffer pointer
  792.                          {
  793.                          unsigned char mode;
  794.                          unsigned char attribute;
  795.                          unsigned short row,column;
  796.                          } *buffer;
  797.      DESCRIPTION:  Retrieves or sets the current CRT status.
  798.      NOTE:         Structure defined as CRT_STATUS in hsa_tx.h
  799.      
  800.      NAME:         TX_LEFT - Move the current location one column left
  801.                    TX_LEFT                                            
  802.      MODULE:       TX_CUR
  803.      SYNOPSIS:     tx_left ();
  804.      SEE ALSO:     tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
  805.      
  806.      NAME:         TX_LOC - Set the current location
  807.                    TX_LOC                           
  808.      MODULE:       TX_CUR
  809.      SYNOPSIS:     tx_loc (row,column);
  810.                       int row;                Row for display
  811.                       int column;             Column for display
  812.      DESCRIPTION:  Move the cursor to the specified location.
  813.      SEE ALSO:     tx_col,tx_row,tx_up,tx_down,tx_nl
  814.      
  815.      NAME:         TX_MOWS_BUTTON - Return status of buttons
  816.                    TX_MOWS_BUTTON                           
  817.      MODULE:       MOWS_COM
  818.      SYNOPSIS:     int tx_mows_button ();
  819.      DESCRIPTION:  Get the current mouse button status.
  820.      RETURNS:      FALSE - No buttons pressed.
  821.                    bits set for buttons pressed:
  822.                      MOWS_LEFT,MOWS_RIGHT,MOWS_MIDDLE (in hsa_tx.h)
  823.      
  824.      NAME:         TX_MOWS_HARD_CUR - Set hardware text cursor
  825.                    TX_MOWS_HARD_CUR                           
  826.      MODULE:       TX_MOWS
  827.      SYNOPSIS:     int tx_mows_hard_cur (start,stop);
  828.                    int start;         Start scan line of cursor (top)
  829.                    int stop;          Stop scan line
  830.      DESCRIPTION:  Set the hardware cursor scan lines.
  831.      RETURNS:      Mouse type:
  832.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  833.      
  834.      NAME:         TX_MOWS_HIDE - Hide mouse cursor
  835.                    TX_MOWS_HIDE                    
  836.      MODULE:       MOWS_COM
  837.      SYNOPSIS:     int tx_mows_hide ();
  838.      DESCRIPTION:  Hide the mouse cursor; if already hidden do nothing.
  839.      RETURNS:      Mouse type:
  840.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  841.      
  842.  
  843.  
  844.      
  845.      14-Apr-88                                                          Page 12
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.      Hardwood Software Associates
  855.      
  856.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  857.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  858.      
  859.      NAME:         TX_MOWS_LOC - Return location of mouse cursor
  860.                    TX_MOWS_LOC                                  
  861.      MODULE:       TX_MOWS
  862.      SYNOPSIS:     int tx_mows_loc (row,col);
  863.                    int *row,*col;    Current cursor position pointer
  864.      DESCRIPTION:  Get the current mouse cursor position.  Screen
  865.                    coordinates are in character units.
  866.      RETURNS:      Mouse type:
  867.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  868.      
  869.      NAME:         TX_MOWS_MOVE - Move mouse cursor to position
  870.                    TX_MOWS_MOVE                                
  871.      MODULE:       TX_MOWS
  872.      SYNOPSIS:     int tx_mows_move (row,col);
  873.                    int row,col;        Desired cursor position
  874.      DESCRIPTION:  Move the cursor to the specified position.
  875.      CAUTIONS:     The Mouse Systems driver requires that the cursor be
  876.                    hidden before moving the cursor.  If the cursor is not
  877.                    hidden, the cursor stays where it is on the screen
  878.                    until the mouse is moved then it starts from the new
  879.                    location.  The Logitech driver allows move to be called
  880.                    anytime.
  881.      RETURNS:      Mouse type:
  882.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  883.      
  884.      NAME:         TX_MOWS_PRESS - Get count of button presses
  885.                    TX_MOWS_PRESS                              
  886.      MODULE:       TX_MOWS
  887.      SYNOPSIS:     int tx_mows_press (row,col,button);
  888.                    int *row,*col;      Cursor position at last press
  889.                    int button;         Desired button (see HSA_TX.H)
  890.      DESCRIPTION:  Get the number of button presses of the specified
  891.                    button since the last call of tx_mows_press.
  892.      RETURNS:      Number of button presses
  893.                    Location of last press (via *row,*col)
  894.      
  895.      NAME:         TX_MOWS_RELEASE - Get count of button releases
  896.                    TX_MOWS_RELEASE                               
  897.      MODULE:       TX_MOWS
  898.      SYNOPSIS:     int tx_mows_release (row,col,button);
  899.                    int *row,*col;      Cursor position at last release
  900.                    int button;         Desired button (see HSA_TX.H)
  901.      DESCRIPTION:  Get the number of button releases of the specified
  902.                    button since the last call of tx_mows_release.
  903.      RETURNS:      Number of button releases
  904.                    Location of last release (via *row,*col)
  905.      
  906.      NAME:         TX_MOWS_RESET - Reset the mouse driver
  907.                    TX_MOWS_RESET                         
  908.      MODULE:       MOWS_COM
  909.      SYNOPSIS:     int tx_mows_reset ();
  910.      DESCRIPTION:  Determine if the mouse driver is loaded and there
  911.                    is a mouse attached.  Return the status of the mouse.
  912.      RETURNS:      Mouse type:
  913.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  914.      CAUTIONS:     This function must be called before any other
  915.                    mouse functions are called.
  916.      
  917.      14-Apr-88                                                          Page 13
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.      Hardwood Software Associates
  927.      
  928.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  929.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  930.      
  931.      
  932.      NAME:         TX_MOWS_SENSITIVITY - Set mouse sensitivity
  933.                    TX_MOWS_SENSITIVITY                        
  934.      MODULE:       MOWS_COM
  935.      SYNOPSIS:     int tx_mows_sensitivity (hor,ver);
  936.                    int hor;            horizontal mickey/pixel
  937.                    int ver;            vertical mickey/pixel
  938.      DESCRIPTION:  Sets the sensitivity of the mouse motion.
  939.      RETURNS:      Mouse type:
  940.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  941.      
  942.      NAME:         TX_MOWS_SOFT_CUR - Set software text cursor
  943.                    TX_MOWS_SOFT_CUR                           
  944.      MODULE:       TX_MOWS
  945.      SYNOPSIS:     int tx_mows_soft_cur (scr_mask,cur_mask);
  946.                    int scr_mask;            Screen mask
  947.                    int cur_mask;            Cursor mask
  948.      DESCRIPTION:  Set the software cursor character/attribute
  949.      RETURNS:      Mouse type:
  950.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  951.      
  952.      NAME:         TX_MOWS_SHOW - Show mouse cursor
  953.                    TX_MOWS_SHOW                    
  954.      MODULE:       MOWS_COM
  955.      SYNOPSIS:     int tx_mows_show ();
  956.      DESCRIPTION:  Show the mouse cursor; if already visible do nothing.
  957.      RETURNS:      Mouse type:
  958.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  959.      
  960.      NAME:         TX_MOWS_TYPE - Return type of mouse
  961.                    TX_MOWS_TYPE                       
  962.      MODULE:       MOWS_COM
  963.      SYNOPSIS:     int tx_mows_type ();
  964.      DESCRIPTION:  Return type of mouse.
  965.      RETURNS:      Mouse type:
  966.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  967.      
  968.      NAME:         TX_MOWS_WINDOW - Limit mouse motion to a window
  969.                    TX_MOWS_WINDOW                                 
  970.      MODULE:       TX_MOWS
  971.      SYNOPSIS:     int tx_mows_window (row1,col1,row2,col2);
  972.                    int row1,col1;         Coords of upper left corner
  973.                    int row2,col2;         Coords of lower right corner
  974.      DESCRIPTION:  Limit motion of mouse to within specified window.
  975.      RETURNS:      Mouse type:
  976.                     MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
  977.      
  978.      NAME:         TX_NL - Move the current location to the start of next row
  979.                    TX_NL                                                     
  980.      MODULE:       TX_CUR
  981.      SYNOPSIS:     tx_nl ();
  982.      SEE ALSO:     tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
  983.      
  984.      NAME:         TX_NO_COL - Read the number of columns in screen
  985.                    TX_NO_COL                                       
  986.      MODULE:       TX_STAT
  987.      SYNOPSIS:     tx_no_col ();
  988.      RETURNS:      Number of columns on screen
  989.      
  990.      
  991.      14-Apr-88                                                          Page 14
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.      Hardwood Software Associates
  1001.      
  1002.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1003.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1004.      
  1005.      NAME:         TX_NO_SNOW - Don't wait for retrace to prevent snow
  1006.                    TX_NO_SNOW                                         
  1007.      MODULE:       TX_STAT
  1008.      SYNOPSIS:     tx_no_snow ();
  1009.      DESCRIPTION:  Don't wait for retrace when accessing screen memory.
  1010.      NOTE:         This function should be called for color adapters
  1011.                    (e.g. EGA) that don't create snow when the screen
  1012.                    memory is accessed directly.
  1013.      SEE ALSO:     tx_snow,tx_direct
  1014.      
  1015.      NAME:         TX_NORM - Set to white on black
  1016.                    TX_NORM                        
  1017.      MODULE:       TX_ATTR
  1018.      SYNOPSIS:     tx_norm ();
  1019.      DESCRIPTION:  Set current attribute to white on black.
  1020.      SEE ALSO:     tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,
  1021.                    tx_reverse,tx_under
  1022.      
  1023.      NAME:         TX_RD_BLK - Read a block of screen data
  1024.                    TX_RD_BLK                              
  1025.      MODULE:       TX_BLK
  1026.      SYNOPSIS:     tx_rd_blk (row,column,buffer,no_row,no_column);
  1027.                       int row;                Row to read
  1028.                       int column;             Column to read
  1029.                       int *buffer;            Buffer address
  1030.                       int no_row;             Number of rows to read
  1031.                       int no_column;          Number of columns to read
  1032.      DESCRIPTION:  Read a block of screen memory, character and
  1033.                    attribute, into the buffer.
  1034.      NOTE:         The current location is set to row,column.
  1035.      SEE ALSO:     tx_rd_blk_c,tx_wr_blk,tx_wr_blk_c
  1036.      
  1037.      NAME:         TX_RD_BLK_C - Read a block of screen data, at current location
  1038.                    TX_RD_BLK_C                                                   
  1039.      MODULE:       TX_FILL
  1040.      SYNOPSIS:     tx_rd_blk_c (buffer,no_row,no_column);
  1041.                       int *buffer;            Buffer address
  1042.                       int no_row;             Number of rows to read
  1043.                       int no_column;          Number of columns to read
  1044.      DESCRIPTION:  Read a block of screen memory, character and
  1045.                    attribute, into the buffer.
  1046.      NOTE:         The current location is unchanged.
  1047.      SEE ALSO:     tx_rd_blk,tx_wr_blk,tx_wr_blk_c
  1048.      
  1049.      NAME:         TX_RD_STR - Read string from screen
  1050.                    TX_RD_STR                          
  1051.      MODULE:       TX_MISC
  1052.      SYNOPSIS:     char *tx_rd_str (row,col,string,number);
  1053.                       int row;                Row to read
  1054.                       int column;             Column to read
  1055.                       char *string;           Buffer address
  1056.                       short number;           Number characters to read
  1057.      DESCRIPTION:  Reads the characters displayed on the screen into the
  1058.                    string buffer.
  1059.      RETURNS:      Pointer to string
  1060.      NOTE:         Current location remains unchanged
  1061.      SEE ALSO:     tx_rd_str_c
  1062.      
  1063.      14-Apr-88                                                          Page 15
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.      Hardwood Software Associates
  1073.      
  1074.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1075.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1076.      
  1077.      
  1078.      NAME:         TX_RD_STR_C - Read string from screen at current location
  1079.                    TX_RD_STR_C                                              
  1080.      MODULE:       TX_MISC
  1081.      SYNOPSIS:     char *tx_rd_str_c (string,number);
  1082.                       char *string;           Buffer address
  1083.                       short number;           Number characters to read
  1084.      DESCRIPTION:  Reads the characters displayed on the screen into the
  1085.                    string buffer.
  1086.      RETURNS:      Pointer to string
  1087.      NOTE:         Current location remains unchanged
  1088.      SEE ALSO:     tx_rd_str
  1089.      
  1090.      NAME:         TX_REVERSE - Set to black on white
  1091.                    TX_REVERSE                        
  1092.      MODULE:       TX_ATTR
  1093.      SYNOPSIS:     tx_reverse ();
  1094.      DESCRIPTION:  Set current attribute to black on white.
  1095.      SEE ALSO:     tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,tx_under
  1096.      
  1097.      NAME:         TX_RIGHT - Move the current location one column right
  1098.                    TX_RIGHT                                             
  1099.      MODULE:       TX_CUR
  1100.      SYNOPSIS:     tx_right ();
  1101.      SEE ALSO:     tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
  1102.      
  1103.      NAME:         TX_ROW - Read the current location row
  1104.                    TX_ROW                                
  1105.      MODULE:       TX_STAT
  1106.      SYNOPSIS:     tx_row ();
  1107.      RETURNS:      Current location row
  1108.      SEE ALSO:     tx_col,tx_up,tx_down,tx_nl,tx_loc
  1109.      
  1110.      NAME:         TX_SCDN - Scroll screen down one line
  1111.                    TX_SCDN                              
  1112.      MODULE:       TX_SCROL
  1113.      SYNOPSIS:     tx_scdn (row,column,no_row,no_column);
  1114.                       int row,column;         Upper left row/column
  1115.                                                  (-1 for current)
  1116.                       int no_row;             Number of rows to scroll
  1117.                       int no_column;          Number of columns to scroll
  1118.      DESCRIPTION:  Scrolls the specified portion of the screen down one row,
  1119.                    using the current attribute.
  1120.      SEE ALSO:     tx_scup,tx_scdn_a,tx_up_a
  1121.      
  1122.      NAME:         TX_SCDN_A - Scroll screen down one line
  1123.                    TX_SCDN_A                              
  1124.      MODULE:       TX_SCROL
  1125.      SYNOPSIS:     tx_scdn_a (row,column,no_row,no_column,attr);
  1126.                       int row,column;         Upper left row/column
  1127.                                                  (-1 for current)
  1128.                       int no_row;             Number of rows to scroll
  1129.                       int no_column;          Number of columns to scroll
  1130.                       int attr;               Attribute for character
  1131.      DESCRIPTION:  Scrolls the specified portion of the screen down one row,
  1132.                    using the specified attribute.
  1133.      SEE ALSO:     tx_scup,tx_scdn_a,tx_up_a
  1134.      
  1135.      
  1136.      14-Apr-88                                                          Page 16
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.      Hardwood Software Associates
  1146.      
  1147.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1148.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1149.      
  1150.      NAME:         TX_SCUP - Scroll screen up one line
  1151.                    TX_SCUP                            
  1152.      MODULE:       TX_SCROL
  1153.      SYNOPSIS:     tx_scup (row,column,no_row,no_column);
  1154.                       int row,column;         Upper left row/column
  1155.                                                  (-1 for current)
  1156.                       int no_row;             Number of rows to scroll
  1157.                       int no_column;          Number of columns to scroll
  1158.      DESCRIPTION:  Scrolls the specified portion of the screen up one row,
  1159.                    using the current attribute.
  1160.      SEE ALSO:     tx_scdn,tx_scdn_a,tx_up_a
  1161.      
  1162.      NAME:         TX_SCUP_A - Scroll screen up one line
  1163.                    TX_SCUP_A                            
  1164.      MODULE:       TX_SCROL
  1165.      SYNOPSIS:     tx_scup_a (row,column,no_row,no_column,attr);
  1166.                       int row,column;         Upper left row/column
  1167.                                                  (-1 for current)
  1168.                       int no_row;             Number of rows to scroll
  1169.                       int no_column;          Number of columns to scroll
  1170.                       int attr;               Attribute for character
  1171.      DESCRIPTION:  Scrolls the specified portion of the screen up one row,
  1172.                    using the specified attribute.
  1173.      SEE ALSO:     tx_scup,tx_scdn_a,tx_up_a
  1174.      
  1175.      NAME:         TX_SNOW - Wait for retrace to prevent snow
  1176.                    TX_SNOW                                   
  1177.      MODULE:       TX_STAT
  1178.      SYNOPSIS:     tx_snow ();
  1179.      DESCRIPTION:  Wait for retrace when accessing screen memory.
  1180.      NOTE:         Only applicable for direct mode on CGA adapters.
  1181.      SEE ALSO:     tx_no_snow,tx_direct
  1182.      
  1183.      NAME:         TX_STATE - Returns current video state
  1184.                    TX_STATE                              
  1185.      MODULE:       STAT_COM
  1186.      SYNOPSIS:     tx_state ();
  1187.      DESCRIPTION:  Calls BIOS INT 10 with function code 15 to get the
  1188.                    current video state.
  1189.      RETURNS:      Text modes:
  1190.                       0 = 40x25 Black and white
  1191.                       1 = 40x25 Color
  1192.                       2 = 80x25 Black and white
  1193.                       3 = 80x25 Color
  1194.                    Graphics modes:
  1195.                       4 = 320x200 4 Color
  1196.                       5 = 320x200 Black and white
  1197.                       6 = 640x200 Black and white
  1198.                       7 = Monochrome
  1199.                       D = 320x200 16 Color               (EGA)
  1200.                       E = 640x200 16 Color               (EGA)
  1201.                       F = 640x350 4 Color Monochrome     (EGA)
  1202.                      10 = 640x350 16 Color               (EGA)
  1203.                      64 = 640x400 Black and white        (AT&T)
  1204.      
  1205.  
  1206.      
  1207.      14-Apr-88                                                          Page 17
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.      Hardwood Software Associates
  1217.      
  1218.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1219.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1220.      
  1221.      NAME:         TX_STR - Display string at specified location
  1222.                    TX_STR                                       
  1223.      MODULE:       TX_STR
  1224.      SYNOPSIS:     tx_str (row,column,string);
  1225.                       int row;                Row for string display
  1226.                       int column;             Column for string display
  1227.                       char *string;           Pointer to string
  1228.      DESCRIPTION:  Move the string to the screen using the current
  1229.                    attribute.  The row and column specified in the
  1230.                    call are used for the first character in the string.
  1231.      SEE ALSO:     tx_str_a,tx_str_c,tx_str_a_c
  1232.      
  1233.      NAME:         TX_STR_A - Display string at specified location and attribute
  1234.                    TX_STR_A                                                     
  1235.      MODULE:       TX_STR
  1236.      SYNOPSIS:     tx_str_a (row,column,string,attr);
  1237.                       int row;                Row for string display
  1238.                       int column;             Column for string display
  1239.                       char *string;           Pointer to string
  1240.                       int attr;               Attribute for string
  1241.      DESCRIPTION:  Move the string to the screen using the specified
  1242.                    screen attribute.  The row and column specified in
  1243.                    the call are used for the first character in the string.
  1244.      SEE ALSO:     tx_str,tx_str_c,tx_str_a_c
  1245.      
  1246.      NAME:         TX_STR_C - Display a string, continued from current location
  1247.                    TX_STR_C                                                    
  1248.      MODULE:       TX_STR
  1249.      SYNOPSIS:     tx_str_c (string);
  1250.                       char *string;           Pointer to string
  1251.      DESCRIPTION:  Move the string to the screen using the current
  1252.                    attribute.  The string is displayed on the screen
  1253.                    in the next available location.
  1254.      SEE ALSO:     tx_str,tx_str_a,tx_str_a_c
  1255.      
  1256.      NAME:         TX_STR_A_C - Display a string, continued from
  1257.                    TX_STR_A_C                                   
  1258.                                 current location with specified attribute
  1259.      ALIAS:        TX_STR_C_A
  1260.                    TX_STR_C_A
  1261.      MODULE:       TX_STR
  1262.      SYNOPSIS:     tx_str_a_c (string,attr);
  1263.                    tx_str_c_a (string,attr);
  1264.                       char *string;           Pointer to string
  1265.                       int attr;               Attribute for string
  1266.      DESCRIPTION:  Move the string to the screen using the specified
  1267.                    screen attribute.  The string is displayed on the
  1268.                    screen in the next available location.
  1269.      SEE ALSO:     tx_str,tx_str_a,tx_str_c
  1270.      
  1271.      NAME:         TX_UNDER - Set to underlined
  1272.                    TX_UNDER                    
  1273.      MODULE:       TX_ATTR
  1274.      SYNOPSIS:     tx_under ();
  1275.      DESCRIPTION:  Set current attribute to underlined.
  1276.      CAUTION:      In color this is blue.
  1277.      SEE ALSO:     tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,tx_reverse
  1278.      
  1279.      
  1280.      14-Apr-88                                                          Page 18
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.      Hardwood Software Associates
  1290.      
  1291.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1292.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1293.      
  1294.      NAME:         TX_UP - Move the current location one row up
  1295.                    TX_UP                                       
  1296.      MODULE:       TX_CUR
  1297.      SYNOPSIS:     tx_up ();
  1298.      SEE ALSO:     tx_col,tx_row,tx_down,tx_nl,tx_loc
  1299.      
  1300.      NAME:         TX_WR_BLK - Write a block of screen data
  1301.                    TX_WR_BLK                               
  1302.      MODULE:       TX_FILL
  1303.      SYNOPSIS:     tx_wr_blk (row,column,buffer,no_row,no_column);
  1304.                       int row;                Row to write
  1305.                       int column;             Column to write
  1306.                       int *buffer;            Buffer address
  1307.                       int no_row;             Number of rows to write
  1308.                       int no_column;          Number of columns to write
  1309.      DESCRIPTION:  Write a block of screen memory, character and
  1310.                    attribute, from the buffer.
  1311.      NOTE:         The current location is set to row,column.
  1312.      SEE ALSO:     tx_rd_blk,tx_rd_blk_c,tx_wr_blk_c
  1313.      
  1314.      NAME:         TX_WR_BLK_C - Write a block of screen data,
  1315.                    TX_WR_BLK_C                                
  1316.                                  at current location
  1317.      MODULE:       TX_FILL
  1318.      SYNOPSIS:     tx_wr_blk_c (buffer,no_row,no_column);
  1319.                       int *buffer;            Buffer address
  1320.                       int no_row;             Number of rows to write
  1321.                       int no_column;          Number of columns to write
  1322.      DESCRIPTION:  Write a block of screen memory, character and
  1323.                    attribute, from the buffer.
  1324.      NOTE:         The current location is unchanged.
  1325.      SEE ALSO:     tx_rd_blk,tx_rd_blk_c,tx_wr_blk
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.      
  1350.      14-Apr-88                                                          Page 19
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.      Hardwood Software Associates
  1360.      
  1361.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1362.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1363.      
  1364.      
  1365.                         Useful Screen Attributes and Macros
  1366.                         ___________________________________
  1367.      
  1368.      The following constants and macros are defined in hsa_attr.h and are
  1369.      useful in generating screen attributes.
  1370.      
  1371.      /******************************************************************/
  1372.      /*                                                                */
  1373.      /*  H S A _ A T T R . H - Various Screen Attributes and Macro     */
  1374.      /*                                                                */
  1375.      /******************************************************************/
  1376.      
  1377.      /******************************************************************/
  1378.      /*                                                                */
  1379.      /*        Copyright (c) Hardwood Software Associates 1988         */
  1380.      /*                                                                */
  1381.      /*                 Hardwood Software Associates                   */
  1382.      /*                        364 Benson Road                         */
  1383.      /*                     Northbridge, Ma 01534                      */
  1384.      /*                                                                */
  1385.      /******************************************************************/
  1386.      
  1387.      /******************************************************************
  1388.       *            H S A _ A T T R . H    E D I T    L O G
  1389.       *
  1390.       *    $Log:   D:/CRT/VCS/HSA_ATTR.H_V  $
  1391.       *
  1392.       *     Rev 1.2   02 Jul 1988  7:28:38   R. Evans
  1393.       *  Add MAKE_PAL
  1394.       *
  1395.       *     Rev 1.1   01 May 1988 10:45:22   R. Evans
  1396.       *  Remove tabs for inclusion in documentation
  1397.       *
  1398.       *  Rev 1.0   30 Apr 1988 22:10:44   R. Evans
  1399.       *   Initial revision.
  1400.       ******************************************************************/
  1401.      
  1402.      #ifndef HSA_ATTRIBUTES
  1403.      #define HSA_ATTRIBUTES
  1404.                                           /* Monochrome Attributes */
  1405.      #define SCR_NORM    0x07             /* Normal characters */
  1406.      #define SCR_BOLD    0x0F             /* Bold characters */
  1407.      #define SCR_BLINK   0x87             /* Blinking characters */
  1408.      #define SCR_REVERSE 0x70             /* Reverse video characters */
  1409.      #define SCR_UNDER   0x01             /* Underlined characters */
  1410.      #define SCR_B_B     0x8F             /* Blinking bold characters */
  1411.      #define SCR_B_U     0x09             /* Blinking underlined characters */
  1412.                                           /* Colors */
  1413.      #define SCR_BLACK    0x0
  1414.      #define SCR_BLUE     0x1
  1415.      #define SCR_GREEN    0x2
  1416.      #define SCR_CYAN     0x3
  1417.      
  1418.      14-Apr-88                                                          Page 20
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.      Hardwood Software Associates
  1428.      
  1429.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1430.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1431.      
  1432.      #define SCR_RED      0x4
  1433.      #define SCR_MAGENTA  0x5
  1434.      #define SCR_YELLOW   0x6
  1435.      #define SCR_WHITE    0x7
  1436.      
  1437.      #define SCR_INTENSE_BIT  0x08        /* Intensty bit */
  1438.      #define SCR_BLINK_BIT    0x80        /* Blink bit */
  1439.                                           /* Create attribute byte */
  1440.      #define MAKE_ATTR(fore,back)  (((back)<<4) | (fore))
  1441.                                           /* Reverse foreground nd background */
  1442.      #define REVERSE_ATTR(a)       ((a&0x80)|(a&0x08)|((a&0x07)<<4)|((a&0x70)>>4))
  1443.                                           /* Create Palette Value */
  1444.      #define MAKE_PAL(intense,normal) ((intense<<3)|normal)
  1445.                                           /* CRT states */
  1446.      #define MONOCHROME     0x7
  1447.      #define CGA            0x6
  1448.      #define EGA            0x10
  1449.                                           /* MOUSE definitions */
  1450.      #define MOWS_LEFT    0               /* Left button */
  1451.      #define MOWS_RIGHT   1               /* Right button */
  1452.      #define MOWS_MIDDLE  2               /* Middle button */
  1453.      
  1454.      #define MOWS_NO      0               /* No mouse (or driver) */
  1455.      #define MOWS_MICRO   2               /* Microssoft mouse installe */
  1456.      #define MOWS_MOUSE   3               /* Mouse Systems mouse installed */
  1457.      #endif
  1458.      
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.      
  1485.      14-Apr-88                                                          Page 21
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.      Hardwood Software Associates
  1495.      
  1496.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1497.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1498.      
  1499.      
  1500.                               HSA_TEXT Change History
  1501.                               _______________________
  1502.      
  1503.      Version         Date       Functions            Modifications             
  1504.      __________________________________________________________________________
  1505.      
  1506.       3.01        28-Feb-87       All                Released to the public
  1507.      
  1508.      
  1509.       3.02        23-May-87     w_*                  Window functions added
  1510.      
  1511.       3.03        25-Jun-87     hsa_test.doc         Rewritten documentation
  1512.                                 w_user_border        New
  1513.                                 w_str_a              New
  1514.                                 w_str_c_a            New
  1515.                   14-Jul-87     hsa_help.c           Added get_char
  1516.       3.04         9-Aug-87     w_menu1.c            Memory allocation error
  1517.                                                      on "last_page_save";
  1518.                                                      caused crash after
  1519.                                                      several multipage calls
  1520.       3.05        10-Sep-87                          Turbo C support
  1521.       3.06         7-Nov-87     w_menu1.c            Mouse support
  1522.                                 tx_mows.asm
  1523.                   12-Nov-87     tx_misc.asm          tx_rd_str returned pointer
  1524.                                                      incorrectly for large data
  1525.                                                      models
  1526.                                 tx_str.asm           tx_str corrupted DS in large
  1527.                                                      data model
  1528.                   18-Nov-87     w_close.c            Return NULL pointer
  1529.                                 hsa_w.h              ...
  1530.                                 w_str.c              Add w_nl
  1531.                                 w_open               Add w_open_ns
  1532.                                 w_center             New
  1533.       3.07        26-Dec-87     hsa_text.pcw         New documentation
  1534.                    3-Jan-88     tx_stat.asm          Use word OUTs in
  1535.                                                      ALIGN_CURSOR, remove extra
  1536.                                                      divide from GET_CURSOR_POS
  1537.                                 tx_clr.asm           New: tx_clr_a,tx_clr_eol_a,
  1538.                                                           tx_clr_rows_a
  1539.       4.00         5-Feb-88                          Move window routines to
  1540.                                                      hsa_win library
  1541.                                 TX_COMM.ASM          Move tx_state to
  1542.                                 TX_STATUS.ASM        tx_comm, add tx_adapt_1
  1543.                                 TX_SCROL.ASM         New:tx_scup_a,tx_dn_a
  1544.       4.01        12-Mar-88                          Minor documentation
  1545.                                                      changes
  1546.       4.02        12-Apr-88     TX_STAT.ASM          Check current mode on calls
  1547.                                                      to tx_bios & tx_direct
  1548.                   18-Apr-88     STAT_COM.ASM         Replace tx_comm with STAT_COM
  1549.                                 TX_MOWS              Move tx_mows_reset, tx_mows_type,
  1550.                                                      tx_mows_show, tx_mows_hide,
  1551.                                                      tx_mows_button, and
  1552.                                                      tx_mows_sensitivity to MOWS_COM
  1553.      
  1554.      14-Apr-88                                                          Page 22
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.      Hardwood Software Associates
  1564.      
  1565.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1566.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1567.      
  1568.                   21-Apr-88     HSA_TX.H             Add REVERSE_ATTR macro
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.      
  1621.      14-Apr-88                                                          Page 23
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.      Hardwood Software Associates
  1631.      
  1632.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1633.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1634.      
  1635.      
  1636.                      Alphabetical List of HSA_TEXT Functions (4.02)
  1637.                      ______________________________________________
  1638.      
  1639.      
  1640.      TX_ADAPT_1      Returns current adapter type
  1641.      TX_ATTR         Read the current screen attribute
  1642.      TX_ATTR_SET     Set the current screen attribute
  1643.      TX_BIOS         Use BIOS for all I/O
  1644.      TX_BLINK        Set to blinking white on black
  1645.      TX_BOLD         Set to intense white on black
  1646.      TX_B_B          Set to intense blinking white on black
  1647.      TX_CHR          Display a character at a specified location
  1648.      TX_CHR_A        Display character using specified location and attribute
  1649.      TX_CHR_A_C      Continue display of character with specified attribute
  1650.      TX_CHR_C        Continue display of character
  1651.      TX_CHR_O        Display a character only at specified location
  1652.      TX_CHR_O_C      Display a character only, continued from current location
  1653.      TX_CLR          Clear the entire screen
  1654.      TX_CLR_A        Clear the entire screen, specified attribute
  1655.      TX_CLR_EOL      Clear to the end of the line
  1656.      TX_CLR_EOL_A    Clear to the end of the line, specified attribute
  1657.      TX_CLR_ROWS     Clear a block of lines on the screen
  1658.      TX_CLR_ROWS_A   Clear a block of lines on the screen, specified attribute
  1659.      TX_COL          Read the current cursor column
  1660.      TX_CONF         Set crt screen memory address and 6845 address
  1661.      TX_CUR_HIDE     Hide the cursor
  1662.      TX_CUR_SET      Set the cursor start / stop scan lines
  1663.      TX_CUR_SHOW     Show the cursor
  1664.      TX_DIRECT       Access screen hardware directly
  1665.      TX_DOWN         Move the current location one row down
  1666.      TX_FILL         Fill a line with the specified number of a character
  1667.      TX_FILL_A       Fill a line with the specified number of a character
  1668.      TX_FILL_A_C     Fill a line with the specified number of a character
  1669.      TX_FILL_C       Fill a line with the specified number of a character
  1670.      TX_GET_STATUS   CRT status save
  1671.      TX_LEFT         Move the current location one column left
  1672.      TX_LOC          Set the current location
  1673.      TX_MOWS_RESET   Reset the mouse driver
  1674.      TX_MOWS_TYPE    Return type of mouse
  1675.      TX_MOWS_SHOW    Show mouse cursor
  1676.      TX_MOWS_HIDE    Hide mouse cursor
  1677.      TX_MOWS_MOVE    Move mouse cursor to specified position
  1678.      TX_MOWS_LOC     Return current location of mouse cursor
  1679.      TX_MOWS_BUTTON  Return status of buttons
  1680.      TX_MOWS_PRESS   Get count of button pressed
  1681.      TX_MOWS_RELEASE Get count of button releases
  1682.      TX_MOWS_WINDOW  Limit motion of mouse to within window
  1683.      TX_MOWS_HARD_CUR
  1684.                      Set hardware text cursor
  1685.      TX_MOWS_SOFT_CUR
  1686.                      Set software text cursor
  1687.  
  1688.      
  1689.      14-Apr-88                                                          Page 24
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.      Hardwood Software Associates
  1699.      
  1700.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1701.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1702.      
  1703.      TX_MOWS_SENSITIVITY
  1704.                      Set mouse sensitivity
  1705.      TX_NL           Move the current location to the start of the next line
  1706.      TX_NORM         Set to white on black
  1707.      TX_NO_COL       Read the number of columns in screen
  1708.      TX_NO_SNOW      Don't wait for retrace to prevent snow
  1709.      TX_PUT_STATUS   CRT status restore
  1710.      TX_RD_BLK       Read a block of screen data
  1711.      TX_RD_BLK_C     Read a block of screen data, at current location
  1712.      TX_RD_STR       Read string from screen
  1713.      TX_RD_STR_C     Read string from screen at current location
  1714.      TX_REVERSE      Set to black on white
  1715.      TX_RIGHT        Move the current location one column right
  1716.      TX_ROW          Read the current cursor row
  1717.      TX_SCDN         Scroll window down one line
  1718.      TX_SCDN_A       Scroll window down one line, specified attribute
  1719.      TX_SCUP         Scroll window up one line
  1720.      TX_SCUP_A       Scroll window up one line, specified attribute
  1721.      TX_SNOW         Wait for retrace to prevent snow
  1722.      TX_STATE        Returns current video state
  1723.      TX_STR          Display string at specified location
  1724.      TX_STR_A        Display string using specified location and attribute
  1725.      TX_STR_A_C      Display a string, continued from current location
  1726.      TX_STR_C        Display a string, continued from current location
  1727.      TX_UNDER        Set to underlined
  1728.      TX_UP           Move the current location one row up
  1729.      TX_WR_BLK       Write a block of screen data
  1730.      TX_WR_BLK_C     Write a block of screen data, at current location
  1731.      
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.      
  1756.      14-Apr-88                                                          Page 25
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.      Hardwood Software Associates
  1766.      
  1767.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1768.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1769.      
  1770.      
  1771.                                 Companion Libraries
  1772.                                 ___________________
  1773.      
  1774.      Hardwood Software Associates has developed two companion libraries to the
  1775.      HSA_TEXT library.
  1776.      
  1777.      The HSA_WIN is a library of 25 C functions that provide a powerful, yet
  1778.      simple, windowing capability.  The windows created and maintained by this
  1779.      library are of the "pop-up" variety.  A window is simply defined as an
  1780.      area of the screen that is first saved when the window is opened,
  1781.      manipulated by the various window functions, and finally restored to its
  1782.      original state when the window is closed.  Windows may coexist on the
  1783.      screen with text presented via other means.  Windows may optionally be
  1784.      bordered with any of several different border characters.  Window titles
  1785.      may optionally appear in the top or bottom border. Files may be displayed
  1786.      and scrolled through in a window.  Two different menu styles are implemented
  1787.      in windows.  The functions have been developed and tested for the Microsoft
  1788.      version 5.00, and Turbo C version 1.5 compilers.  HSA_WIN is written in C
  1789.      for speed and memory efficiency.
  1790.      
  1791.      
  1792.      HSA_GRAF is a library of 84 C functions that provide you with a direct,
  1793.      fast ability to create graphics on any one of the three major graphics
  1794.      boards available for the IBM P.C. (Color Graphics Adapter (CGA), Enhanced
  1795.      Graphics Adapter (EGA), and the Hercules Graphics Board).  A single setup
  1796.      call establishes the board in use.  All functions used to create the
  1797.      actual graphics are device independent. Functions are included to allow
  1798.      easy programming of a mouse.  The functions have been developed and
  1799.      tested for the Microsoft C version 5.10, and Turbo C version 1.5
  1800.      compilers.  This library has two divisions.  All basic graphics functions
  1801.      begin with the prefix "g_".  The other division, prefixed with "gs_"
  1802.      allows for creating scaled graphics. HSA_GRAF is written in assembler and
  1803.      C for speed and memory efficiency.
  1804.      
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.      
  1824.      14-Apr-88                                                          Page 26
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.      Hardwood Software Associates
  1834.      
  1835.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1836.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1837.      
  1838.      
  1839.                       Alphabetical List of HSA_WIN Functions (4.04)
  1840.                       _____________________________________________
  1841.      
  1842.      
  1843.      W_BOT_MSG       Display a message in the bottom border line
  1844.      W_CENTER        Display a string centered in a window
  1845.      W_CENTER_A      Display a string centered, specified attribute
  1846.      W_CLOSE         Close a window
  1847.      W_CLR           Clear a window
  1848.      W_CLR_EOL       Clear to end of line in window
  1849.      W_CUR_LOC       Display the screen cursor in the window
  1850.      W_FILE_NAME     Display a named file in a window
  1851.      W_FILE_PTR      Display a pointed to file in a window
  1852.      W_MENU1_FILL    Fill a style 1 menu with data
  1853.      W_MENU1_OPEN    Open a menu style 1 window
  1854.      W_MENU2         Highlighted keyword style menu
  1855.      W_MOVE          Move a window
  1856.      W_NL            Move cursor to start of next line
  1857.      W_OPEN          Open a window
  1858.      W_OPEN_NS       Open a window (no screen save)
  1859.      W_SCDN          Scroll data in window down
  1860.      W_SCUP          Scroll data in window up
  1861.      W_STR           Display a string in a window
  1862.      W_STR_C         Display a string in a window, at current location
  1863.      W_STR_A         Display a string in a window, with attribute
  1864.      W_STR_C_A       Display a string in a window, at current location
  1865.      W_STR_COL       Display a string in a window column
  1866.      W_TOP_MSG       Display a message in the top border line
  1867.      W_USER_BORDER   Set characters for user border
  1868.      
  1869.      
  1870.      
  1871.      
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.      
  1892.      14-Apr-88                                                          Page 27
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.      Hardwood Software Associates
  1902.      
  1903.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1904.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1905.      
  1906.      
  1907.                      Alphabetical List of HSA_GRAF Functions (1.11)
  1908.                      ______________________________________________
  1909.      
  1910.      
  1911.      COS_REC         Compute the reciprocal of cos
  1912.      DISP_GRAPH      Set the display to graphics mode
  1913.      DISP_GRAPH_CLR  Set the display to graphics mode and clear screen
  1914.      DISP_TEXT       Set the board to the text mode
  1915.      GS_ARC          Draw a circular arc (scaled)
  1916.      GS_CIRCLE       Draw a full circle (scaled)
  1917.      GS_FILL         Fill an area from seed (scaled)
  1918.      GS_LINE         Draw a line (scaled)
  1919.      GS_LINE_H       Draw a horizontal line (scaled)
  1920.      GS_LINE_C       Draw a line continued from current location (scaled)
  1921.      GS_LOC          Return current location (scaled)
  1922.      GS_MOVE         Set current position (scaled)
  1923.      GS_MOWS_MOVE    Move mouse cursor to specified position
  1924.      GS_MOWS_LOC     Return current location of mouse cursor
  1925.      GS_MOWS_PRESS   Get count of button pressed
  1926.      GS_MOWS_RELEASE Get count of button releases
  1927.      GS_MOWS_WINDOW  Limit motion of mouse to within window
  1928.      GS_POINT        Set a point (scaled)
  1929.      GS_RECT         Draw a rectangle (scaled)
  1930.      GS_RPOLY        Draw a regular polygon (scaled)
  1931.      GS_R_POINT      Return the color of the specified point
  1932.      GS_ROTATE       Rotate coordinates
  1933.      GS_SET_DEFAULT_FONT
  1934.                      Set default text font
  1935.      GS_STR_H        Display a horizontal message on screen
  1936.      GS_TEXT         Display text at specified location, height, angle
  1937.      GS_TEXT_FONT    Set character font
  1938.      GS_TEXT_SPACE   Set character spacing
  1939.      G_ADAPT_1       Return current adaptor type
  1940.      G_BACK_COLOR    Set background color
  1941.      G_BS_H          Back space one character position
  1942.      G_CGA_HR        Use IBM CGA in high resolution (640x200)
  1943.      G_CLR           Clear the current graphics page
  1944.      G_DASH          Set line type to dashed
  1945.      G_DOT           Set line type to dotted
  1946.      G_EGA_HR_CO     Use IBM EGA in high resolution
  1947.      G_EGA_LR_CO     Use IBM EGA in low resolution
  1948.      G_EGA_RESTORE   Restore saved EGA screen
  1949.      G_EGA_SAVE      Save EGA screen
  1950.      G_FILL          Fill an area from a seed
  1951.      G_FORE_COLOR    Set foreground color
  1952.      G_FREE          Free screen save buffer
  1953.      G_GETS          Get a string from console in graphics mode
  1954.      G_HERC          Use Hercules monochrome graphics board
  1955.      G_HERC_HALF     Set Hercules board to half graphics mode
  1956.      G_LINE          Draw a line
  1957.      G_LINE_H        Draw a horizontal line
  1958.      G_LINE_C        Draw a line continued from current location
  1959.      
  1960.      14-Apr-88                                                          Page 28
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.      Hardwood Software Associates
  1970.      
  1971.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1972.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  1973.      
  1974.      G_LOC           Return current location
  1975.      G_MALLOC        Allocate screen save buffer
  1976.      G_MAP_SIZE      Compute size of screen map
  1977.      G_MODE          Set mode for screen drawing
  1978.      G_MOVE          Set current position
  1979.      G_MOWS_RESET    Reset the mouse driver
  1980.      G_MOWS_TYPE     Return type of mouse
  1981.      G_MOWS_SHOW     Show mouse cursor
  1982.      G_MOWS_HIDE     Hide mouse cursor
  1983.      G_MOWS_MOVE     Move mouse cursor to specified position
  1984.      G_MOWS_LOC      Return current location of mouse cursor
  1985.      G_MOWS_BUTTON   Return status of buttons
  1986.      G_MOWS_PRESS    Get count of button pressed
  1987.      G_MOWS_RELEASE  Get count of button releases
  1988.      G_MOWS_WINDOW   Limit motion of mouse to within window
  1989.      G_MOWS_CUR      Set graphics mouse cursor
  1990.      G_MOWS_SENSITIVITY
  1991.                      Set mouse sensitivity
  1992.      G_ORIGIN        Set screen origin location
  1993.      G_OTHER         Use another variety of graphics adapter
  1994.      G_PAGE          Set graphics page for Hercules
  1995.      G_POINT         Set the specified pixel in the current
  1996.      G_RECT          Draw a rectangle
  1997.      G_REVERSE_COLOR Swap foreground and background
  1998.      G_R_ORIGIN      Return the current origin location
  1999.      G_R_POINT       Return the color of the specified point
  2000.      G_SCALE         Set screen scale factors
  2001.      G_SCR_RESTORE   Restore the graphics screen image from buffer
  2002.      G_SCR_SAVE      Save the current graphics screen image in buffer
  2003.      G_SCREEN        Return size of screen
  2004.      G_SET_LINE      Set line type mask
  2005.      G_SET_PALLET_REG Set palette register
  2006.      G_SOLID         Set line type to solid
  2007.      G_STATE         Returns current video state
  2008.      G_STR_H         Display a horizontal message on screen
  2009.      G_XDOTS         Get X scale factor
  2010.      G_YDOTS         Get Y scale factor
  2011.      SIN_REC         Compute the reciprocal of sin
  2012.      
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.      
  2027.      14-Apr-88                                                          Page 29
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.      Hardwood Software Associates
  2037.      
  2038.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  2039.              HSA_TEXT - Text Mode Screen Control Library (V4.02)  
  2040.      
  2041.      
  2042.                       Hardwood Software Associates Order Form
  2043.      
  2044.      Please send me the following HSA libraries, new registration:
  2045.      
  2046.            HSA_GRAF Graphics library                           $20.00
  2047.       ____                                                           
  2048.      
  2049.            HSA_TEXT Text Screen / Mouse Library                $20.00
  2050.       ____                                                           
  2051.      
  2052.            HSA_WIN  Windowing Library (requires HSA_TEXT)      $20.00
  2053.       ____                                                           
  2054.      
  2055.      
  2056.      Please send me the updates for following HSA libraries:
  2057.      
  2058.            HSA_GRAF Graphics library                           $10.00
  2059.       ____                                                           
  2060.      
  2061.            HSA_TEXT Text Screen / Mouse Library                $10.00
  2062.       ____                                                           
  2063.      
  2064.            HSA_WIN  Windowing Library (requires HSA_TEXT)      $10.00
  2065.       ____                                                           
  2066.      
  2067.      I am currently using the following version of each library:
  2068.      
  2069.            HSA_GRAF Graphics library
  2070.       ____                          
  2071.      
  2072.            HSA_TEXT Text Screen / Mouse Library
  2073.       ____                                     
  2074.      
  2075.            HSA_WIN  Windowing Library (requires HSA_TEXT)
  2076.       ____                                               
  2077.      
  2078.      
  2079.      Please send check or money order (USA currency only please) to:
  2080.      
  2081.              Hardwood Software Associates
  2082.              364 Benson Road
  2083.              Northbridge, MA 01534
  2084.      
  2085.      
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.      
  2103.      14-Apr-88                                                          Page 30
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.