

console                   Device Driver                   console




Console device driver


/dev/console is  the device driver for the  console of a COHERENT
system on the  IBM AT.  It is assigned major  device number 2 and
minor device number 0.

/dev/console  interprets escape  sequences in  console  output to
control output  on the  console monitor.  These  escape sequences
are compatible with ANSI  X3.25.  Thus, they are similar to those
used by the DEC VT-100 and VT-220 terminals.

The special sequences include the following:

<eesscc>>=   Enter alternate keypad mode.

<eesscc>>    Exit alternate keypad mode.

<eesscc>nn    Print the corresponding special graphics character.

<eesscc>77    Save the current cursor position.

<eesscc>88    Restore the previously saved cursor position.

<eesscc>cc    Reset to power-up configuration

<eesscc>DD     Move the  cursor down  one  line without  changing the
          column  position.   This  command moves  the  scrolling
          region text up and inserts blank lines if required.

<eesscc>EE    Move  the cursor to the first column  of the next line.
          This command move the scrolling region down and inserts
          blank line if required.

<eesscc>MM     Move the  cursor up one  line without  changing column
          position

<eesscc>[ AA  Cursor up; stop at top of page.

<eesscc>[ BB  Cursor down; stop at bottom edge of scrolling region.

<eesscc>[ CC  Cursor right.  Stop at right bottom corner of scrolling
          region.

<eesscc>[ DD  Cursor left.

<eesscc>[ EE  Cursor next  line.  Move scrolling region up and insert
          a blank line if required.

<eesscc>[ FF  Move scrolling region text down and insert a blank line
          if required.

<eesscc>[ _n GG
          Move the cursor to the _nth column of the current line.


COHERENT Lexicon                                           Page 1




console                   Device Driver                   console




<eesscc>[ _n;_m HH
          Move the cursor  to position m n.  Position is relative
          to the scrolling region.

<eesscc>[ II  Move the cursor position to the next horizontal tabula-
          tion stop.

<eesscc>[ _n JJ
          Erase display:
          00       Erase from cursor to end of screen.
          11       Erase from beginning of screen to cursor.
          22       Erase the entire screen.


<eesscc>[ _n KK
          Erase line:
          00       Erase from cursor to end of line.
          11       Erase from beginning of line to cursor.
          22       Erase entire line.


<eesscc>[ LL  Insert a line.

<eesscc>[ MM  Delete a line.

<eesscc>[ _n OO
          Erase scrolling region:
          00       Erase from cursor to end of scrolling region.
          11       Erase from beginning of scrolling region to cursor.
          22       Erase entire scrolling region.  Reposition cursor at
                  top left corner of scrolling region.


<eesscc>[ SS   Scroll the characters  in the scrolling  region up one
          line.  The bottom of the scrolling region is cleared to
          blanks.

<eesscc>[ TT  Scroll the  characters in the scrolling region down one
          line.  The top  line of the scrolling region is cleared
          to blanks.

<eesscc>[ ZZ  Move the cursor backwards to the last tabulation stop.

<eesscc>[ _n `
          Move the cursor to column _n of the current line.

<eesscc>[ _n aa
          Move the cursor forward n columns in the current line.

<eesscc>[ _n dd
          Move the cursor to row _n of the display.

<eesscc>[ _n ee
          Move the cursor down _n rows.


COHERENT Lexicon                                           Page 2




console                   Device Driver                   console




<eesscc>[ _n;_m ff
          Move the cursor to column _m of row _n in the display.

<eesscc>[ _n;_m gg
          Position cursor to  column _m of line _n.  Positioning is
          relative to the scrolling region.

<eesscc>[ _n mm
          Select graphics rendition:
          00       All attributes off.
          11       Bold intensity.
          44       Underscore on.
          55       Blink on.
          77       Reverse video.
          3300      Black foreground.
          3311      Red foreground.
          3322      Green foreground.
          3333      Brown foreground.
          3344      Blue foreground.
          3355      Magenta foreground.
          3366      Cyan foreground.
          3377      White foreground.
          4400      Black background.
          4411      Red background.
          4422      Green background.
          4433      Brown background.
          4444      Blue background.
          4455      Magenta background.
          4466      Cyan background.
          4477      White  background.
          5500      Black border.
          5511      Red border.
          5522      Green border.
          5533      Brown border.
          5544      Blue border.
          5555      Magenta border.
          5566      Cyan border.
          5577      White border.


<eesscc>[ _n;_m rr
          Display lines _n through _m become the scrolling region.

<eesscc>[ _n vv
          Select cursor rendition:
          00       Cursor visible.
          11       Cursor invisible.


<eesscc>[?44hh Enable  smooth scrolling.  This eliminates  snow at the
          expense of speed.

<eesscc>[?44ll Disable smooth scrolling (default).



COHERENT Lexicon                                           Page 3




console                   Device Driver                   console



<eesscc>[?77hh  Enable wraparound.   Typing past  column 80  moves the
          cursor to the  first column of the next line, scrolling
          if necessary.

<eesscc>[?77ll  Disable wraparound.   The  cursor will  not move  past
          column 80.  This is  useful if the screen is being used
          as a block mode interface.

<eesscc>`     Disable  manual  input.  Terminal  ``beeps''  (outputs
          <ccttrrll-GG>) when a  key is typed on the keyboard.  Inter-
          rupt and quit  signals are still passed to the terminal
          process.  Input  may be  renabled via <eesscc>cc  (power up
          reset) or <eesscc>bb (enable manual input).

<eesscc>bb    Enable keyboard  input that has been disabled by <eesscc>`
          (disable manual input).

<eesscc>tt    Enter keypad-shifted mode.

<eesscc>uu    Exit keypad-shifted mode.

The console keyboard  sends the expected ASCII characters for the
usual  alphabetic, numeric,  and punctuation  keys.   The numeric
keypad  normally  sends editing  escape  sequences, as  described
below.  When shifted or in num-lock mode, it sends `0' to `9' and
`.' instead.  In num-lock  mode (i.e., when the <num-lock> key is
depressed, <shift> restores  the normal escape sequences.  In al-
ternate-keypad  mode,  the numeric  keypad  sends  "<eesscc>? pp"  to
``<eesscc>? yy'' for `0' to `9' and ``<eesscc>? nn'' for `.'.

<hhoommee>       Send ``cursor home'' (<eesscc>[ HH).

<uupp>         Send ``cursor up'' (<eesscc>[ AA).

<ppgg uupp>      Send (<eesscc>[ VV).

<lleefftt>       Send ``cursor left'' (<eesscc>[ DD).

<rriigghhtt>      Send ``cursor right'' (<eesscc>[ CC).

<eenndd>        Send cursor to bottom left of screen (<eesscc>[ 2244 HH).

<ddoowwnn>       Send ``cursor down'' (<eesscc>[ BB).

<ppgg ddnn>      Move cursor to previous page (<eesscc>[ UU).

<iinnss>        Toggle insert mode (<eesscc>[ @).

<ddeell>        Delete the character at the cursor (<eesscc>[ PP).

The effects of the remaining keys are described below:

FF11-FF1100       Send <eesscc>[ 11 xx ... <eesscc>[ 99 xx, <eesscc>[ 00 xx.




COHERENT Lexicon                                           Page 4




console                   Device Driver                   console



<aalltt>FF11-FF1100  Send <eesscc>[ 11 yy ... <eesscc>[ 99 yy, <eesscc>[ 00 yy.

<eesscc>        Mark the beginning of an escape sequence; <esc><esc>
             sends ASCII ESC.

<ttaabb>        Send ASCII HT.

<ccttrrll>       When combined  with `A'  through `_', send  the cor-
             responding ASCII  control  character; when  combined
             with <rreettuurrnn>,  send  ASCII LF;  when combined  with
             <backspace> send ASCII DEL; when combined with <alt>
             and <del>, issue system  reset.  <ctrl-X> cancels an
             escape sequence.

<sshhiifftt>      Change  alphabetic  keys from  lower  case to  upper
             case, or  from upper  case to  lower case  in ``caps
             lock'' mode.

<aalltt>        When  combined with  <ctrl-alt-del>, issue  a system
             reset.

<bbaacckkssppaaccee>  Send ASCII BS; when combined with <ctrl>, send ASCII
             DEL.

<rreettuurrnn>     Send ASCII CR; when combined with <ctrl>, send ASCII
             LF.

*            Send ASCII `*'.

<ccaappss lloocckk>  Toggle ``caps lock'' mode.

<nnuumm lloocckk>   Toggle the interpretation of  the numeric keypad, as
             described above.

<ssccrroollll lloocckk>
             Toggle console output,  like <ctrl-S>  and <ctrl-Q>;
             when combined with <ctrl>,  send signal SIGINT; when
             combined with <alt>, sends signal SIGQUIT.

-            Send `-'.

+            Send `+'.

***** Files *****

/dev/console

***** See Also *****

ASCII, device drivers, signal()







COHERENT Lexicon                                           Page 5


