		Modifications to RSX11M V3.2
		_____________________________


MCR CHANGES
-----------

	Three changes are made in MCRDIS.  The first alters the test for a
valid command being 3 characters long. If a command is less than 3 characters
long it is assumed that the catchall task should immediately get a crack
at it.  Hence, $MERRN is incremented to show no task found and a jump to
DISERR is made whereupon the rest takes care of itself.  Likewise, if a command
consists of three RAD50 characters followed by a non-RAD50 character(normally
a syntax error) the command is dispatched to ...CA.  Secondly, leading
control characters and spaces are no longer counted as part of a command
they are instead ignored. The third modification is to facilitate the use
of the procedure interpreter, ie make it as easy to use as INDIRECT.
Since '@' stands for indirect execution and interpretation of a command
file, '#' is taken to mean 'direct' execution(no fancy interpretation)
of the command file. Hence the command '#CMDFIL' will issue a 'PIN CMDFIL'.

AT.
---

	Modifications (mostly very small) are made to some segments of
the indirect command file processor to enable /-LI (/LI is default mode).

INDFIL		This is modified by the addition of the switch "LI".


INDINX		This is modified to initialise the options to /LI/-TR/MCR
		and ENABLE GLOBALS, SUBSTITUTION, LOWERCASE.


INDMCR		This has three tests for the NOLIST bit inserted in it, causing
		parts of the text not to be displayed. This includes real MCR
		commands and lines beginning "!".


INDROT		This has simply the global definition NOLIST==1
 
INDSU1		This mod enables existing MPLUS code if $LBUIC added to $SYSCM.

MGCML		This is the module handling the indirect command file operations.
		If the command file can not be found on the first directory it
		tries a second directory (LB:[1,5]).
 
INDIMP		This file implements stop bit support for Indirect by changing
		the conditional R$$MPL to R$$MPL!S$$TOP.
 
INDPDW		This file implements stop bit support for Indirect by changing
		the conditional R$$MPL TO R$$MPL!S$$TOP.

