home *** CD-ROM | disk | FTP | other *** search
- ANSI.LIB
-
- Copyright (c) 1992
-
- Asgard Software
-
-
- ^ ▄ ▄▄▄▄ ▄▄▄ ▄ ▄▄▄▄ ▄▄▄▄
- ▄█▄ █▀█ █▀▀▀█ █▀▀▀█ █▀█ █▀▀▀█░ █▀▀▀█
- ^ ^ █▄█ █░ █░ █░ █░ █░ █░ █░ █░ █░ █░ █░
- ▄▀▄ ^ ▄▀▄ █▄█ █▄▄▄█░ █████░ █░ █▄▄▄█░ █████ █░ █░
- ███ █▀█ █▀█ ^ █▄█ █░ █░ █░ █░ ▀█░ █░ █░ █░ █░ █░ █░
- ▐▀███▀███▀██▀██▀██▀▀██▀██▀██▀▌ █░ █░ █▄▄▄█░ █▄▄▄█░ █░ █░ █░ █░ █▄▄▄█░
- ▐▄███▄███▄██▄██▄██··██▄██▄██▄▌ ▀ ▀ ▀▀▀▀▀ ▀▀▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀▀
- ▒▒▓▓▓████████████████████████▓▓▒▒▒░░
- ░▒▒▒▒▓▓▓▓████████████████████▓▓▓▓▓▒▒▒▒▒░ Software B. B. S.
- ░▒▒▒▒▓▓▓▓▓▓███████████████▓████▓▓▓▒▒▒▒▒░░░
- ░░░▒▒▒▒▒▒▓▓▓▓▓███████████▓▓▓▓████▒▒▒▒░░░ 1:271/15@fidonet
- ░░░░░▒▒▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒████ 21:100/0@taconet
- ░░░░░░░░▒▒▒▒░░░░░░░░ ████ (804) 485-8803
- ████ 300/1200/2400 baud
- ████
- Jim Sloan ████
- 911 Bowden Ave. ████
- Chesapeake, VA 23323 ████
- (804) 485-7309 ████ O (Odin Awaits)
- ████ ▀█▀
- ████ ▐ ▌
- ███████████████████████████████████████████████████████████████████████████████
- ███████████████████████████████████████████████████████████████████████████████
-
-
- Table Of Contents
-
- I. Legal Stuff
-
- II. Use of ANSI.LIB
- A. Functions
- B. External variables
-
- III. Registration and Support
-
-
-
-
-
-
-
-
-
-
-
- I. Legal Stuff
-
- Information in this document is subject to change without
- notice and does not represent a commitment on the part of
- Asgard Software. The software described in this document
- may be used and distributed freely. No renumeration may
- be charged without first contacting the author at the
- above address. The software described in this document
- and this document are Copyright Asgard Software, 1992.
- All rights reserved. Any use of this library requires a
- copyright statement specifying portions of the code are
- copyright Asgard Software, 1992. All rights reserved.
-
- II. Use of ANSI.LIB
-
- ANSI.LIB currently will handle the most frequently used
- ANSI X3.64 terminal escape sequences used on BBS's.
- These include:
- Cursor Backward Tab ESC [ Pn Z
- Cursor Horizontal Tab ESC [ Pn I
- Cursor Backward ESC [ Pn D
- Cursor Down ESC [ Pn B
- Cursor Forward ESC [ Pn C
- Cursor Position ESC [ Pn ; Pn H
- Cursor Up ESC [ Pn A
- Delete Line ESC [ Pn M
- Device Status Report (Detect ANSI) ESC [ 6 n
- Erase in Display (Clear Screen) ESC [ Pn J
- Erase in Line ESC [ Pn K
- Horizontal & Vertical Position ESC [ Pn ; Pn f
- Insert Line ESC [ Pn L
- Scroll Down ESC [ Pn T
- Scroll Up ESC [ Pn S
- Set Graphics Rendition ESC [ Ps m
-
- All functions necessary to use ANSI.LIB are prototyped in
- ANSI.H and explained here.
-
-
- A. Functions
-
- int ansi_cmd(int ch)
-
- This function is the heart of ANSI.LIB. All
- ANSI sequences are handled through this
- function.
-
- ansi_cmd will return true if it requires more
- characters to finish it's current sequence
- after processing the character ch.
-
- void cls(int top_row, int left_column, int bottom_row,
- int right_column, int attribute);
-
- This function will clear a portion of the
- screen set forth in it's parameters to the
- attribute specified. All screen parameters are
- zero based, ie. uppermost row on screen is 0
- and leftmost column is 0.
-
- void pos_curs(int row, int column)
-
- This function will position the cursor to the
- specified coordinates. Row and column are zero
- based.
-
- void scroll_up(int top_row, int left_column,
- int bottom_row, int right_column,
- int number_of_rows, int attribute)
-
- This function will scroll a portion of the
- screen up as specified in the parameters.
- Screen parameters are zero based as above in
- cls.
-
- void scroll_dn(int top_row, int left_column,
- int bottom_row, int right_column,
- int number_of_rows, int attribute)
-
- This function will scroll a portion of the
- screen down as specified in the parameters.
- Screen parameters are zero based as above in
- cls.
-
- void (*send_out)(char *)
-
- This is a pointer to a function that will
- process any outgoing string that is required in
- response to an ANSI sequence, ie. Device Status
- Report. This should point to a function that
- will handle this array.
-
- void write_char(int ch, int attr)
-
- This function will write to the screen the
- character specified at the attribute specified.
- ANSI attribute as set by Set Graphics Rendition
- sequence would be attr.color and will be
- discussed in the following section on external
- variables.
-
- B. External Variables
-
- union ATTR attr
-
- This is for declaration only. Used internally
- by ANSI.LIB.
-
- struct attr_bits
-
- This is for decleration only. Used internally
- by ANSI.LIB
-
- attr.color
-
- This is the attribute color set by the Set
- Graphics Rendition sequence. This should be
- used when writing out characters to video using
- write_char.
-
- bottom_row
-
- This is the bottom most row on your video
- screen (zero based). Default is 24.
-
- fast_video
-
- If this is set to 0, BIOS screen calls will be
- used to write to the video. If set to 1, then
- video memory will be written to directly.
- Default is 0.
-
- left_margin
-
- This is the left most column of the video
- screen (zero based). Default is 0.
-
- right_margin
-
- This is the right most column of the video
- screen (zero based). Defualt is 79.
-
- top_row
-
- This is the upper most row of the video screen
- (zero based). Default is 0.
-
-
-
- III. Registration and Support
-
- The library supplied is compiled in medium model for
- Microsoft C 5.x and above.
-
-
- Registration is only $25US and you will recieve full
- source for the library and free updates. Please
- send registration to:
-
- Asgard Software
- c/o Jim Sloan
- 911 Bowden Ave.
- Chesapeake, VA 23323
-
- Voice support is available on your dime at (804)485-7309.
- Support is also available via
-
- Asgard Software BBS
- (804)485-8803
- 1:271/15@fidonet
- 21:100/3@taconet
-
- and through these other fine BBS's
-
- Paula Abdul BBS
- (804)484-0348
- 1:271/55@fidonet
-
- Cyberpunk Imagery
- (804)498-7429
- 1:271/25@fidonet
- 21:100/0@taconet
-