                            ASSIGN/CMD Commands


ASSIGN/CMD command structure:

    ASSIGN [(parameters)]


ASSIGN/CMD functions include:

    1.  display the current logical drive assignments,

    2.  allow the reassignment of any LOGICAL, PHYSICAL, MEMDISK, or HARD
        DISK to any logical drive,

    3.  removes the TRSDOS 6.X requirement that the SYSTEM be assigned to
        logical drive 0 - the SYSTEM drive can now be assigned to any logical
        drive,

    4.  allow the TRSDOS system overlays to be allocated between Memdisk and
        the floppy disk drive designated as the System Drive, and

    5.  transfer the system overlay files to memdisk, if installed.

    Logical drives 0 - 7 and physical drives 0 - 3 are supported.


The parameters are:

Ln=d  where  n  is the Logical Drive Number (0-7) of the drive to be
    reassigned and  d  is the Logical Drive Number (0-7) to which it is to be
    assigned.  The logical drive number determines the order in which drives
    are searched for non-system files.

Pn=d  where  n  is the Physical Drive Number (0-3) of the drive to be
    reassigned and  d  is the Logical Drive Number (0-7) to which it is to be
    assigned.  P0 and P1 are the lower and upper floppy disk drives,
    respectively.  P2 and P3 are the external floppy drives, if installed.

MEM=d  assigns the Logical Drive associated with MEMDISK to Logical Drive  d
    (0-7).  If this parameter is used and Memdisk has not been installed,
    ASSIGN will abort.  May be abreviated to M=d.

HARD=d  assigns the Logical Drive associated with the HARD DISK driver to
    Logical Drive  d  (0-7).  If this parameter is used and a hard disk driver
    has not been installed, ASSIGN will abort.  May be abreviated to H=d.

SYS=d  sets Logical Drive  d  (0-7) as the SYSTEM drive.  Unless the required
    /SYS overlays have been SYSRESed, this Logical Drive must contain a System
    Disk.  May be abreviated to S=d.

SCPY[=n]  when used without the n value SCPY transfers the TRSDOS system
    overlay file access files (SYS1,2,3/SYS) to memdisk, if installed.  If the
    n value is specified, then system overlay #n is also transfered to
    memdisk.  SYS0/SYS, BOOT/SYS, and DIR/SYS cannot be transfered using the
    SCPY parameter.  The default value of SCPY is 0 (OFF).  See SEQ parmeter
    for additional functions.

SEQ[=n]  sets how many system overlay files, starting with the number
    designated with the SCPY n value, are to be transfered to memdisk.  The
    default value is one.  If SEQ and SCPY are entered without an n value, the
    entire system is transfered to memdisk.  If SCPY < 4, ASSIGN will adjust
    the value of SEQ so as to not recopy system overlay files 1, 2, and 3.  If
    the adjusted value of SEQ is greater than 13 (the highest system overlay
    file number) or if SEQ is entered without an n value, the remainder of the
    system starting with the system overlay file designated by the SCPY n
    value is transfered to memdisk.  SEQ has no effect if SCPY = 0.

D=[NO] or [OFF]  inhibits displaying the final Logical Drive assignments.  If
    there have been no changes,  D=  is without effect.

QUERY=[NO] or [OFF]  automatically accepts proposed Logical Drive assignments
    without prompting.  May be abreviated to Q=.

INSTAL  installs the high memory module and device control block (DCB), but
    does not activate the system loader patch.  Therefore, all of the memory
    required by ASSIGN will be claimed without activating the high memory
    module.  Any subsequent use of the SYS parameter will activate the system
    loader patch to utilize the high memory module when searching for SYSTEM
    files.  (When entered on the same command line, the SYS parameter is
    processed after the INSTAL parameter.)  The DCB generated by ASSIGN is
    named 'a '.  For safety reasons it is not accessable via any of the TRSDOS
    device-related library commands.  It is imperative that only ASSIGN
    perform all required operations on this DCB.  If the high memory module is
    already active, INSTAL will leave it and the DCB in place and inactivate
    the system loader patch to the high memory module.

CHECK=n  tests for the presence of system overlay SYSn/SYS.  n must be 0 - 13
    or this parameter will be ignored without returning a parameter error.
    ASSIGN tests for the presence of a SYSTEM disk by attempting to load
    certain system overlays.  Unless NOTEST is set, SYS1/SYS is always
    searched for.  However, since one function of ASSIGN is to allow some
    system overlays on Memdisk, and it is assumed that SYS1/SYS will be one of
    those overlays transfered to Memdisk, testing for SYS1/SYS is not an
    adequate test for these situations.  Therefore, ASSIGN also performs a
    second test for SYS12/SYS (the CHECK default).  You can change the system
    overlay searched for in this second test by using the CHECK parameter. 
    CHECK=0 will inhibit the second test.  The CHECK test is not performed if
    NOTEST is set.  CHECK=n may be abreviated to C=n.

RESET  sets the current System logical drive as Logical Drive 0 and removes
    the patch vector from the System loader.  If the memory used by the high
    memory module can be recovered (if it was the lowest module in high
    memory), then the TRSDOS HIGH$ pointer will be changed and the ASSIGN DCB
    removed.  If high memory cannot be recovered, the DCB will be set to an
    inactive state.  All other parameters except D are inactive if RESET is
    set.

NOTEST  inhibits the testing of the SYSTEM drive for the presence of a System
    Disk.  If NOTEST is used and the System overlays are not available, the
    system will crash.  NOTEST also sets the CHECK parameter to 0.  NOTEST
    should only be used by those with highly modified systems.

INACT  allows the SYSTEM drive to be assigned to an Inactivated Logical Drive.
    If the System overlays are not otherwise available, the system will crash.
    INACT should only be used by those with highly modified systems.


    The drive parameters are processed in the order: RESET, SCPY (and SEQ),