INDOPN		A bug exists in INDOPN.  It maintaines an internal FDB so that FDB
		space is only used up in the overlay, not the root.  Now the UIC
		upon which TI: is sitting is stored immediately following the FDB
		(INTFDB:).  However, the FDB region does not implicitly allocate
		space for the UIC, and  no explicit space was left either. The
		effect of this was that the current UIC would overwrite the first
		word of an adjacent module with the UIC.  Usually this has no ill effect
		since IND is so heavily overlayed.  The next IND command would bring
		in a new overlay and all would be fine.  However, under certain
		circumstances ...AT. would crash with odd address traps, IOT's, BPT's,
		(u-name-its) and very occasionally CRASH the system.  To crash a system
		one would have to issue 2 .TESTFILE's one after the other(no intervening
		instructions) and be sitting on the right UIC(I'm not telling which ones).
		Anyway, the correction file for INDOPN fixes the problem.  The fix was given
		to me by the maintainer. It probably won't be out in the Software
		Dispatch(.TESTFILE is not supported) but may be included in the AUTOPATCH
		kit.

		Two additional commands are added, .ENABLE/.DISABLE NOMCR and NOTRACE.
		These commands enable and disable the /MC and /TR switches respectively.



INS
---

	The modifications to INSTALL to support /PRM=text and /PRM="TEXT"
	are minor but scattered over a three files. This modification also
	enables     RUN filespec/PRM="text"  where 'text' is a command line
	to pass to the task when it is run. By appending a /TASK=...XYZ  
	the task XYZ is temporarily installed as an MCR command and will
	correctly spawn(and then remove) if other users try to use it.

INSHD	The code for the insertion of the MCR command line is added in after
	setting the status bits in the task header.  This module also contains 
	the code necessary to assign run privleges on a user by user
	basis.  It is used with the KMS Accounting Enhancements package.
	If it is not wished to implement this package, the appropriate
	sections of the SLP file should be removed.  The audit trail
	indicates which code goes with which feature.

INSROT	An 80 byte buffer with a preset 3 character + space header is set up
	for the prototype to pass to the user task. The only task I know which
	objects to being called with a random name is TECO.

INSPS	The code for the parsing of switch /PRM= itself.




CCL
---

	This program is the result of optimising a Fortran IV Plus program
which was initially used for two months about two years ago. Despite the size
(about 12k) the program proved useful.  The current program is about 4k
(3k with F4PRES).   It has been added to extensively without rewriting
so it is in somewhat motely shape, however, it works very well.  With
some work it could be made smaller.  The program flow is fairly simple.

	0	Get mcr command line and extract keyword from it.
		Check to see if the command is contained within the internal
		tables.  If yes, process directly and exit.  If no, go to 1.

	1	FIND USERCCL.CCL in SY: current user.
		IF not present goto 4

	2	Lookup keyword of up to 8 chars in current file
		IF found goto 7

	3	close current file

	4	FIND [1,5]SYSCCL.CCL on LB:.
		IF not present give error & exit

	5	lookup keyword in file. If present Goto 7

	6	close file, print failed message ?keyword?

	7	get any required parameters

	8	find substitution line and insert parameters.

	9	submit command.

There are of course exceptions. If the keyword is not found and its last char
is "?" then the command "? keyword" is tried. Thus help? can be made to list the
names of all subjects on which help can be found, while file? gives "HELP FILE".

	The command keywords are matched to 8 characters and parameters may be
up to 30 characters each. If a request for a required parameter is answered by
CTRL/Z then the program abandons the command.




CCL was developed as a fortran program, the current version was initially 
compiled in F4P and the compiler listing of the program then attacked to
give the current result. The straight access to records from GET$ is more
suited to the job than the Fortran 80A1 which it replaced....

Subroutines:

GETMCR		The F4P library routine. Building with F4PRES is very 
		advantagious.
SPWNMCR		A short routine to spawn the command line to MCR, stop for
		completion if required, set exit status, and exit.

OPEN		Opens the file whose dataset descriptor pointer is in R1
		if it fails to open then jumps to the address in R2.
CLOS		Closes the current open file.
TYPEIT		Types an error message from an ASCIZ at R0.
PRMPT		Called for each line beginning "?n" , If params up to
		n are defined returns, else outputs the text message of the
		prompt and reads back the answer. a CTRL/Z causes CCL to 
		exit.
LOOKUP		Scans the open file for a match for the users keyword. If not
		found returns R0=0, if found R0<>0
FIXUP		fixes up the parameters in the prototype line.

CCL COMMAND FILE FORMAT
-----------------------


	The CCL command file has a rigid format, some fields of which were
intended to be used but which have been lost in the mists of time.
A command specification consists of a number of keyword lines, followed
by a number of parameter lines and finally by an action or skeleton command
line.

	example:

	$1111M
	$2811ASSEMBLE
	?1Filename
	*MAC %1%=[1,1]exemc/ml,[11,10]rsxmc/pa:1,[12,10]%1%
	$1411TYPE
	$2411LIST
	?1File to be listed
	*PIP TI:=%1.MAC%%2,.MAC%%3,.MAC%
	$2822COMPARE
	?1Files
	?2Output
	*CMP %2.SLP%/SL=%1;-1%,%1;0%

The commands " M file " and "ASSEMBLE FILE" have the same effect, they
create an object file from the source in [12,10]. The command ASSEMBLE given
without any parameters would result in the prompt "Filename?" since the 
specification for the command requires at least one parameter, and it is to
prompt for one parameter if it is not present. The specification ensures that
"M " is matched by the single character alone, and ASSEMBLE by the characters
AS ASS ASSE ASSEM thru ASSEMBLE.




	KEYWORD LINES
	-------------

$mnpqKEYWORD	First line of a command set
			there may be many keyword lines for the same action line

		m	Minimum number of characters to match
		n	Maximum number of characters to match (extra ignored)
			(ignored in current version but must be present)
		p	Minimum number of parameters required
			If this number of parameters is not present then
			parameters will be prompted for.
		q	Maximum number of parameters to question for.
			In the case where prompting occurs then this number
			is the highest prompt to be requested

		the keyword may consist of up to 8 characters to be matched
		identically by the CCL processor. The only terminators for
		the keyword typed by the user are <space> and <carriage return>.



?nQUESTION	where n is the parameter number ( they should be in order )
		in the range 1-9 . If the correct number of parameters are
		supplied no questions are asked, otherwise questions are
		asked and the associated parameters are filled in.
		If parameters are skipped then they will only have values if
		they were given on the original command line.


*COMMAND LINE parasub1 parasub2 parasub3 ......

		Command or Action lines are indicated by a '*' in column 1
		their text is copied except that parameters are substituted.

	parasub

		%n { absent } { absent } %
		   {   ,    } { .ext   }
		   {   =    } { ;gen   }

	The '%' denote a parameter substitution argument. The number n is
	the number of the associated parameter to be substituted.  Each
	parameter must be seperated by a delimiter.  Valid delimiters are:
	space, comma(','), '=','<', '<-'. A [UIC] is treated as a special 
	case in that the comma seperating the group and member numbers is
	not treated as a delimiter(all of the UIC) can be one parameter.

	The first group of optional elements denote a character to be inserted
	before the parameter if the parameter is not null.  Only ',' or '=' 
	may appear in this position(ie be inserted in front of the  parameter.
	The second group denote elements to be appended if their initial 
	character is not present in the input parameter string.  Typically
	these are only those which denote file extensions and version
	numbers.  Finally a '$' is interpreted as as an 'escape' key
	to be used in terminating the command rather than MCR.
	
 
	




from the above examples.

In assemble / M the filename given would normally be a plain name eg MCRDIS
which would result in 

	MAC MCRDIS=[1,1]exemc/ml,[11,10]rsxmc/pa:1,[12,10]MCRDIS

In list or type since the required number of arguments is set to one, and the
number of arguments to be prompted for is one the results are

TY file				->	PIP TI:=file.MAC
T file.slp			->	PIP TI:=file.slp
TYPE file,file2			->	PIP TI:=file.MAC,file2.MAC
TYPE
File to be listed?[100,3]herfile	->	PIP TI:=[100,3]herfile.MAC
COMPARE MCRDIS
Output? TI:				-> CMP TI:.SLP/SL=MCRDIS;-1,MCRDIS
CO
Files? INDROT
Output? [12,40]INDROT		-> CMP [12,40]INDROT.SLP/SL=INDROT;-1,INDROT

or alternatively with the definition
	$2722COMPARE
	?1Files
	?2Output
	*CMP %2%%1.SLP%/SL=%1;-1%,%;0%

one then has
MCR>COM
Files? INDROT
Output? [12,40]		-> CMP [12,40]INDROT.SLP/SL=INDROT;-1,INDROT;0
or
MCR>COM
Files?INDROT
Output?TI:			-> CMP TI:INDROT.SLP/SL=INDROT;-1,INDROT;0

 however altering this to
	$2712COMPARE
	..........
 leads to
MCR> COM INDROT		-> CMP INDROT.SLP/SL=INDROT;-1,INDROT;0
MCR> COM INDROT TI:	-> CMP TI:INDROT.SLP/SL=INDROT;-1,INDROT;0
and
MCR> COMPARE
Files?INDROT
Output?TI:		->       ditto
 because the number of parameters to prompt for was set to 2 if the required #
of 1 was not present.

SAVE
----

	The minor patches to save are the change of name( choose your own)
and to avoid the overwriting of the prompts from saves startup.

This because it inserts CR or LF before text commands only works when MCR
ignores leading control characters
