Input from the Command Router

The command router determines whether the user can issue a particular command. It will invoke the command handler if it determines that the user has the user privilege class necessary to invoke at least one of the versions of a command. The command router makes this determination based on the command or subcommand name. However, some command versions are only differentiated by a specific option that is allowed on the command line. Because a user may be authorized for more than one version of a command, CP requires that all versions of the command have the same entry point. It is up to the command handler to determine which version of the command it should perform.

When control is given to the command handler, a number of registers are initialized with information about the command. The registers contain:
Register
Contents
R0
Length of the command, as specified.
R1
Address of the command in the GSDBK.
R2
Zero
R3
First 4 bytes of the command name from the base CMDBK. Because of command aliasing, this may not be the same command name as indicated by R0 and R1. That is because the command issued may be an alias for the actual command to be invoked. For example, if the user issued MSG that is an alias of MESSAGE then the base command is MESSAGE and this register would contain the string "MESS".
R4
Second 4 bytes of the command name from the base CMDBK. (See the explanation for R3 about base CMDBKs.)
R5
Address of the base CMDBK. This is the CMDBK for one of the versions of the base CMDBK. If the command has multiple versions this address need not be the version that the command handler will select to handle.
R6
Zero
R7
Zero
R11
Address of the VMDBK of the issuer.
R13
Address of the SAVBK to be used during the call.
R14
Linkage register
R15
Linkage register

The contents of the registers that are not specified in the preceding list should be considered undefined. No assumptions should be made on their contents.

Among the information contained in the VMDBK is the address of the command GSDBK. This value is contained in the VMDCFBUF field.

In addition to specifying certain registers with information about the command being invoked, the VMDBK is in CONSOLE FUNCTION MODE. This means that the other virtual processors (VMDBKs) for this user are not actively being dispatched.