home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / m2 / CycloneModules.lha / modules / txt / Console.def < prev    next >
Text File  |  1996-07-28  |  3KB  |  136 lines

  1. (*
  2. **    Cyclone Modula-2 Interface module:
  3. **    $VER: console.h 36.11 (7.11.90)
  4. **    Includes Release 40.15
  5. **
  6. **    Console device command definitions
  7. **
  8. **    (C) Copyright 1986-1993 Commodore-Amiga, Inc.
  9. **        All Rights Reserved
  10. **
  11. **      Interface module by Marcel Timmermans
  12. **      (C) Copyright 1995-1996 Marcel Timmermans
  13. **      All Rights Reserved
  14. *)
  15.  
  16. DEFINITION MODULE Console; 
  17.  
  18. (*$ Implementation- *)
  19.  
  20.  
  21. FROM SYSTEM     IMPORT ADDRESS;
  22. FROM KeyMapD    IMPORT KeyMapPtr;
  23. FROM InputEvent IMPORT InputEventPtr;
  24. FROM ExecD      IMPORT nonstd;
  25. FROM UtilityD   IMPORT HookPtr;
  26.  
  27. IMPORT Reg;
  28.  
  29. CONST
  30.  consoleName="console.device";
  31.  
  32. (****** Console commands ******)
  33.   askKeyMap         = nonstd+0;
  34.   setKeyMap         = nonstd+1;
  35.   askDefaultKeyMap  = nonstd+2;
  36.   setDefaultKeyMap  = nonstd+3;
  37.  
  38. (****** SGR parameters ******)
  39.  
  40.   primary     = 0;
  41.   bold        = 1;
  42.   italic      = 3;
  43.   underscore  = 4;
  44.   negative    = 7;
  45.  
  46.   normal        = 22;      (* default foreground color, not bold *)
  47.   notItalic     = 23;
  48.   notUnderscore = 24;
  49.   positive      = 27;
  50.  
  51. (* these names refer to the ANSI standard, not the implementation *)
  52.   blank       = 30;
  53.   red         = 31;
  54.   green       = 32;
  55.   yellow      = 33;
  56.   blue        = 34;
  57.   magenta     = 35;
  58.   cyan        = 36;
  59.   white       = 37;
  60.   default     = 39;
  61.  
  62.   blackBg     = 40;
  63.   redBg       = 41;
  64.   greenBg     = 42;
  65.   yellowBg    = 43;
  66.   blueBg      = 44;
  67.   magentaBg   = 45;
  68.   cyanBg      = 46;
  69.   whiteBg     = 47;
  70.   defaultBg   = 49;
  71.  
  72. (* these names refer to the implementation, they are the preferred *)
  73. (* names for use with the Amiga console device. *)
  74.   clr0        = 30;
  75.   clr1        = 31;
  76.   clr2        = 32;
  77.   clr3        = 33;
  78.   clr4        = 34;
  79.   clr5        = 35;
  80.   clr6        = 36;
  81.   clr7        = 37;
  82.  
  83.   clr0Bg      = 40;
  84.   clr1Bg      = 41;
  85.   clr2Bg      = 42;
  86.   clr3Bg      = 43;
  87.   clr4Bg      = 44;
  88.   clr5Bg      = 45;
  89.   clr6Bg      = 46;
  90.   clr7Bg      = 47;
  91.  
  92.  
  93. (****** DSR parameters ******)
  94.  
  95.   dsrCpr      = 6;
  96.  
  97. (****** CTC parameters ******)
  98.   ctcHSetTab     = 0;
  99.   ctcHClrTab     = 2;
  100.   ctcHClrTabsAll = 5;
  101.  
  102. (****** TBC parameters ******)
  103.   tbcHClrTab     = 0;
  104.   tbcHClrTabsAll = 3;
  105.  
  106. (****** SM and RM parameters ******)
  107.   mLnm   = 20;      (* linefeed newline mode *)
  108.   mAsm   = ">1";    (* auto scroll mode *)
  109.   mAwm   = "?7";    (* auto wrap mode *)
  110.  
  111.  
  112. (*
  113.  *  You have to put a pointer to the console.device here to use the input
  114.  *  procedures:
  115.  *)
  116.  
  117. PROCEDURE CDInputHandler(
  118.            base{Reg.A6}:ADDRESS;
  119.            events{Reg.A0}:InputEventPtr;
  120.            conDevice{Reg.A1}:ADDRESS):InputEventPtr; CODE -42;
  121.  
  122. PROCEDURE RawKeyConvert(
  123.            base{Reg.A6}:ADDRESS;
  124.            events{Reg.A0}:InputEventPtr;
  125.            buffer{Reg.A1}:ADDRESS;
  126.            length{Reg.D1}:LONGINT;
  127.            keyMap{Reg.A2}:KeyMapPtr):LONGINT; CODE -48;
  128.  
  129. (*--- functions in V36 or higher (distributed as Release 2.0) ---*)
  130. PROCEDURE GetConSnip(base{Reg.A6}:ADDRESS): LONGINT; CODE -54;
  131. PROCEDURE SetConSnip(base{Reg.A6}:ADDRESS;snip{Reg.A0}: LONGINT); CODE -60;
  132. PROCEDURE AddConSnipHook(base{Reg.A6}:ADDRESS;hook{Reg.A0}:HookPtr); CODE -66;
  133. PROCEDURE RemConSnipHook(base{Reg.A6}:ADDRESS;hook{Reg.A0}:HookPtr); CODE -72;
  134.  
  135. END Console.
  136.