|
This is used to determine whether a file is a valid CD Shell module or not. It is four bytes long and contains the characters '-CDS'.
|
|
The first two bytes of the module signature are replaced by a unique identifier when the module is loaded by the core. This identifier is used to refer to the module when requesting certain core services.
|
|
This field represents the version of the module format used. Currently CD Shell uses module format M.4, represented by the value 0x0010. Future versions of CD Shell may require modules to be structured differently, and so would have some other value in this field.
|
|
This field represents the ammount of BSS space (uninitialized data) a module requires. The BSS space is allocated at the first paragraph (16-byte boundary) following the module. The total module size, including header and BSS space, cannot exceed 64kb.
|
|
This field points to a null-terminated module name string. If no module name is specified, this field should be zeroed out.
|
|
Initialization Routine Pointer
|
|
A pointer to an initialization routine can be located here. The core will call this routine as soon as the module is loaded into memory. If no initialization routine is present, this field should be zeroed out.
|
|
A pointer to a cleanup routine can be located here. The core will call this routine before it CD Shell terminates. This is a cue to the module that it should restore the system to a clean state so that the boot process may proceed. If no cleanup routine is present, the field should be zero.
|
|
Command Services List Pointer
|
|
This field points to a list of command services provided by the module. If no command services are provided, set this field to zero.
|
|
Function Services List Pointer
|
|
This field points to a list of function services provided by the module. If no function services are provided, set this field to zero.
|
|
Hotkey Services List Pointer
|
|
This field points to a list of hotkey services provided by the module. If no hotkey services are provided, set this field to zero.
|
|
Macro Services List Pointer
|
|
This field points to a list of macro services provided by the module. If no macro services are provided, set this field to zero.
|
|
Core Services Table Segment
|
|
When the module is loaded into memory, the core will patch this field with the segment where the Core Services Table is located.
|
|
When the module is loaded into memory, the core will patch this field with the segment where the core command buffer is located.
|
|
Core Command Buffer Pointer
|
|
When the module is loaded into memory, the core will patch this field with the offset of the core command buffer. This buffer is used to pass parameters to the command service routine, and to pass commands back to the core for processing.
|
|