Command Services site map

Command Services List
Modules are able to present a list of command services to the core. The list is a linear array made up of individual command service definitions, each of which define a single command supported by the module. These commands can then be invoked by a user by typing the name of the command in a script file or on the command line.

The definitions in the command services list must be in alphabetical order by command name. A 2-byte (16-bit) zero value terminates the list.

Command Service Definition
Offset Size Description
0 2 bytes service routine pointer
2 2 bytes flags
4 2 bytes name pointer
6 2 bytes description text pointer
8 2 bytes help text pointer
Service Routine Pointer
This is the offset into the module segment of the handler routine that processes this command.
Flags
This field is a set of flags that determine how the command is handled. The bitfields are defined as follows:
Bit Field Description
[0] Ignore pretend this command is not in the list
[1] Hide don't display info about this command
[2] Console command available for use on the console
[3] Script command available for use in scripts
[15:4] Reserved these flags are reserved for future use
Name Pointer
This is the offset into the module segment of the command name, a null-terminated string.
Description Text Pointer
This is the offset into the module segment of the command description, a short string presented to the user in the master command list. If no description is provided, this field should be zeroed out.
Help Text Pointer
This is the offset into the module segment of the command help text, a small paragraph presented to the user when command-specific help is requested. If no help is provided, this field should be zeroed out.

Service Routine Environment
Call Context
The command service routine is called by the core with the following context:
Register Contents
alcommand source (Command.Console or Command.Script)
sioffset of command line tail (located in core segment)
csmodule segment
dsmodule segment
esmodule segment
gsCore Services Table segment
ss:spglobal stack, far return pointer on top
Note: Command.Console and Command.Script are defined in cdshell.inc.
Return Context
The core expects the following context upon return from the service routine:
Register Contents
ss:spglobal stack, far return pointer popped

- Previous - - Next -