 
	PARSIZ.TXT					16-APR-80
 
 
RSX11M WILL ALWAYS EXPAND (OR CONTRACT) THE LAST SYSTEM PARTITION
TO FILL ALL OF THE AVAILABLE MEMORY.  THIS WILL NORMALLY BE THE 
'GEN' PARTITION.  OFTEN, IT IS DESIRABLE TO ADD A PARTITION TO THE
END OF THE SYSTEM.  THIS CAN BE REQUIRED BY THE ADDITION OF A
COMMON AREA OR THE NEED TO GUARANTEE MEMORY FOR SOME REAL-TIME
TASK.  NORMALLY THIS WOULD REQUIRE A NEW SYSGEN (AT LEAST PHASE 3),
AS THE GEN PARTITION CANNOT BE DESTROYED BY THE 'SET /NOMAIN'
COMMAND BECAUSE MOST SYSTEM TASKS ARE INSTALLED IN 'GEN'.
 
TO RESOLVE THIS PROBLEM, A TASK HAS BEEN CREATED CALLED "PARSIZ".
THIS TASK WILL ACCEPT A COMMAND LINE SPECIFYING THE PARAMETERS
WHICH WILL CAUSE IT TO REDUCE THE UPPER LIMIT OF THE PARTITION.
ALTHOUGH DESIGNED TO WORK WITH SYSTEM PARTITIONS, IT COULD WORK
WITH A TASK OR COMMON PARTITION.  THE TASK WILL TEMPORARILY STOP
TASK SWITCHING WHILE IT CHECKS FOR ANY MEMORY CONFLICTS AND THEN
IT WILL UPDATE THE PARTITION CONTROL BLOCK.  IF ANY ERRORS ARE
DETECTED, THE TASK WILL SIMPLY REPORT THE PROBLEM AND EXIT.
 
ONCE THE PARTITION HAS BEEN CHANGED THE USER MAY THEN USE THE
'SET /MAIN' COMMAND TO CREATE ANY NEW PARTITION.  THE MEMORY
LOST FROM THE PARTITION MAY NOT BE ADDED BACK TO THE PARTITION
WITHOUT REBOOTING OR DESTROYING THE PARTITION AND RECREATING IT.
 
THE DEFAULTS FOR THE TASK (USED IF NO COMMAND LINE IS PASSED, ARE
THE 'GEN' PARTITION, AND AN UPPER LIMIT OF 96K WORDS.  THESE MAY
BE CHANGED IN THE MAIN MODULE PARSIZ.  THIS WILL ALLOW THE TASK
TO BE 'RUN' RATHER THAT HAVING TO BE INSTALLED AND THEN CALLED
BY THE 'MCR' TASK.  THE USER MUST BE PRIVILEGED TO USE THE TASK.
 
WRITTEN FOR RSX11M VERSION 3.2 THIS TASK MAY BE MODIFIED FOR OTHER
VERSIONS.  IT SHOULD WORK, UNMODIFIED, FOR ALL PREVIOUS VERSIONS.
AS IT DOES USE SOME SYSTEM MACROS NORMALLY FOUND IN RSXMC.MAC
AND EXEMC.MLB, CARE SHOULD BE USED WHEN MODIFYING THE TASK.
ALL MACRO AND SYMBOL DEFINITIONS, EXCEPT THOSE FOUND IN THE
SYMBOL TABLE [1,54]RSX11M.STB, ARE INCLUDED IN THE TASK.  THIS
REDUCES THE EFFORT REQUIRED TO FIRST BUILD THE TASK.
 
THE GENERAL FORM OF THE COMMAND LINE IS:
 
       XXX[...] [/PAR=PNAME][/SIZE=PSIZE]
 
WHERE	XXX[...] - THE TASK NAME.
        PNAME    - THE NAME OF THE PARTITION TO BE REDUCED IN SIZE.
        PSIZE    - THE NEW UPPER LIMIT OF THE PARTITION IN UNITS
        	   OF 64 BYTES BLOCKS.  THE VALUE MUST BE OCTAL.
 
THE TASK WILL NOT EXIT WITHOUT PRINTING ONE OF THE FOLLOWING:
 
	<PARSIZ> -- SUBPARTITION OVERLAPS FREE AREA
	<PARSIZ> -- PARTITION END IS BELOW OR EQUAL TO THE LIMIT
	<PARSIZ> -- PARTITION IS LOCATED ABOVE THE LIMIT
	<PARSIZ> -- UNABLE TO FIND THE PARTITION
	<PARSIZ> -- SIZE OF PARTITION HAS BE UPDATED
	<PARSIZ> -- USER IS NOT PRIVILEDGED.
	<PARSIZ> -- SYNTAX ERROR
 
THE ONLY FILE REQUIRE TO CREATE THIS TASK ARE:
 
	PARSIZ.CMD
	PARSIZ.MAC
	PSZPRS.MAC
 
THE PARSIZ.CMD FILE IS AN INDIRECT COMMAND FILE TO ASSEMBLE THE
SOURCE FILES, CREATE A TASKBUILDER COMMAND FILE, AND TASKBUILD
THE NECESSARY OBJECT FILE.  IT DOES REQUIRE THAT THE USER
PROVIDE THE SYMBOL TABLE FILE LB:[1,54]RSX11M.STB WHICH CORRECTLY
DEFINES THE SYSTEM ON WHICH THE TASK WILL RUN.
