2.2 Ttyinit

Ttyinit initializes these functions for terminal/monitor input and output. Ttyinit uses the environment string TERM (see MS-DOS SET environment command) to determine the terminal type. TERM must be set to a valid terminal/screen type, which can be done by the following command:

set TERM=terminaltype

Ttyinit uses the TERM name to read the appropriate terminal definition file in the cbasedir\escape directory. If TERM is not set, ttyinit uses an internal terminal definition for PC's that calls ROM BIOS routines. If TERM is set but the terminal named by TERM is not defined in the \cbase\lib\cbase\escape directory, then ttyinit returns 0 (zero). Any program using these routines must first use ttyinit to determine if there is a valid terminal type defined. When ttyinit finds a valid terminal definition, it loads the definition into memory, saves it for later calls to the other functions, and returns a positive value. If TERM is not set, ttyinit arranges that all output that would normally go to standard output is instead directly displayed on the screen by the ROM BIOS routines.