DEFINITION MODULE Termbase ;
Description: provides GNU Modula-2 with a PIM 234 compatible Termbase
module. Definition module complies with Logitech 3.0.
Initially the read routines from Keyboard and the
write routine from Display is assigned to the Read,
KeyPressed and Write procedures.
EXPORT QUALIFIED ReadProcedure, StatusProcedure, WriteProcedure,
AssignRead, AssignWrite, UnAssignRead, UnAssignWrite,
Read, KeyPressed, Write ;
ReadProcedure = PROCEDURE (VAR CHAR) ;
WriteProcedure = PROCEDURE (CHAR) ;
StatusProcedure = PROCEDURE () : BOOLEAN ;
AssignRead - assigns a read procedure and status procedure for terminal
input. Done is set to TRUE if successful. Subsequent
Read and KeyPressed calls are mapped onto the user supplied
procedures. The previous read and status procedures are
uncovered and reused after UnAssignRead is called.
PROCEDURE AssignRead (rp: ReadProcedure; sp: StatusProcedure;
VAR Done: BOOLEAN) ;
UnAssignRead - undo the last call to AssignRead and set Done to TRUE
PROCEDURE UnAssignRead (VAR Done: BOOLEAN) ;
Read - reads a single character using the currently active read
PROCEDURE Read (VAR ch: CHAR) ;
KeyPressed - returns TRUE if a character is available to be read.
PROCEDURE KeyPressed () : BOOLEAN ;
AssignWrite - assigns a write procedure for terminal output.
Done is set to TRUE if successful. Subsequent
Write calls are mapped onto the user supplied
procedure. The previous write procedure is
uncovered and reused after UnAssignWrite is called.
PROCEDURE AssignWrite (wp: WriteProcedure; VAR Done: BOOLEAN) ;
UnAssignWrite - undo the last call to AssignWrite and set Done to TRUE
PROCEDURE UnAssignWrite (VAR Done: BOOLEAN) ;
Write - writes a single character using the currently active write
PROCEDURE Write (VAR ch: CHAR) ;