.AUTOSUBTITLE
.LEVEL STYLE -4,3,5,1
.PF 3,57,8,64
.LM 4
.DIS SPEC
.LIT


        +---------------+
        |   +-------+   |
        |  /         \  |
        | / D E C U S \ |   D E C U S  makes it work
        | \   R S X   / |
        |  \  S I G  /  |
        |   +-------+   |
        +---------------+







        MMMM     MMMM     CCCCCCCC      EEEEEEEEEE
        MM MM   MM MM    CCC    CCC     EE     EEE
        MM  MM MM  MM    CC      CC     EE
        MM   MMM   MM    CC             EEEEEEE
        MM    M    MM    CC             EEEEEEE
        MM         MM    CC      CC     EE
        MM         MM    CCC    CCC     EE     EEE
        MM         MM     CCCCCCCC      EEEEEEEEEE

.ELI
.ENA SPEC
.S
.C COMMANDLINE EDITOR
.S
.C originaly developed by
.S
.C D. Sponza (YU) oct-81
.S
.C Since 29-Jul-86 Supported by
.S
.C Hans Hamakers
.C Asea Brown Boveri Industrie b.v.
.C P.O Box 301    3000 AH Rotterdam
.C The Netherlands
.S
.C Different  "evolutions"  from DECUS tapes
.C ( some where called CLE ) where collected
.C and merged and  new features  where added
.S
.C This manual describes MCE V4.22
.TITLE MCE -- Commandline editor
.PAGE
MCE is an RSX-task  through which you can communicate with the CLI
active at your terminal.
.S2
.DIS SPEC
.LIT

  --------+           +---------+           +---------+
 /        |   QIO's   |         |   SPAWN   |         |
/   TI:   |-<------->-|  MCE    |--<----->--|  CLI    |
|         |           |         |           |         |
+---------+           +---------+           +---------+

.ELI
.ENA SPEC
.B
MCE let you edit your commandlines in an EDT-alike way
in keypad- or non-keypad-mode.
MCE stores the commandlines for you in a Fifo-buffer for later
retrieval and you can  define your own commands like in VMS.
.HL1 Options
A list of possible features follows below. They can individualy
be selected at build time
.B
.I 4,MCE V4.22 - Commandline Editor options :
.BR
.I 4,---------------------------------------
.LS 0,-
.LE Multiple CLI support
.LE Init-file support
.LE Compound commandline support
.LE Statusline support
.LE Startup and exit messages
.LE Remote terminal (RT:) detection
.LE VT2xx/VT3xx support
.LE TDV2230 functionkey support
.LE EDT-Keypad editing support
.LE Extended prompt support
.LE Automatic return to Insert- or Overstrikemode
.LE Terminal time-out support
.ELS
!
!
!
.HL2 Multiple CLI support
When multiple CLI support is included MCE uses the prompt from the CLI
currently active for the invocing terminal.
Futheron there can be different Init-files for MCR, DCL or other CLI's
!
!
!
.HL2 Init-file support
When init file support is included MCE reads initialisation files which
can contain Command synonym definitions Internal- and CLI- commands.
Files are searched in this order:
.B
When multiple CLI support is included :
.B
.I 8,LB:[1,2]MCEINI.xxx, followed by
.I 8,SY:<Cur-Dir>MCEINI.xxx
.B
When multiple CLI support is not included :
.B
.I 8,LB:[1,2]MCEINI.CMD, followed by
.I 8,SY:<Cur-Dir>MCEINI.CMD
.B
where "xxx" is the name of the CLI defined for the terminal invoking MCE
and "Cur-Dir" is the default directory at the startup of MCE.
.B
This algorithm divides command-definitions into 2 groups:
A system-wide set in LB:[1,2] followed by users private set in
SY:<Cur-Dir>
.BR
Overriding the default file name in the commandline invoking
MCE offers the possibility to tailor an application specific
command set.
.BR
Comments are possible behind "!" , for this is the comment character for
CLI's.
.BR
An  Example of an Init-file can be found in Appendix A
!
!
!
.HL2 Compound commandline support
MCE allows definitions of compound commands.
Using the ampersand (_&) sign one can define an MCE command as a sequence
of multiple CLI commands :
.B
.I 4,E.g.    +>STAT := TIM _& PIP /LI _& ACT /ALL ...etc.
.B
This defines STAT as a sequence of CLI-commands that are executed
one after another. MCE waits for completion of one command
before activating the next.
.B
Also it can be done directly:
.B
.I 4,E.g.    +>MAC @TASKASM _& TKB @TASKTKB
.B
The "_&" MUST be preceeded by at least one space. This is done to let commands
like "PIP /TD_&/LI" still work.
.BR
When a command in a compound commandline gives a non-successfull exitstatus,
MCE terminates the compound commandline there showing the exitstatus and the
command that caused it.
.BR
A compound commandline may not contain Internal Commands (#Commands
starting with "MCE"#) and only the first command is checked for translation.
!
!
!
.HL2 Statusline support
Line 24 on an ANSI CRT terminal can be used for status information.
The statusline shows the different settings and Fifo-buffer parameters of MCE
and can be switched on/off with "MCE#STATus#ON|OFF"
For non ANSI terminals like VT52's only a "SNAPSHOT" is possible with
"MCE#STATus". The statusline is than displayed only once.
.B
The line displayes the following :
.LM-4
.DIS SPEC
.PF 3,57,8,71
.LIT

-----------------------------------------------------------------------
MCE-V4.22 FIFO:list/22/16/00 CMSZ:04 KEYP:on SVINT:off SVOLD:on TMO:xxx
-----------------------------------------------------------------------
      |          |   |  |  |     |      |        |      |         |
      |          |   |  |  |     |      |        |      |         v
      |          |   |  |  |     |      |        |      | Time-out time
      |          |   |  |  |     |      |        |      | in minutes or
      |          |   |  |  |     |      |        |      |          "no"
      |          |   |  |  |     |      |        |      v
      |          |   |  |  |     |      |        |      Save  old  cmds
      |          |   |  |  |     |      |        |        "on" or "off"
      |          |   |  |  |     |      |        |
      |          |   |  |  |     |      |        +-->  Save intern cmds
      |          |   |  |  |     |      |                 "on" or "off"
      |          |   |  |  |     |      |
      |          |   |  |  |     |      +-----> Keypad editing  "on" or
      |          |   |  |  |     |                                "off"
      |          |   |  |  |     |
      |          |   |  |  |     +----->  Minimal  size  of commandline
      |          |   |  |  |
      |          |   |  |  +----->  Number of current cmdline from Fifo
      |          |   |  +-------->  Number of cmdlines in Fifo
      |          |   +----------->  Maximum  number of cmdlines in Fifo
      |          +--------------->  Fifo is a "list" or a "ring"
      |
      +-----------------> MCE Version
.ELI
.ENA SPEC
.PF 3,57,8,64
.LM+4
!
!
!
.HL2 Startup and exit messages
The startup and exit messages like :
.B
.I 8,"MCE#--#CLI-Commandline-Editor#V4.22"
.BR
and
.I 8,"MCE#--#Exit"
.B
are optional. They can be selected at build time.
.B
MCE indentifies its self with
.B
.I 8,"MCE#--#^&MCR\&-Commandline-Editor#V4.22"
.B
when no multiple CLI support was selected at build time.
!
!
!
.HL2 Remote terminal (RT:) detection
When starting MCE via a remote terminal (RT:) problems may occur
if the local system is VMS with its commandline editor enabled.
The way MCE acts when it detects if it was started via a remote
terminal can be specified at build time. One of the following
options can be selected :
.LS 1,-
.LM-4
.LE Give the folowing message:
.B
MCE#--#** WARNING ** Started on a remote terminal (RT:)
#######If your local system is VMS with its commandline
#######editor enabled please type "MCE#EXIT"
.LE Give the folowing message and exit :
.B
MCE#--#Started on a remote terminalline (RT:) Exiting ..
.LE Do nothing
.LM+4
.ELS
!
!
!
.HL2 VT2xx/VT3xx support
VT2xx/VT3xx support enables the use of keys <F11>, <F12> and <F13>
as <ESC>, <BS> and <LF>.  The keys <HELP>, <DO> etc. can also be used
and it is possible to define the functionkeys <F6> .. <F20> like :
.B
.I 8,"F6 := TIM"
.B
pushing <F6> gives the time of day then.
.BR
(#See Functionkeys#)
!
!
!
.HL2 TDV2230 functionkey support
The keys of a TANDBERG TDV2230 terminal can be defined like the ones
on a VT2xx/VT3xx. (#See Functionkeys#)
!
!
!
.HL2 EDT-Keypad editing support
Some edit functions can be performed on a VT52/VT1xx/VT2xx/VT3xx keypad,
similar to K52, KED and EDT.
The Keypad-editing can be switched on/off with "MCE#KEYPad#ON|OFF"
!
!
!
.HL2 Extended prompt support
The MCE prompt can show if overstrike- or insert-mode is active by "+"
and "-".
Also it can display if keypad editing is enabled when the statusline is
off by ":"
.B
.I 8,e.g.   "+:>"
.B
The Extended prompt can be switched on/off with "MCE#PROMpt#ON|OFF"
!
!
!
.HL2 Automatic return to Insert- or Overstrikemode
Default overstrike- or insert-mode stayes active until it is changed by
CTRL/A.  MCE can be build so that it sets one of the modes active by
default when it prompts for a new command. This can be changed with the
"MCE#INSErt#ON|OFF" and "MCE#OVERstrike#ON|OFF" commands.
!
!
!
.HL2 Terminal time-out support
When terminal time-out support is included and the terminal is not used
within a given time the terminal is logged-out.
.BR
( at TT0: MCE only exits )
!
!
!
.HL1 Commandline Editor Startup
Invoke MCE with command "MCE" , at best in your LOGIN file by ".XQT MCE".
If Init-file support is included a file of Command-Synonyms, CLI-Commands
and/or Internal-Commands will be read and executed at MCE startup.
The file may be specified in the form "MCE startup-file".
If no startup file is specified in the commandline (the normal case),
the default Init-files are searched for. (#See Init-files#)
!
!
!
.HL1  Commandline Editor Exit
To exit MCE use the "MCE#EXIT" internal command or <CTRL/Y>.
!
!
!
.HL1 Commandlines
When MCE is ready to accept a commandline it gives a prompt.
How the prompt looks depend on the chosen options and setup of MCE.
(#See Extended prompt#).
The maximum length of commandlines is 78 characters.
.B
If a commandline starts with "MCE", it is interpreted as an Internal
Command. Other commandlines are checked for translation and the result
is spawned to the current CLI.
.B
Special action is performed with "BYE" and "LOG[out]".
"BYE" and when in DCL "LOG[out]" result in a spawn of "BYE" to
MCR and MCE  exits immediately.
Note that you may define any other string (#e.g. GOODBYE#) to result
in "BYE" or "LOGOUT".
.BR
All commandlines may be preceded by and contain one or more TAB's
and/or spaces.
.B
Normally all commandlines equal to or longer than a given length are saved
in a Fifo-buffer. This length may be changed with the "MCE#CMSZ#n" command.
.B
The maximum number of commandlines the Fifo-buffer can hold can be specified
with the  "MCE#FISZ#n" command.
When the maximum number of commandlines is present, or when no buffer
poolspace is available to hold more entries, the new commandline is saved
and the oldest disappears.
.B
Retrieved commandlines from the Fifo-buffer are only saved again if they
are edited or when the saving of "old" commandlines is enabled by
"MCE#SVOLd#ON".
.B
Internal commands are saved when this is enabled by "MCE#SVINternals#ON".
(#Save "INTERNAL commands#)
!
!
!
.HL1 Command synonyms
A Command synonym may be defined by:
.B
.C ,+>Syn#:=#<Command1>#[#_&#<Command2>#[#_&#.....#]#]
.B
where "Syn" is the command synonym which will be substituted by the text at
the right side of ":=".
.B
.I 4,e.g.:##+>HE#:=#HELP#PIP###!#
.I 4,#######+>HE###############!#Will request "HELP PIP"
.NT
The ":=" must be preceded and followed by at least one TAB or space
.EN
With Keypad-mode "OFF" the keystrokes <PF1> , <BLUE> or <ESC>P translate
the command synonym without execution.
.B
If you enter a command synonym followed by additional text, this
additional text will normally be appended as a whole.
.B
.I 4,e.g.###+>HE#/RE###########!#Will request "HELP PIP /RE
.I 4,or#####+>HE#/RE<PF1>######!#Will be translated and
.I 4,##########################!##displayed
.I 4,result#+>HELP PIP /RE
.B
A command synonym can be deleted by redefining it to null.
.B
.I 4,e.g.###+>HE#:=############!#Delete above definition
.B
Abbreviate commands by seperating the optional part by "*"
.B
.I 4,e.g.###+>HP*IP := HELP PIP
.B
This command may now be requested with:
.B
.I 4,#######+>HP or HPI or HPIP  etc.
.B
More sophisticated is the Parameter Substitution,
similar to the indirect commandfile processor.
.B
.I 4,e.g.:##+>DIR*ECTORY#:= PIP 'P1'/LI
.I 4,#######+>COP*Y######:= PIP 'P2'/NV/CD='P1'
.B
.I 4,#######+>DIR##############!#Will be translated
.I 4,##########################!##into "PIP /LI"
.I 4,#######+>DIREC FIL########!#Will be translated
.I 4,##########################!##into "PIP FIL/LI"
.I 4,#######+>COPY A.CMD [1,2]#!#Will simulate the DCL
.I 4,##########################!##COPY command
.B
Note that command synonyms may be performed from Init-files.
!
!
!
.HL1 Functionkeys
You may request a command with functionkeys <PF1>, <PF2>, <PF3> or
<PF4>.
.B
The keys <BLUE>, <RED> and <GREY> on a VT52 are synonym to <PF1>, <PF2> and
<PF3>.
.B
It is also possible to request commands with control keys
(e.g. <CTRL/G>).
.B
On a VT2xx/VT3xx you can also define the function keys <F6>#..#<F20>
and  <FIND>  <INSERT#HERE> etc. (#Only when VT2xx/VT3xx support is included#)
.B
The keys of a TANDBERG TDV2230 terminal can be defined like the ones
on a VT2xx/VT3xx. (#Only when TDV2230 support is included#)
.B
Define the command translation as "<key> := command".
.B
.I 4,e.g.###+>PF2 := TIM#######!#Redefine <PF2> or <RED> key
.I 4,#######+><PF2>############!##to display the current time
.B
.I 4,#######+>F6 := ACT########!#Define F6 function key
.I 4,#######+><F6>#############!##to display the active tasks
.B
The keys <FIND> ect. on a VT2xx/VT3xx must be entered as F$a  where
"a" is the first character of the key function.
.B
.I 4,e.g.###"F$P" for  <PREV#SCREEN>.
.B
Define a control key as follows :
.B
.I 4,e.g.###+>_^G := SET /UIC###!#Define <CTRL/G> key
.I 4,#######+><CTRL/G>#########!# to display the current UIC
.B
Note that the following control-keys CANNOT be defined:
.B
.I 11,<CTRL/M> = <RETURN>,
.I 11,<CTRL/O>,  <CTRL/Q>,  <CTRL/S>
.I 11,<CTRL/[> = <ESC>
.B
Next to the rest of the Alphabetic characters the following keys can
be defined :
.B
.I 12,<CTRL/_\>
.I 12,<CTRL/]>
.I 12,<CTRL/_^>
.I 12,<CTRL/?>
!
!
!
.HL1 Internal Commands ( MCE xxxx )
If a  Commandline starts with "MCE" an Internal Command is assumed.
Following the verb "MCE " a 4 character action specifier defines
the action wanted.
.B
.I 4,e.g. "MCE CLEA" this command clears the Fifo-buffer
.B
Here follows a list of all internal commands :
.B
.LS 0,-
.LE MCE CHAIn [file]
.LE MCE CLEAr
.LE MCE CMSZ n
.LE MCE ECHO ON|OFF
.LE MCE EXIT
.LE MCE FISZ n
.LE MCE FREE
.LE MCE INSErt ON|OFF
.LE MCE KEYPad ON|OFF
.LE MCE LIST
.LE MCE OVERstrike ON|OFF
.LE MCE PROMpt ON|OFF
.LE MCE PURGe
.LE MCE READ [file]
.LE MCE REPLace [file]
.LE MCE RING
.LE MCE STATusline [ON|OFF]
.LE MCE SVINternals ON|OFF
.LE MCE SVOLd ON|OFF
.LE MCE VERSion
.ELS
!
!
!
.HL2 MCE CHAIn [file]
Chain from one Init-file to another. That is start or continue reading of
commands on specified file. This command is a synonym for "MCE READ [file]".
This command is only available when Init-file support is included in MCE.
!
!
!
.HL2 MCE CLEAr
This command deletes all commands currently in the Fifo-buffer.
!
!
!
.HL2 MCE CMSZ n
Changes minimal commandsize to "n".
Only commandlines that are equal to or longer than "n" characters are stored
in the Fifo-buffer.
The default setting can be specified at MCE build time.
!
!
!
.HL2 MCE ECHO ON|OFF
When "ON" MCE echoes commandlines to TI:. This is usefull in Init-files to
display messages ect. or to see the translation of command synonyms.
The default setting is "OFF". (#See example in Appendix A#)
!
!
!
.HL2 MCE EXIT
The task MCE exits.
!
!
!
.HL2 MCE FISZ n
Changes the maximum number of commandlines which can be saved in the
commandline Fifo-buffer.
Note that the actual number of commandlines that can be saved depend on the
size of the commandlines and the available MCE pool space.
Information about MCE's poolspace can be obtained by the "MCE#FREE" command.
More poolspace can be created by installing MCE with a larger increment.
"INS#$MCE/INC=xxx". A value of 2400, which is the default value that is used
during taskbuilding, in will be enough in most cases.
If "n" is smaller than the active number of commandlines stored, MCE deletes
the oldest commandlines from the Fifo-buffer untill "n" is reached.
The default setting can be specified at MCE build time.
!
!
!
.HL2 MCE FREE
Displays MCE's Pool information like :
.B
.I 4,"MCE -- Pool:xxx:yyy:zz."
.B
.I 8,xxx#= Size of largest block in bytes
.I 8,yyy#= Total number of free bytes
.I 8,zz##= Number of fragments
!
!
!
.HL2 MCE INSErt ON|OFF
When "ON" MCE goes back to INSERT mode when prompting for a new
command.
The default setting can be specified at MCE build time.
.B
"MCE INSErt ON" Switches Auto-Overstrike mode off.
.BR
"MCE OVERstrike ON" Switches Auto-Insert mode off.
!
!
!
.HL2 MCE KEYPad ON|OFF
Set Keypad editing on/off. (#See EDT-Keypad editing#).
This command is only available when EDT-Keypad support is included in MCE.
!
!
!
.HL2 MCE LIST
Makes command Fifo-buffer a list : UP- and DOWN-ARROW stop at the top
and bottom. This is the default setting.
.BR
(#See also "MCE#RING" command#)
!
!
!
.HL2 MCE OVERstrike ON|OFF
When on MCE goes back to OVERSTRIKE mode when prompting for a new
command.
The default setting can be specified at MCE build time.
.B
"MCE OVERstrike ON" Switches Auto-Insert mode off.
.BR
"MCE INSErt ON" Switches Auto-Overstrike mode off.
!
!
!
.HL2 MCE PROMpt ON|OFF
Switches extended prompt on/off.
The default setting can be specified at MCE build time.
This command is only available when Extended prompt support is included
in MCE.
!
!
!
.HL2 MCE PURGe
This command deletes all command synonyms currently in the synonym buffer.
!
!
!
.HL2 MCE READ [file]
Read commandlines from specified file.
This command is only available when Init-file support is included in MCE.
!
!
!
.HL2 MCE REPLace [file]
Combines the MCE PURGe and MCE READ [file] commands.
This command is only available when Init-file support is included in MCE.
!
!
!
.HL2 MCE RING
Makes command Fifo-buffer a ring :
UP- and DOWN-ARROW roll through the buffer.
.BR
The default setting is "LIST". (#See also "MCE#LIST" command#)
!
!
.HL2 MCE STATus [ON|OFF]
This command sets the statusline "ON" or "OFF". When no option is specified
the statusline is displayed only once. (#See Statusline support#)
.BR
The default setting can be specified at MCE build time.
This command is only available when Statusline support is included in MCE.
!
!
!
.HL2 MCE SVINternals ON|OFF
When "ON" Internal commands (#Commandlines starting with "MCE"#) are saved
in the Fifo-buffer, When "OFF" these commands are not saved.
The default setting can be specified at MCE build time.
!
!
!
.HL2 MCE SVOLd ON|OFF
When "ON" "old" commands ( retrieved from the Fifo-buffer ) are saved again
in the Fifo-buffer, else they are not saved unless they are editted.
The default setting can be specified at MCE build time.
!
!
!
.HL2 MCE VERSion
Shows MCE Version.
!
!
!
.HL2 Some notes on files
When with the CHAIn, READ and REPLace commands no file is specified,
the same file name convention is used as at startup: the files according
to the current CLI are read in, i.e. the command "MCE REPLace"
effects in a MCE restart, but the Fifo-buffer is kept. This is usefull
after a "SET#TERMINAL#<new-cli>" command.
When a "space" is given as filename, only SY:[Cur-Dir]MCEINI.xxx is read.
(#See Init-file support#)
!
!
!
.HL1 Recall function
Recalling a command is done by entering the first part of a command
which was previously executed, termimated by a RECALL keystroke.
This will recall the last command already executed starting with the
string entered.  The command may be edited or executed by pressing
the return key. A second RECALL keystroke searches further back in the
Fifo-buffer. When no string is entered, the last defined string is taken.
.B
Recall keystrokes are :
.B
.I 11,<FIND>
.I 11,<ESC>Q
.I 11,In non EDT-Keypad mode#: <PF2> or <RED>
.I 11,In EDT-Keypad mode#####: <PF3> or <GREY>
.B
.I 4,E.g.
.I 8,Previously entered commandlines :
.B
.I 11,+>DIR MCE*.*
.I 11,+>MAC @MCEASM
.I 11,+>TKB @MCETKB
.I 11,+>DMP X.DAT
.B
.I 8,+>D<RECALL>###Will recall the last commandline
.I 8,##############starting with "D" :  +>DMP X.DAT
.B
.I 8,+><RECALL>####Will recall :  +>DIR MCE*.*
.B
.I 8,+>DI<RECALL>##Will recall :  +>DIR X.DAT
!
!
!

.HL1 Help file
A helpfile MCE.HLP customized to the selected options is created
during MCE build time.
.BR
The helpfile can be created in two different versions.
.B
.I 2,VERSION 1 :  You can access this one by typing :
.BR
.I 2,#############"HELP MCE [topic...]" but you have to include
.I 2,#############a reference like :
.B
.I 20,1 MCE
.I 20,@MCE
.B
.I 2,#############in  MCR.HLP and DCL.HLP
.B
.I 2,VERSION 2 :  You can access this one by typing :
.BR
.I 2,#############"HELP /MCE [topic...]".
.I 2,#############This version does not need any editing of
.I 2,#############MCR.HLP and DCL.HLP
.B
Note that if you donot build the helpfile together with MCE, you
cannot use the <NEXT-SCREEN> and <PRV-SCREEN> keys to walk through the
helpfile.
!
!
!

.PG
.HL1 Line editing commands
For line-editing there are two modes :
.B
.LS 0,o
.LE Non-keypad mode
.LE Keypad mode
.ELS
.B
In the non-keypad mode you control MCE with control-keys or escape-sequences.
In the keypad mode you can use the keypad of a VT52, VT1xx, VT2xx or a
VT3xx terminal to give commands to MCE. The advantage of this mode
is that you can edit the current commandline in the same way as you
are editing a line in K52, KED or EDT.
.HL2 Non-keypad editing and cursormovement commands
.DIS SPEC
.LIT
   
+----------------------------------------------------------+
| Cursormovements                                          |
+----------------------------------------------------------+
| Move Cursor Left               | <LEFT>      or <CTRL/D> |
| Move Cursor Right              | <RIGHT>     or <CTRL/F> |
| Move Cursor to Begin Of Line   | <BACKSPACE> or <CTRL/H> |
|                                |             or <F12> *  |
| Move Cursor to End Of Line     | <CTRL/E>                |
| Move one Word to the right or  |                         |
|      move from EOL to BOL      | <TAB>       or <CTRL/I> |
+----------------------------------------------------------+
   
   
+----------------------------------------------------------+
| Delete commands                                          |
+----------------------------------------------------------+
| Delete Character Left of Cursor| <DELETE>                |
| Delete Character at Cursor     | <CTRL/V>                |
| Delete Word Left of Cursor     | <LINEFEED>  or <CTRL/J> |
|                                |             or <F13> *  |
| Delete Word Right at Cursor    | <CTRL/W>                |
| Delete from Cursor to BOL      | <CTRL/U>                |
| Delete from Cursor to EOL      | <CTRL/K>                |
| Delete whole line              | <CTRL/C>                |
+----------------------------------------------------------+
   
.ELI
.ENA SPEC
.FN 2
*###On a VT2xx/VT3xx terminal only when VT2xx/VT3xx support is
####included
!
.PG
.LIT

+----------------------------------------------------------+
| Control commands                                         |
+----------------------------------------------------------+
| Rewrite Line                   | <CTRL/R>                |
| Switch between Overstrike and  |                         |
|                Insert mode.    | <CTRL/A>                |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Save and execute                                         |
+----------------------------------------------------------+
| Execute Command                | <RETURN>    or <ENTER>  |
| Execute Command without waiting| <ESC><ESC>  or <DO> *   |
| Execute Cmd and leave Fifo-    |                         |
|    bufferpointer where it is   | <CTRL/X>                |
| Save Command without executing | <CTRL/N>                |
| Enable output from other tasks |                         |
|          (Detach for 10 sec.)  | <CTRL/T>                |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Non-keypad Commandbuffer manipulation keys:              |
+----------------------------------------------------------+
| Display contents of Fifo-buffer| <PF4>       or <ESC>S   |
| Retrieve previous Command      | <UP>        or <CTRL/B> |
| Reverse of <UP> (next command) | <DOWN>                  |
| Recall Command from Fifo       | <PF2>       or <RED>    |
|                                | or <FIND> * or <ESC>Q   |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Non-keypad Help keys:                                    |
+----------------------------------------------------------+
| Gives HELP about MCE           | <HELP> *    or <CTRL/?> |
| Gives Previous/Next HELP screen| <PREV-SCR> / <NEXT-SCR> |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Non-keypad Commandtranslation keys:                      |
+----------------------------------------------------------+
| Translate  Command synonym     |                         |
|             without execution  | <PF1>       or <BLUE>   |
|                                |             or <ESC>P   |
| Show Command Synonym Buffer    | <PF3>       or <GREY>   |
|                                |             or <ESC>R   |
+----------------------------------------------------------+
.ELI
.FN 2
*###On a VT2xx/VT3xx terminal only when VT2xx/VT3xx support is
####included
!
.PG
!
!
!
.HL2 EDT-keypad editing and cursormovement commands
While in keypad-mode the non-keypad commands are valid, except
those commands that are redefined.
.HL3 VT2xx/VT3xx Keypad Lay-out
.LM-2
.DIS SPEC
.PF 3,57,8,71
.LIT


   F11       F12      F13     F14          HELP          DO
+--------+--------+--------+--------+   +--------+-----------------+
|*(ESC)  |* (BS)  |* (LF)  |        |   |*       |*                |
|        |        | DELWRD |        |   |  HELP  |  EXECUTE NOWAIT |
|        | BEGLIN | RIGHT  |        |   |        |                 |
+--------+--------+--------+--------+   +--------+-----------------+



                                   PF1      PF2      PF3      PF4
+--------+--------+--------+    +--------+--------+--------+--------+
|*(FIND) |*INSERT |* RE-   |    |\\\\\\\\|        |        |        |
| RECALL |  HERE  |  MOVE  |    |\\GOLD\\| KPHELP | RECALL | DELLIN |
|        |        |        |    |\\\\\\\\|        |        |        |
+--------+--------+--------+    +--------+--------+--------+--------+
|*       |* PREV  |* NEXT  |    |        | SHOSYN | SHOFIF |        |
| SELECT |  HELP  |  HELP  |    | TRANSL | ------ | ------ | DELWRD |
|        |(SCREEN)|(SCREEN)|    |        |\\VERS\\|\\FREE\\|        |
+--------+--------+--------+    +--------+--------+--------+--------+
         |  PREV  |             |        |        |  CUT   |        |
         | COMMAND|             |        |        | ------ | DELCHR |
         |        |             |        |        |\PASTE\\|        |
+--------+--------+--------+    +--------+--------+--------+--------+
|        |  NEXT  |        |    |        |  EOL   |        |        |
|  <--   | COMMAND|  -->   |    |  WORD  | ------ |        |        |
|        |        |        |    |        |\DELLIN\|        |        |
+--------+--------+--------+    +--------+--------+--------+  ENTER |
                                |     BEGLIN      | SELECT |        |
                                | --------------- | ------ |        |
                                |\\\\\CLRLIN\\\\\\|\RESET\\|        |
                                +-----------------+--------+--------+
.ELI
.PF 3,57,8,64
.LM+2
.ENA SPEC
.FN 2
*###These keys are only available when VT2xx/VT3xx support is
####included
!
.PG
.HL3 VT1xx Keypad Lay-out
.DIS SPEC
.LIT



              UP      DOWN     LEFT      RIGHT
           +--------+--------+--------+--------+
           |  PREV. |  NEXT  |        |        |
           | COMMAND| COMMAND|  <--   |  -->   |
           |        |        |        |        |
           +--------+--------+--------+--------+

              PF1      PF2      PF3      PF4
           +--------+--------+--------+--------+
           |\\\\\\\\|        |        |        |
           |\\GOLD\\| KPHELP | RECALL | DELLIN |
           |\\\\\\\\|        |        |        |
           +--------+--------+--------+--------+
           |        | SHOSYN | SHOFIF |        |
           | TRANSL | ------ | ------ | DELWRD |
           |        |\\VERS\\|\\FREE\\|        |
           +--------+--------+--------+--------+
           |        |        |  CUT   |        |
           |        |        | ------ | DELCHR |
           |        |        |\PASTE\\|        |
           +--------+--------+--------+--------+
           |        |  EOL   |        |        |
           |  WORD  | ------ |        |        |
           |        |\DELLIN\|        |        |
           +--------+--------+--------+  ENTER |
           |     BEGLIN      | SELECT |        |
           | --------------- | ------ |        |
           |\\\\\CLRLIN\\\\\\|\RESET\\|        |
           +-----------------+--------+--------+

.ELI
.PG
.HL3 VT52 Keypad Lay-out
.LIT




             BLUE      RED      GREY      UP
           +--------+--------+--------+--------+
           |\\\\\\\\|        |        | PREV.  |
           |\\GOLD\\| KPHELP | RECALL | COMMAND|
           |\\\\\\\\|        |        |        |
           +-----------------+--------+--------+
           |        | SHOSYN | SHOFIF |  NEXT  |
           | TRANSL | ------ | ------ | COMMAND|
           |        |\\VERS\\|\\FREE\\|        |
           +-----------------+--------+--------+
           |        |        |  CUT   |        |
           |        |        | ------ |   -->  |
           |        |        |\PASTE\\|        |
           +--------+--------+--------+--------+
           |        |  EOL   |        |        |
           |  WORD  | ------ |        |   <--  |
           |        |\DELLIN\|        |        |
           +--------+--------+--------+--------+
           |     BEGLIN      | SELECT |        |
           | --------------- | ------ | ENTER  |
           |\\\\\CLRLIN\\\\\\|\RESET\\|        |
           +-----------------+--------+--------+
.ELI
.ENA SPEC
.PG

.HL3 Keypad editing and cursormovement keys
Note :  <KPx> means key x on the keypad.
.DIS SPEC
.LIT

+----------------------------------------------------------+
| Cursormovements                                          |
+----------------------------------------------------------+
| Move Cursor to Begin Of Line   | <KP0>          = BEGLIN |
| Move Cursor to End Of Line     | <KP2>          = EOL    |
| Move one Word to the right or  |                         |
|      move from EOL to BOL      | <KP1>          = WORD   |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Delete commands                                          |
+----------------------------------------------------------+
| Delete Character at Cursor     | <KP,>          = DELCHR |
| Delete Word Right at Cursor    | <KP->          = DELWRD |
| Delete from Cursor to EOL      | <PF4>          = DELLIN |
|                                | or <PF1><KP2>           |
|                                | or <BLUE><KP2> = DELEOL |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Cut and paste commands                                   |
+----------------------------------------------------------+
| Set Begin Of Textmarker BOT    | <SELECT>                |
|                                | or <KP.>       = SELECT |
| Remove text from BOT to cursor |                         |
| and store it in the pastebuffer| <REMOVE>                |
|                                | or <KP6>       = CUT    |
| Insert text-string from paste- |                         |
| buffer starting at cursor      | <INSERT>                |
|                                | or <PF1><KP6>           |
|                                | or <BLUE><KP6> = PASTE  |
| Reset selected range           | <PF1><KP.>              |
|                                | or <BLUE><KP.> = RESET  |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Control commands                                         |
+----------------------------------------------------------+
| Select lower function          | <PF1>                   |
|                                | or <BLUE>      = GOLD   |
+----------------------------------------------------------+
.ELI
.PG
.LIT

+----------------------------------------------------------+
| Save and execute                                         |
+----------------------------------------------------------+
| Execute Command                | <ENTER>                 |
+----------------------------------------------------------+


+----------------------------------------------------------+
| Commandbuffer manipulation keys                          |
+----------------------------------------------------------+
| Display contents of Fifo-buffer| <KP9>          = SHOFIF |
| Recall Command from Fifo       | <PF3>                   |
|                                | or <GREY>      = RECALL |
+----------------------------------------------------------+


+----------------------------------------------------------+
| Commandtranslation keys                                  |
+----------------------------------------------------------+
| Translate  Command synonym     |                         |
|             without execution  | <KP7>          = TRANSL |
| Show Command Synonym Buffer    | <KP8>          = SHOSYN |
+----------------------------------------------------------+

+----------------------------------------------------------+
| Miscellaneous keys                                       |
+----------------------------------------------------------+
| Show version                   | <PF1><KP8>              |
|                                | or <BLUE><KP8> = VERS   |
| Show free pool                 | <PF1><KP9>              |
|                                | or <BLUE><KP9> = FREE   |
| Keypad Lay-out                 | <PF2>                   |
|                                | or <RED>       = KPHELP |
+----------------------------------------------------------+
.ELI
.ENA SPEC
.PG
.HL1 Building MCE
This section deals with the generation  of the MCE-task.
The distribution contains the following files.
.B
.LS 0,-
.LE MCE.MAC########Macro source file
.LE MCEBLD.CMD#####ICP commandfile to build MCE
.LE MCEREL.DOC#####Release notes
.LE MCE.RNO########Source of this manual
.LE MCE.DOC########This manual ready to print
.ELS
.B
To build The MCE-task you need the following files :
.B
.LS 0,-
.LE MCE.MAC
.LE MCEBLD.CMD
.LE LB:[1,1]VMLIB.OLB
.ELS
.B
If this is the case then you can start the building by typing :
.B
.I 4,@MCEBLD            (this works with MCR and DCL)
.B
Next you are asked to answer the questions about which options
you want to be included in MCE. The questions that are asked are
about :
.B
.LS 0,-
.LE MULTIPLE CLI SUPPORT
.LE INIT-FILE SUPPORT
.LE COMPOUND COMMANDLINE SUPPORT
.LE STATUSLINE SUPPORT
.LE STARTUP AND EXIT MESSAGES
.LE TYPE OF RT: DETECTION
.LE VT2xx/VT3xx SUPPORT
.LE TANDBERG TDV2230 SUPPORT
.LE EDT-KEYPAD SUPPORT
.LE EXTENDED PROMPT SUPPORT
.LE AUTO INSERT/OVERSTRIKE DEFAULTS
.LE SAVE OLD COMMANDS DEFAULT
.LE SAVE INTERNAL COMMANDS DEFAULT
.LE TERMINAL TIME-OUT SUPPORT
.LE MINIMAL CMD-LINE LENGTH
.LE MAXIMUM ENTRIES IN FIFO
.LE HELP FILE
.ELS
.B
MCEBLD.CMD creates the following files:
.B
.LS 0,-
.LE MCE.HLP########Help file
.LE MCEPRE.MAC#####Conditional assembly prefix file
.LE MCEASM.CMD#####MACRO commandfile
.LE MCETKB.CMD#####TKB commandfile
.ELS
.B
.B
Than  MCEBLD.CMD invokes:
.B
.I 12,MAC @MCEASM
.I 12,TKB @MCETKB
.B
When present MCE will be built with FCSFSL.STB or FCSRES.STB
.B
A sample build-session can be found in Appendix B
!
.HL1 Known problems 
.HL2 DCL and installed tasks
MCE has some problems with DCL and installed tasks. DCL does
not wait for installed tasks to complete. Compare the two examples below:
.LIT

        MCR                     DCL

        +>INS $FOO/TASK=FOO     +$ INS $FOO/TASK=FOO
        +>RUN FOO               +$ RUN FOO
        >                       +$

.ELI
To solve this add the following line to MCEINI.DCL :
.B
.I 8,R*UN := RUN 'P1'/STATUS:TASK

.HL2 Problems with older versions of RSX :
You may get undefined reference from the taskbuilder when building MCE on
an older RSX system :
.B
.I 8,T.V2XX - Terminal definitionbit for VT2XX.
.B
The RSX-system you are running on does not support the VT2xx terminal.
Include "GBLDEF=T.V2XX:36" in MCETKB.CMD and build MCE again with
"@MCEBLD#LINK". To use the VT2XX functions use MCR command "SET#/TERM=TI:36"
.B
.I 8,SD.TI  - Functionbit for $SDIR directive
.B
The RSX-system you are running on does not support the SDIR$ directive.
Include "GBLDEF=SD.TI:6" in MCETKB.CMD and build MCE again with
"@MCEBLD#LINK". 
.B
.HL2 MCE on RT: and LAT terminals
A terminal on an RT: or LAT line that has a task running that attaches the
terminal can give some problems. When the line becomes disconnected by
network time-outs or manual interference the system tries to log-out the line.
On those lines BYE cannot do I/O if the attached task has a priority higher
than BYE. This is an RSX problem. MCE is a task that attaches the terminal and
can give problems as mentioned. If BYE is installed with a higher priority
than MCE (#e.g. MCE 60 and BYE 70#) the problem with MCE is solved.
!
.HL2 Remarks on 8-Bit terminals and lines
A VT2xx/VT3xx terminal in 7-bit mode always sends "normal" escape-sequences :
.B
.I 8,PF1#=#ESC#[#P#########(#33,##33,##120#)
.I 8,F20#=#ESC#?#3#4#~#####(#33,##77,###63,#64,#176#)
.B
The EBC, RPA, PASTHRU settings of the TI: donot have influence on the right
processing of those keyes.
.B
A VT2xx/vt3xx terminal in 8-bit mode sends other sequences :
.B
.I 8,PF1#=#SS3#P###########(#217,#120#)
.I 8,F20#=#CSI#3#4#~#######(#233,##63,##64,#176#)
.B
In this case the EBC, RPA, PASTHRU settings of the TI: do have influence.
Although they do different things one of the options MUST be on to let MCE
see the keypad keys.
.BR
The IO.RST used by MCE sees the folowing terminating characters in
IOSTB+1 :
.B
.LIT
        EBC      RPA    PASTHRU    SS3      CSI      MCE
       ----------------------------------------------------
         0        0        0         0       33     not OK
         0        0        1        17       33       OK
         0        1        0        17       33       OK
         0        1        1        17       33       OK
         1        0        0       217      233       OK
         1        0        1       217      233       OK
         1        1        0       217      233       OK
         1        1        1       217      233       OK
.ELI
!
.S2
Always look at the release notes in MCEREL.DOC to see the latest information.

.AX Example of an Init-file:
.DIS SPEC
.LIT
!
!       LB:[1,2]MCEINI.MCR
!
        MCE   STATUS   ON
        MCE   SVINTERN OFF
!
        ?               := HELP
        AS*SEMBLE       := MAC @'P1'ASM
        CO*PY           := PIP 'P2'/NV='P1'
        D*IR            := DIR
        FO              := FOR @'P1'FTN
        F20             := CLR
        LI*NK           := TKB @'P1'TKB
        MO*VE           := PIP 'P2'/NV='P1' & PIP 'P1';0/DE/NM
        RE*NAME         := PIP 'P2'='P1'/RE
        R*UN            := RUN
        BLD             := MAC @'P1'ASM & TKB @'P1'TKB
!
! MCR Commands ...
!
        CLR             ! Clear screen
        MCE ECHO ON     ! Echo on
!
! ***WARNING*** -- The system will be down for PM next friday
!
        MCE ECHO OFF    ! Echo off
        TIM             ! Show time
!
! End of LB:[1,2]MCEINI.MCR
!
.ELI
.ENA SPEC

.AX A sample MCE build-session
.DIS SPEC
.PF 3,57,8,70
.LIT
>@MCEBLD

MCEBLD.CMD -- Commandfile to build the MCE commandline editor V4.22

This commandfile builds YOUR version of MCE. It prompts for several
options to be build in MCE. It creates a conditional assembly
definition file called MCEPRE.MAC, two command files MCEASM.CMD and
MCETKB.CMD and optionaly a helpfile MCE.HLP. If you already have those
files you can restart MCEBLD with "@MCEBLD MAC" to assemble and
taskbuild or "@MCEBLD LINK" to taskbuild.

MCEBLD -- Give <RETURN> to continue .....

*****

The standard CLI ( Command Line Interpreter) of RSX is MCR.
When your system supports the use of other CLIs such as DCL than
include multiple CLI support in MCE.

MCEBLD -- Want the multiple CLI support [ D:N ] ? y

*****

When init file support is included MCE reads initialisation files
which can contain Command definitions Internal- and CLI- commands.

Files are searched in this order:

   LB:[1,2]MCEINI.xxx, followed by SY:<cur_dir>MCEINI.xxx,

where "xxx" is the name of the CLI defined for the terminal invoking
MCE and "cur_dir" is the default directory at the startup of MCE.

This algorithm divides command-definitions into 2 groups:
A system-wide set in LB:[1,2], followed by a users private set in
SY:<uic>

MCEBLD -- Want the MCEINI file support [ D:N ] ? y

*****

MCE allows definitions of compound commands.
Using the ampersand (&) sign one can define an MCE command as a
sequence of multiple CLI commands :

              E.g.    +>STAT := TIM & PIP /LI & ACT /ALL ...etc.

or directly:  E.g.    +>MAC @TASKASM & TKB @TASKTKB

MCEBLD -- Want the compound command definition support [ D:N ] ? y

*****

It is possible to include statusline support.
The statusline shows the different settings and fifo parameters of
MCE and can be switched on/off with MCE STATus on/off
Line 24 is used for status information.

MCEBLD -- Want Statusline/Statusmessage support [ D:N ] ? y
MCEBLD -- Want Statusline ON by default         [ D:N ] ? y

*****

The startup and exit messages like :

  "MCE -- CLI-Commandline-Editor V4.22"   and   "MCE -- Exit"

are optional.

MCEBLD -- Want Startup and exit messages [ D:N ] ? y

*****

When starting MCE via a remote terminal (RT:) problems may occur if
the local system is VMS with its commandline editor enabled.
MCE can detect if it was started via a remote terminal and can do
3 different things :

   1. Give the folowing message:

       MCE -- ** WARNING ** Started on a remote terminal (RT:)
              If your local system is VMS with its commandline-
              editor enabled please type "MCE EXIT"

   2. Give the folowing message and exit :

       MCE -- Started on a remote terminalline (RT:) Exiting .....

   3. Do nothing


MCEBLD -- Which option [ D:1 ] :

*****

VT2xx and VT3xx support enables the use of keys <F11>, <F12> and
<F13> as <ESC>, <BS> and <LF>.  The keys <HELP>, <DO> etc. can
also be used and it is possible to define the functionkeys
<F6> .. <F20> like :
                      "F6 := TIM"

pushing <F6> gives the time of day then.

MCEBLD -- Want the VT2xx, VT3xx support [ D:N ] ? y

*****

Also the keys of a TANDBERG TDV2230 terminal can be defined.

MCEBLD -- Want the TANDBERG TDV2230 function key support [ D:N ] ? y

*****

Some edit functions can be performed on the VT1xx/VT2xx/VT3xx keypad,
similar to KED and EDT.
The Keypad-editing can be switched on/off with MCE KEYPad on/off

MCEBLD -- Want the EDT-Keypad support   [ D:N ] ? y
MCEBLD -- Want EDT-Keypad ON by default [ D:N ] ? y

*****

The MCE prompt can show if overstrike- or insert-mode is active
by "+" and "-".
Also it can display if keypad editing ( when selected ) is enabled
when the statusline is off by ":"

  eg.    "+:>"

The Extended prompt can be switched on/off with MCE PROMpt on/off

MCEBLD -- Want the extended prompt           [ D:N ] ? y
MCEBLD -- Want Extended prompt ON by default [ D:N ] ? y

*****

Default overstrike- or insert-mode stayes active until it is
changed by CTRL/A.  MCE can be build so that it sets one of the
modes active by default when it prompts for a new command.
This can be changed with the MCE INSErt on/off and MCE OVERstrike
on/off commands.

MCEBLD -- Want MCE to set insert-mode back by default     [ D:N ] ?
MCEBLD -- Want MCE to set overstrike-mode back by default [ D:N ] ? y

*****

Default "old" commands ( retrieved from fifo and not edited ) are
saved again in the FIFO. MCE can be build so that it does not save
them again.
This mode can be changed with the  MCE SVOLd on/off command.


MCEBLD -- Want MCE to save "Old" Commands by default [ D:N ] ?

*****

Default internal commands are saved in the FIFO. MCE can be build
so that it does not save them.
This mode can be changed with the  MCE SVINtern on/off command.


MCEBLD -- Want MCE to save Internal Commands by default [ D:N ] ?

*****

When terminal time-out support is included the terminal is logged
out after a given time-out time ( TT0: only exits MCE )

MCEBLD -- Want the terminal time-out support       [ D:N ] ? y
MCEBLD -- Enter number of time-out minutes [ 2..120  D:4 ] : 120

*****

Only commandlines with a length greater than or equal to a given
length are saved in the command FIFO.
The value can be changed with the MCE CMSZ nn command.
MCEBLD -- Enter minimum commandline length [ 1..10  D:1 ] : 4

*****

Specify the default maximum number of commands which can be saved in
the commandline Fifo.  The value can be changed with the MCE FISZ nn
command. Note that the actual number of commands that can be saved
depend on the size of the commands and the available MCE pool space.
Information about MCE's poolspace can be obtained by the MCE FREE
command. More poolspace can be created by installing MCE with a
larger increment. INS $MCE/INC=xxx
A value of 2400 will be enough in most cases.

MCEBLD -- Enter maximum number of entries in FIFO [ 1..99  D:22. ] :

*****

MCEBLD -- Build MCE as a multi-user task   [ D:N ] ? y
MCEBLD -- Build MCE as an I & D Space task [ D:N ] ? y

*****

A helpfile MCE.HLP customized to your selections is created dynamicly
if you answer "Y" to the following question.
Note that if you donot build the helpfile now, you canot use the
<NEXT-SCREEN> and <PRV-SCREEN> keys to walk through the helpfile.

MCEBLD -- Create helpfile on LB: [ D:N ] ? y
MCEBLD -- What is your helpfile UIC [ D:[1,2] ] :

*****

The helpfile can be created in two different versions.

VERSION 1 :  You can access this one by typing HELP MCE [topic...]
             but you have to include a reference like :
                 1 MCE
                 @MCE
             in  MCR.HLP and DCL.HLP

VERSION 2 :  You can access this one by typing HELP /MCE [topic...]
             This version does not need any editing of MCR.HLP and
             DCL.HLP

MCEBLD -- Do you want VERSION 2 [ D:N ] ?

MCEBLD -- When ready and successfull copy to LB: device [ D:N ] ?
MCEBLD -- Print listing and map [ D:N ] ?
MCEBLD -- Creating helpfile LB:[1,2]MCE.HLP .....
PIP LB:[1,2]MCE.HLP/PU/NM
MCEBLD -- Creating configuration prefixfile MCEPRE.MAC .....
MCEBLD -- Creating MAC-commandfile MCEASM.CMD .....
MCEBLD -- Creating TKB-commandfile MCETKB.CMD .....
PIP MCEASM.CMD/PU/NM,MCEASM.CMD
MCEBLD -- Assembling MCE .....
MAC @MCEASM
PIP MCE.OBJ/PU/NM,MCE.LST
PIP MCEPRE.MAC/PU/NM
MCEBLD -- Building MCE .....
PIP MCETKB.CMD/PU/NM
TKB @MCETKB
PIP MCE.TSK/PU/NM,MCE.MAP
MCEBLD -- Procedure done
>
.ELI
.PF 3,57,8,64
