Category : Files from Magazines
Archive   : PCTJ1086.ZIP
Filename : PAUSES.MOD

 
Output of file : PAUSES.MOD contained in archive : PCTJ1086.ZIP

IMPLEMENTATION MODULE Pauses;
(*
Title : Pauses.MOD -- SplitScreen Pauses
LastEdit: July 22, 1986
Author : John T. Cockerham, M.D.
System : LOGITECH MODULA-2/86
*)
IMPORT Terminal;
FROM LowEGA IMPORT
Write, WriteString, SetCursorPoint, SetCursor, GetCursorPoint,
RollSplitScreenUp, WriteBiosString, RollSplitScreenDown,
SetBiosCursorPoint, SetModeBios, ActivePage;
FROM PointLib IMPORT Point, MakePoint, BumpPointY;

CONST Page0 = 0; Blank = 020H;

(* This procedure raises a split screen and prints a message there
awaiting the user to continue. Can only be used text mode. *)
PROCEDURE Pause(msg : ARRAY OF CHAR);
VAR ch : CHAR; p : Point;
SavedCursor : Point;

PROCEDURE Blank2Lines(Page : CARDINAL);
VAR i : CARDINAL;
BEGIN
FOR i := 0 TO 159 DO Write(Page, CHR(Blank), 2); END;
END Blank2Lines;

BEGIN
MakePoint(p, 0, 0); GetCursorPoint(SavedCursor, Page0);
SetCursorPoint(Page0, p); Blank2Lines(Page0);
SetCursorPoint(Page0, p); Write(Page0, CHR(Blank), 2);
WriteString(Page0, msg, 2);
WriteString(Page0, ' [Strike ENTER to go on] ', 2);
SetCursor(ActivePage); SetCursorPoint(Page0, SavedCursor);
RollSplitScreenUp(16); Terminal.Read(ch);
RollSplitScreenDown;
END Pause;

PROCEDURE GraphicsPause(Page : CARDINAL; msg : ARRAY OF CHAR);
VAR p : Point; ch : CHAR;
BEGIN
MakePoint(p, 8, 8); SetBiosCursorPoint(Page, p);
WriteBiosString(msg, 2);
WriteBiosString(' [Strike ENTER to go on] ', 2);
Terminal.Read(ch);
END GraphicsPause;
END Pauses.