home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / oberon / system / amigaconsole.mod (.txt) < prev    next >
Oberon Text  |  1977-12-31  |  3KB  |  82 lines

  1. Syntax10.Scn.Fnt
  2. Syntax10b.Scn.Fnt
  3. MODULE AmigaConsole;
  4. IMPORT SYSTEM, A := AmigaBase, e := AmigaExec, ie := AmigaInputEvent, u := AmigaUtility;
  5. CONST
  6.   consoleName * = "console.device";
  7. (****** SGR parameters ******)
  8.   primary     * = 0;
  9.   bold        * = 1;
  10.   italic      * = 3;
  11.   underscore  * = 4;
  12.   negative    * = 7;
  13.   normal        * = 22;      (* default foreground color, not bold *)
  14.   notItalic     * = 23;
  15.   notUnderscore * = 24;
  16.   positive      * = 27;
  17. (* these names refer to the ANSI standard, not the implementation *)
  18.   blank       * = 30;
  19.   red         * = 31;
  20.   green       * = 32;
  21.   yellow      * = 33;
  22.   blue        * = 34;
  23.   magenta     * = 35;
  24.   cyan        * = 36;
  25.   white       * = 37;
  26.   default     * = 39;
  27.   blackBg     * = 40;
  28.   redBg       * = 41;
  29.   greenBg     * = 42;
  30.   yellowBg    * = 43;
  31.   blueBg      * = 44;
  32.   magentaBg   * = 45;
  33.   cyanBg      * = 46;
  34.   whiteBg     * = 47;
  35.   defaultBg   * = 49;
  36. (* these names refer to the implementation, they are the preferred *)
  37. (* names for use with the Amiga console device. *)
  38.   clr0        * = 30;
  39.   clr1        * = 31;
  40.   clr2        * = 32;
  41.   clr3        * = 33;
  42.   clr4        * = 34;
  43.   clr5        * = 35;
  44.   clr6        * = 36;
  45.   clr7        * = 37;
  46.   clr0Bg      * = 40;
  47.   clr1Bg      * = 41;
  48.   clr2Bg      * = 42;
  49.   clr3Bg      * = 43;
  50.   clr4Bg      * = 44;
  51.   clr5Bg      * = 45;
  52.   clr6Bg      * = 46;
  53.   clr7Bg      * = 47;
  54. (****** DSR parameters ******)
  55.   dsrCpr      * = 6;
  56. (****** CTC parameters ******)
  57.   ctcHSetTab     * = 0;
  58.   ctcHClrTab     * = 2;
  59.   ctcHClrTabsAll * = 5;
  60. (****** TBC parameters ******)
  61.   tbcHClrTab     * = 0;
  62.   tbcHClrTabsAll * = 3;
  63. (****** SM and RM parameters ******)
  64.   mLNM   * = 20;      (* linefeed newline mode *)
  65.   mASM   * = ">1";    (* auto scroll mode *)
  66.   mAWM   * = "?7";    (* auto wrap mode *)
  67.  *  You have to put a pointer to the console.device here to use the input
  68.  *  procedures:
  69.   consoleBase*: e.DevicePtr;
  70. PROCEDURE RawKeyConvert*(events: LONGINT; VAR buffer: ARRAY OF SYSTEM.BYTE;
  71.             length: LONGINT; keyMap: LONGINT):LONGINT;
  72.  r:A.Regs;
  73. BEGIN
  74.  r.a[0]:=events;
  75.  r.a[1]:=SYSTEM.ADR(buffer);
  76.  r.d[1]:=length;
  77.  r.a[2]:=keyMap;
  78.  A.LibCall(consoleBase,-48,r);
  79.  RETURN r.d[0];
  80. END RawKeyConvert;
  81. END AmigaConsole.
  82.