Category : Modula II Source Code
Archive   : STDLIB.ZIP
Filename : TERMIO.DEF
TYPE
(* Display types supported *)
DisplayTypes = (ColourDisplay, Monochrome);
(* Available colours if colour display *)
Colours = (Black, Blue, Green, Cyan, Red, Magenta,Brown,
LightGray, DarkGray, LightBlue, LightGreen,
LightCyan, LightRed, LightMagenta, Yellow, White);
(* Screen char attributes supported (mono display) *)
MonoAttributes = (Bold, Underline, Reverse, Blink);
AttrSet = SET OF MonoAttributes;
(* CRT operations allowed in the current scroll region (equal the full
screen at program begin) *)
CrtCommands = (EraseEOS, EraseEOL, ClearCurrLine,
ClearScreen, UpCursor, DownCursor, LeftCursor,
RightCursor, HomeCursor, EnableCursor,
DisableCursor, InsertLine, DeleteLine);
VAR curx, cury:CARDINAL; (* current cursor x & y position *)
origx, origy, scrwidth, scrheight: CARDINAL; (* curr. scroll region *)
DisplayType:DisplayTypes; (* current host display type *)
CurrentFgnd,CurrentBgnd:Colours; (* colours set if colour display *)
CurrentAttribute:AttrSet; (* attrs set if mono display *)
AttrByte:CHAR; (* either mono or colour attribute, may be used
by other modules. *)
(***************************************************************)
(* set mono char attribute *)
PROCEDURE SetAttribute(chattr:AttrSet);
(* set colour char attribute *)
PROCEDURE SetColour(bgnd,fgnd:Colours);
(* position cursor relative to the current scroll region - Zero based *)
PROCEDURE GotoXY(x,y:CARDINAL);
(* Do a screen operation within the current scroll region *)
PROCEDURE Crt(action:CrtCommands);
(* Write a single char to the display. The only character processing done is
with Backspace (ascii 8) and Bel (ascii 7). Write(CR) does not produce the
same as WriteLn. *)
PROCEDURE Write(c:CHAR);
(* Write a string to the display, clipped at the right of the scroll region.
Characters processed as in Write *)
PROCEDURE WriteString(s:ARRAY OF CHAR);
(* Move the cursor to the beginning of the next line within the current region,
scrolling if necessary. *)
PROCEDURE WriteLn;
(* As Keyboard.Read, copied here for convenience. *)
PROCEDURE Read(VAR ch:CHAR);
(* Read a string from the keyboard. Editing is allowed with backspace, del or
DeleteKey, cursor keys, home, end etc *)
PROCEDURE ReadString(VAR s:ARRAY OF CHAR);
(* Change the current scroll region *)
PROCEDURE SetScrollRegion(newx,newy,newwidth,newheight:CARDINAL);
END TermIO.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/