⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hsa_text.doc

📁 HSA Text Screen Lib for Turbo C, MSC
💻 DOC
📖 第 1 页 / 共 5 页
字号:


     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
     
     
     
     
     
     
     
     
     
     
     
     
     
                                  H S A _ T E X T
                                  H S A _ T E X T
                         Text Screen Control Library for C
     
                                         by
     
                            Hardwood Software Associates

































     
     10-Sep-87                                                          Page 1








     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
     
                            Hardwood Software Associates
                            ____________________________
     
     HSA_TEXT is copyrighted by Hardwood Software Associates.  You are granted
     a limited license to use HSA_TEXT. You may also copy and distribute it,
     provided that the following conditions are met:
     
          1. No fee may be charged for such copying and distribution.
          2. HSA_TEXT may ONLY be distributed in its original, unmodified state.
     
     Any voluntary contributions for the use of this program will be
     appreciated, and should be sent to:
     
                     Hardwood Software Associates
                     364 Benson Road
                     Northbridge, Ma 01534
     
     A contribution of at least $15 will require that you accept a floppy disk
     containing the source code for HSA_TEXT.  Remember only you can support
     shareware.  Your support encourages growth.  If you use it you should
     support it.
     
     The author, Richard "Spike" Evans may be reached on CompuServe at
     [75026,3604].
     
     All comments and suggestions are welcome.  We love to get mail.
     
     Please be advised that all the usual non-warranty warranties apply to
     HSA_TEXT.  Hardwood Software Associates does not guarantee that HSA_TEXT
     will do any thing useful  at all;  although it has for us.  Nor does
     Hardwood Software Associates warrant that HSA_TEXT will not do anything
     harmful; although it has not for us.
     
     
                                     Trademarks
                                     __________
     
     
                IBM P.C. is a trademark of International Business Machines
                Lattice is a trademark of Lattice, Inc.
                Microsoft C is a trademark of Microsoft Corporation
                Turbo C is a trademark of Borland Interantional











     
     10-Sep-87                                                          Page 2








     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
     
                                       INTRODUCTION
                                       ____________
     
     
     HSA_TEXT is a library of C functions that provide direct, fast control
     over the IBM PC screen in text mode.  The functions have been developed
     and  tested  for the  Microsoft  versions  3.00  and 4.00, Turbo C
     version 1.00, and Lattice version 3.10 C compilers.  This library has two
     divisions.  All basic screen control functions begin with the prefix
     "tx_".  The window control functions all begin with "w_". The library is
     contained in several modules, grouped by function.  These modules are
     designed to prevent the inclusion of unused functions in your program.
     These modules are:
     
             TX_STAT  - Status functions
             TX_ATTR  - Attribute Setting
             TX_STR   - String display functions
             TX_FILL  - Character fill functions
             TX_BLK   - Functions that operate on blocks of screen
             TX_MISC  - Miscellaneous functions
             TX_CUR   - Functions that control the cursor
             W_OPEN   - Open a window
             W_BORDER - Generate window borders
             W_CLOSE  - Close a window
             W_STR    - Display strings in windows
             W_MOVE   - Move windows
             W_MENU1  - Window menu style 1
     
     This distribution contains two object library files:
     
             S_MS_HSA.LIB - Small memory model library (Microsoft)
             S_LC_HSA.LIB - Small memory model library (Lattice)
             S_TC_HSA.LIB - Small memory model library (Turbo)
     
     Other memory models may be easily created as required.

















     
     10-Sep-87                                                          Page 3








     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
     
                              GENERAL - "TX" FUNCTIONS
                              ________________________
     
     The "tx" functions are a set of low level functions that give you fast
     efficient control of the text screen.  Functions are provided to display
     strings and characters on the screen.  The screen attributes of the
     displayed information is easily controlled.  Sections of the screen may
     be saved and restored to program memory.  The size and location of the
     cursor is easily manipulated.
     
     The screen is addressed by row and column.  The row and column addresses
     passed to all functions are  0  based.  The upper left corner of the
     screen is row 0, column 0.  The functions keep track of the next
     sequential screen location  (row and  column),  this location  is
     referred  to  as  the current location. If the row address passed to any
     function is equal to -1 the current location is used.
     
     The functions that set the screen attribute, without displaying any
     characters, set what is referred to as the current attribute.
     
     The header file hsa_tx.h defines all functions included in the HSA_TEXT
     function library.  Also included in hsa_tx.h are several useful
     constants, macros, and structures.
     
     Several of the functions have an entry in the documentation listing an
     alias.  This was done because these functions are particularly difficult
     to spell.
     
     Tx_demo.c contains the source code for the tx_demo.exe demonstration
     program; it provides an example of how to use most of the tx functions.
     Refer to MSC_TX.BAT and LC_TX.BAT for information on how to compile
     and link for the Microsoft and Lattice compilers.




















     
     10-Sep-87                                                          Page 4








     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
     
                             TX_STAT - Status Functions
                             __________________________
     
     All of the functions in this module read or set certain status
     information pertaining to the entire set of tx functions.  For maximum
     speed the direct mode should be used for screen access whenever possible.
     
     NAME:                TX_BIOS - Use BIOS for all I/O
                          TX_BIOS                       
     SYNOPSIS:            tx_bios ();
     DESCRIPTION:         Use BIOS calls for all operations to screen.
     
     NAME:                TX_DIRECT - Access screen hardware directly
                          TX_DIRECT                                  
     SYNOPSIS:            tx_direct ();
     DESCRIPTION:         Access screen directly.  This is much faster but not
                          as portable as the BIOS mode.
     NOTE:                If the current state is not 7 (monochrome) tx_snow is
                          called to prevent screen interference.
     
     NAME:                TX_SNOW - Wait for retrace to prevent snow
                          TX_SNOW                                   
     SYNOPSIS:            tx_snow ();
     DESCRIPTION:         Wait for retrace when accessing screen memory.
     NOTE:                Only applicable for direct mode on CGA adapters.
     
     NAME:                TX_NO_SNOW - Don't wait for retrace to prevent snow
                          TX_NO_SNOW                                         
     SYNOPSIS:            tx_no_snow ();
     DESCRIPTION:         Don't wait for retrace when accessing screen memory.
     NOTE:                This function should be called for color adapters
                          (e.g. EGA) that don't create snow when the screen
                          memory is accessed directly.
     
     NAME:                TX_CONF - Set crt screen memory address and
                          TX_CONF                                    
                                    6845 index register address
     SYNOPSIS:            tx_conf (tx_seg,tx_6845_i);
                             unsigned tx_seg;    Segment address of crt
                                                 memory for direct mode
                             unsigned tx_6845_i; 6845 index register address
     DESCRIPTION:         If the arguments are not equal to 0 or -1 then
                          the segment for the screen memory and/or the 6845
                          index register address are updated.
     CAUTION:             This must be called after every call to tx_direct as
                          tx_direct sets the segment and 6845 address to the
                          default for the current monitor type.
     
     NAME:                TX_STATE - Returns current video state
                          TX_STATE                              
     SYNOPSIS:            tx_state ();
     DESCRIPTION:         Calls BIOS INT 10 with function code 15 to get the
                          current video state.
     RETURNS:             Text modes:
                             0 = 40x25 Black and white
                             1 = 40x25 Color
                             2 = 80x25 Black and white
                             3 = 80x25 Color
     
     10-Sep-87                                                          Page 5








     Hardwood Software Associates
     
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
             HSA_TEXT - Text Mode Screen Control Library (V3.05)  
     
                          Graphics modes:
                             4 = 320x200 4 Color
                             5 = 320x200 Black and white
                             6 = 640x200 Black and white
                             7 = Monochrome

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -