Early mid January work on the MCP
2026-01-18
This week I put some work into the Master Control Program (MCP), and a new helper utility called the Codified Likeness Utility (CLU). (Both, of course, named for programs in the Tron franchise.) The MCP is stored in a file named ldosmcp.com or ldosmcpz.com which contains the lDOS kernel, a triple-mode lDebug build, the lDOS pre-boot loader, the instsect tool to install boot sector loaders, the patldos tool to patch lDOS kernel files, an Extension for lDebug library with over 60 extensions, and newly a FreeCOM build.
CLU is in a file named clu.exe, which can be used as the file pointed to by the COMSPEC variable. It finds ldosmcp.com and replaces its own process with the MCP, with a special handshake so that the MCP will load its FreeCOM build.
patchini
-
-
-
Support the lCFGMULT00 pointer block. This is a block that points to other lCFG blocks. It must be placed on a 16-byte boundary within the first 8 KiB of the file. It can point to lCFG blocks much farther into the file however. If multiple blocks are found and no block specifier was given, a hint is shown. If a nonzero block specifier was given, a different hint is shown which identifies the block that is in use. (This is used only for the Master Control Program.)
-
-
-
-
If LIST is given without a filename,
don't show message "lCFG block does not contain any known configuration".
-
-
-
-
Fix warning about a "left shift count >= width of type" on gcc-ia16, by inserting type casts into the getu32 and getu16 functions.
-
-
-
-
-
-
-
-
-
tractest/convlist.pl
Properly process FreeCOM map and listing files, for the FreeCOM gcc-ia16 build. In particular, this includes:
The gccsections indicator line may have something trailing after the second number.
Filenames may be given as library files, where the actual file is specified in round parentheses.
To find the relevant listing file, take the filename in parens.
As usual, the gcc-ia16 listing files generated by the FreeCOM build are not especially good, but they do save some work particularly in dumping the call destinations in plain text.
lDebug
FreeCOM
lDOS kernel
Master Control Program
-
-
-
-
-
-
-
-
-
CLU launcher:
Initial commit. Implements loading the MCP (using int 21h function 4B01h) and terminating CLU's own process so that the MCP effectively replaces CLU. Runs an ldosmcp.com file that must be found in the current working directory.
-
-
-
-
-
-
-
If not yet found,
set COMSPEC variable to point to clu.exe itself. There's a branch of the code commented out that would delete an existing COMSPEC variable if found. I think it's nicer to allow the user to override what COMSPEC to use.
ETA:
Extract function findvar to find an environment variable.
Parse a variable, %CLUMCPFLAG%, to select one of as yet 4 different flags:
1 = Override current %COMSPEC% if it is already set.
2 = Do not relocate CLU process before running exec. (The handover from CLU to the MCP still involves a type of process relocation, so to say. Disabling this isn't supported yet, though could be done by leaving a small shim CLU process resident.)
4 = Never set the "UMA flag" in the MCP's CLU flag.
8 = Always set the "UMA flag" in the MCP's CLU flag. If both 4 and 8 are set, 4 takes precedence.