(*$M-*)
DEFINITION MODULE Console;

FROM SYSTEM IMPORT
 ADDRESS;
FROM Exec IMPORT
 nonstd;
FROM InputEvent IMPORT
 InputEventPtr;

CONST
 consoleName="console.device";
 askKeyMap=nonstd+0;
 setKeyMap=nonstd+1;
 askDefaultKeyMap=nonstd+2;
 setDefaultKeyMap=nonstd+3;
 primary=0;
 bold=1;
 italic=3;
 underscore=4;
 negative=7;
 black=30;
 red=31;
 green=32;
 yellow=33;
 blue=34;
 magenta=35;
 cyan=36;
 white=37;
 default=39;
 blackBg=40;
 redBg=41;
 greenBg=42;
 yellowBg=43;
 blueBg=44;
 magentaBg=45;
 cyanBg=46;
 whiteBg=47;
 defaultBg=49;
 clr0=30;
 clr1=31;
 clr2=32;
 clr3=33;
 clr4=34;
 clr5=35;
 clr6=36;
 clr7=37;
 clr0Bg=40;
 clr1Bg=41;
 clr2Bg=42;
 clr3Bg=43;
 clr4Bg=44;
 clr5Bg=45;
 clr6Bg=46;
 clr7Bg=47;
 dsrCpr=6;
 ctcHSetTab=0;
 ctcHClrTab=2;
 ctcHClrTabsAll=5;
 tbcHClrTab=0;
 tbcHClrTabsAll=3;
 mLnm=20;
 mAsm=">1";
 mAwm="?7";

PROCEDURE CDInputHandler(device0{14}:ADDRESS;
                         events{8}:InputEventPtr;
                         device1{9}:ADDRESS); CODE -42;
PROCEDURE RawKeyConvert(
           device0{14}:ADDRESS;
           events{8}:InputEventPtr;
           buffer{9}:ADDRESS;
           length{1}:LONGINT;
           keyMap{10}:ADDRESS):LONGINT; CODE -48;

END Console.
