DEFINITION MODULE TermIO;

(* (C) Copyright 1987 Fitted Software Tools. All rights reserved. *)

(*
    The procedures in this module are the standard i/o routines used
    by the module TermBase.

    The procedures in this module invoke the DOS functions 2, 8 and B
    to perform their functions. For the screen clear (Write(ASCII.FF))
    and Goto functions to work, ANSI.SYS must be installed.
*)


PROCEDURE Read( VAR ch :CHAR );
(*
    wait until a character is available for reading from the keyboard
    and read it. The character is not echoed on the screen.

    ASCII.CR is converted to ASCII.EOL
*)

PROCEDURE Write( ch :CHAR );
(*
    write ch to the screen.
    ASCII.FF will cause the screen to be cleared (ANSI.SYS must be installed).
    ASCII.EOL will cause the sequence CR LF to be written
    ASCII.DEL will cause a destructive backspace.
*)

PROCEDURE KeyPressed() :BOOLEAN;
(*
    return TRUE if a character is available for reading from
    the keyboard
*)

PROCEDURE Goto( line, pos :CARDINAL );
(*
    position the cursor on line/pos.
*)

END TermIO.