The BASIC ANSI Library v1.20 Manual
-----------------------------------

Designed and programmed by Chris Walker.


This document and all files included within the Bansi package are
  (C) Copyright 1994-1995 by Chris Walker,  All Rights Reserved


























































-------------------------------------------------------------------------------
Bansi Library v1.20 short manual      (c) Copyright 1994-1995 by Chris Walker
                                                ALL RIGHTS RESERVED
-------------------------------------------------------------------------------
Explanation:  This manual briefly summarizes the usage of each of the Bansi
        commands.
-------------------------------------------------------------------------------
        Starting up the Bansi functions:

        To load the Bansi library with QuickBasic, the command line is:

        QB /lBansi <program to load>

        Other languages are similar.  For example, VB/DOS requires:

        VBDOS /lBansi <program to load>

        Inside the interpreter, you must include:

        '$include:'Bansi.bi'

        into your file.  After that, you may go on into installation.

        When you want to run a Bansi function, you must first (only once in
a program) execute the BAInit command.

        As of v1.10 of the Bansi library, the BAInit command is simply:

BAInit

        (No parameters)

        Bansi Standard Commands - Work With The MS-DOS ANSI.SYS Driver.
                                  (TESTED WITH) 

        ---------------------------
        The Bansi Standard Commands
        ---------------------------

BAInit - Initialization sub, used to start routines.

    Use: BAInit

    * Not Required in registered edition.

BABack$ Function - Returns the < Back string (0-79):

    Use: ...BABack$(x%)

        x is an integer between 0 and 79 identifying number of left moves.

BAClearScreen$ Function - Returns the Screen Clearing String.

    Use: ...BAClearScreen$

BAClearScreen2$ Function - Returns the (Partial) Screen Clearing String.

    Use: ...BAClearScreen$(x%)

        Where x equals one of the following:

        0 - clear from cursor to end of screen.
        1 - clear from start of screen to cursor.
        2 - clear entire screen.

BAColor$ Function - Returns the Color String (0-31,0-7)

    Use: ...BAColor$(f%,b%)

        Where f is an integer 0 to 31 of forecolor.
        Where b is an integer 0 to 7 of backcolor.

BAColorString$ Function - Returns a String in Color!

    Use: ...BAColorString$(St$,Op$)

        Where St$ is the string to use.
        Where Op$ is an option (one of the following):

            "" <- Changing foreground on changing background.
            "BlackBack" <- Changing foreground on black background.
            "BlackBack_Flashing" <- Flashing foreground on black background.

BADetect$ Function - Returns the ANSI detection string

    Use: ...BADetect$

BADown$ Function - Returns the v Down string (0-24).

    Use: ...BADown$(y%)

        y is an integer between 0 and 24 identifying number of down moves.

BAEraseLine$ Function - Returns the Line Clearing String.

    Use: ...BAEraseLine$

BAForward$ Function - Returns the > Forward string (0-79).

    Use: ...BAForward$(x%)

        x is an integer between 0 and 79 identifying number of right moves.

BAMove$ Function - Returns the (Absolute Location) string (0-25,0-80).

    Use: ...BAMove$(y%,x%)

        x% is an integer between 0 and 79 identifying column number.
        y% is an integer between 0 and 25 identifying row number.

BAResPos$ Function - Returns the Restore Cursor Position string.

    Use: ...BAResPos$

BASavPos$ Function - Returns the Save Cursor Position string.

    Use: ...BASavPos$

BASetMode$ Function - Returns the Set Video Mode string.

    Use: ...BASetMode$(x%)

        Where x is an integer describing the video mode as follows:

        0 = 40 x 25 black and white - composite monitors.
        1 = 40 x 25 color.
        2 = 80 x 25 black and white - composite monitors.
        3 = 80 x 25 color.
        4 = 320 x 200 color.
        5 = 320 x 200 black and white - composite monitors.
        6 = 640 x 200 black and white.
        7 = Wrap at end of line.

BAUp$ Function - Returns the ^ UP string (0-24).

    Use: ...BAUp$(y%)

        y is an integer between 0 and 24 identifying number of up moves.

BAOpenCons% Function - Opens the console for use by console routines.

    Use: ...BAOpenCons%(x%)

        Where x is an integer indentifying which file handle to use.
        Note that the BAOpenCons% function returns the handle used.

BACloseCons Command - Closes the console opened by BAOpenCons% function.

    Use: BACloseCons

    *Note:  For safety only.  QB/VBDOS should automatically do it, but...

BAControlCons$ Function - Internal console routine.

    Use: ...BAControlCons$(Request$)

        Where Request is a string as follows:

        "OPENED?"  <- returns "YES" or "NO" (console opened or not)

        "CLOSE"    <- resets internal handle number to zero.  Thinks closed.

        "H:<val>"  <- sets internal handle number to <val>.

        "HANDLE"   <- returns internal handle number.

BAWrite Command - Writes a string to the console.

    Use: BAWrite St$

BAWriteLn Command - Writes a string and a new line to the console.

    Use: BAWriteLn St$

BAColorToggle Command - Toggles returns form Bansi color routines ON/OFF...

    Use: BAColorToggle

BAToggle Command - Toggles returns from Bansi routines ON/OFF...

    Use: BAToggle

BABackString$ Function - Returns a string that will draw backwards.

    Use: ...BABackString$(St$)

        Where St$ is the string to compute.

BAInput$ Function - Draws a field and returns input.

    Use: ...BAInput$(Length%,f%,b%,Reserved%)

        Where Length% is integer of length of field.

        Where f% is foreground color to use.

        Where b% is background color to use.

        Where Reserved is integer as follows:

        1 or 2 <- return `*' in password-type input.

        *Note:  I can't remember exactly how this works, but it does...

BAInt$ Function - Internal initialization routine.

    Use: ...BAInt$(Request$)

        Where Request$ is a string as follows:

        "INIT" returns "OKAY" or "NOPE" (initialized or not)

        "CTOGD" returns "OKAY" or "NOPE" (color ON or OFF)

        "TOGD" returns "OKAY" or "NOPE" (returns toggled ON or OFF)

        "CTOGGLE" toggles color ON/OFF

        "TOGGLE" toggles returns ON/OFF

        "INITOFF" deinitializes Bansi

        "VERSION" returns version of Bansi

BAValTrim$ Function - Trims off leading space of integer and returns string.

    Use: ...BAValTrim$(Val%)

        Where Val% is an integer.

--------------
        I realize that this manual is somewhat fuzzy.  In this new version of
the Bansi library, I have added a number of functions. 
        If anyone has more ANSI codes that they know of, please let me know.
I might even be able to send you a free update version!
--------------
End of manual!