INSTAL,  L0-L7, P0-P3, MEM, HARD, and SYS.  When a drive parameter is
processed the Logical Drives involved are swapped.  Therefore, when entering a
parameter line it should be recalled that the Logical Drive assignments are
continuously being changed during parameter processing.



                                 EXAMPLES


ASSIGN <ENTER>

    returns the current logical drive assignments.  For a standard two floppy
    system with MEMDISK as logical 2, the result is:

*L0 = P0  +L1 = P1  +L2 = PM  -L3 = P3  -L4 = P.  -L5 = P.  -L6 = P.  -L7 = P.

    where *,+,-,$ indicate SYSTEM, ACTIVE, INACTIVE, and INACTIVE SYSTEM (not
    shown in this example) logical drives, and Pn,PM,PH,P. indicate floppy
    disk drives, MEMDISK, HARD DISK (not shown in this example), and
    UNASSIGNED physical drives, respectively.


ASSIGN (L2=1,Q=) <ENTER>

    starting with the above logical drive assignments would make MEMDISK
    logical 1 and physical drive 1 logical 2.  The reassignments, accepted
    without prompting, are:

*L0 = P0  +L1 = PM  +L2 = P1  etc.


ASSIGN (M=0,S=2,Q=,D=) <ENTER>

    starting with the logical drive assignments shown in the first example,
    this command line is useful in JCL files that install MEMDISK as logical 2
    and then transfer files to it from a set up disk.  The parameter line
    makes the logical drive associated with MEMDISK (logical 2) logical 0, the
    previous logical 0 (SYSTEM) logical 2, and then sets logical 2 as the
    SYSTEM drive.  No prompts or displays are issued, however the assignments
    are:

+L0 = PM  +L1 = P1  *L2 = P0  etc.

    System overlay loading is not slowed down, yet other disk access is
    increased as MEMDISK is now the first drive searched for a file.


ASSIGN (M=0,S=2,SCPY,Q=) <ENTER>

    this command line will perform the same operations as the previous example
    except SYS1/SYS, SYS2/SYS, and SYS3/SYS will be transfered to memdisk and
    the results of each operation will be displayed on the screen.


ASSIGN (S=1,M=0,L1=2,C=0) <ENTER>

    starting with the logical drive assignments shown in the first example,
    this command line will yield the configuration:

+L0 = PM  *L1 = P0  +L2 = P1 etc.

    This examples points out the importance of remembering that regardless of
    the order of the parameters on the command line, they are process by
    ASSIGN L0 to L7, P0 to P3, MEM, HARD, and lastly, SYS.  Therefore, L1=2
    sets Memdisk (logical drive 2) as logical drive 1 and the P1 (the top
    floppy disk drive) as logical drive 2.  Then, M=0 makes Memdisk logical
    drive 0 and the bottom floppy (the SYSTEM drive) logical drive 1.  The S=1
    then correctly sets logical drive 1 as the SYSTEM drive.  The C=0
    parameter instructs ASSIGN to only test for SYS1/SYS.


ASSIGN (SCPY=10,SEQ=3) <ENTER>

    this example will cause system overlay files 1, 2, 3, 10, 11, and 12 to be
    transfered to memdisk, if installed.  If SEQ was entered instead of SEQ=3,
    then SYS13/SYS would also have been transfered.


ASSIGN (RESET) <ENTER>

    this command line restores the current System Logical Drive to logical 0
    and removes the ASSIGN patch vector from the System loader routine.


Pressing <BREAK> will (usually) abort ASSIGN.



                             WARNINGS and ERRORS


    ASSIGN/CMD is compatible with all TRSDOS 6.2 library commands EXCEPT the
SYSTEM (SYSTEM=d) command (because it also reassigns the system logical drive.
Do NOT use the SYSTEM (SYSTEM=d) command while ASSIGN is installed and active.


    Unless NOTEST is set, ASSIGN will prompt for a SYSTEM disk if the system
overlay tested for cannot be found.  If an empty drive is tested for the
system overlay, the drive will rotate until a formatted disk is placed in it.
Otherwise, a boot is necessary.  Unless INACT is set, assigning SYSTEM to an
inactive logical drive will abort ASSIGN.  Any out of range parameters or
requests for unassigned physical, memdisk, or hard drives will also cause an
abort.


    When using the SCPY and SEQ parameters, all disk errors except 'File not
found in Directory', will cause an abort.  If the directory entry code slot
(DEC) required for a particular system overlay is occupied, the name of the
interfering file will be displayed, the particular system overlay file will
not be transfered, but ASSIGN will not abort.  If memdisk is not installed
and the SCPY parameter is invoked, ASSIGN will abort.


    As mentioned above, ASSIGN uses a device control block (DCB) named 'a '
(actually a lower case 'a' and a 19hex), to store the memory address of the
high memory module, the logical drive assignments of the memdisk, if any, and
the 'system' disk drive, and which of the above two devices has been searched
for a requested system overlay file.  Therefore, it is imperative that the
user not modify any information in the DCB.  At every invokation, ASSIGN
checks for the 'a ' DCB.  If found, the high memory module address is tested
to confirm it points to the ASSIGN high memory module.  If it does not, ASSIGN
displays a "Bad 'a ' DCB" error message aborts.


    Other errors are noted in the parameters definitions.



                     Assembly Source Code for ASSIGN/CMD


    The complete commented source code for ASSIGN is available by sending a
blank formatted diskette and sufficient postage or stamps for return mailing
to:

    Mike Zarowitz
    981 Sunset Dr.
    San Carlos, CA  94070

    (415) 595-3045

c/o: 8N1 #1 904/377-1200
