blog:pushbx:2025:1216_early_mid_december_work_on_the_mcp
Table of Contents
Early mid December work on the MCP
2025-12-14
lDOS boot (experimental)
Put the payload label into the part that's replaced by _INILOAD_PAYLOAD_INCLUDE. This is to prepare for additional signatures to be included before the payload, possibly for use by patchini/patldos to find additional lCFG blocks.
MCP
- Adjust for the lDOS boot change, put payload label into iniloadi.asm file.
- Add lzexe scripts from msdos4 repo.
- Build the lDOS comloader. Add it to the second payload.
- iniloadi.asm: Fix missing branch for CHOOSE DEBUG on the command line.
- Add makinst.sh from msdos4 repo. Set boot name to LDOSMCP.COM instead.
- Use MCP build of lDebug instead of the plain lCDebugX build. In particular this allows to use a specific startup script name, LDOSMCP.SLD, instead of the one shared by traditional lCDebug.
- Add gather.sh script to generate sources.7z and build ldosmcpz.com with the 7z ball between the initial loader stage and the extlib ELD.
- Avoid creating the empty file (empty.dat) in mak.sh script, as it is no longer used.
lDOS kernel
- Add _MCP option to comloader. This allows to run the debugger by specifying no command line or the comloader command DEBUG. It is expected that the debugger image lives behind the PSP already, is entered at PSP:256 + 64, and will want the comloader's original stack preserved.
- In ldos.ini device loader, check for an MZ executable header and calculate the device image size from it to allow loading the MCP as a device more readily (even ldosmcpz.com with 16 MB file size).
ETA:
- Zero bl for int 15h function 4100h call in mscon.nas, this specifies a timeout value to the function. MS-DOS v5.00 and MS-DOS v7.10 do this, and a comment in the MS-DOS v4.01 sources already suggested setting bl to zero (and bh to 3, dx to 60h).
lDebug
- In manual section cmdyconfigpathes link to eld-config.
- extname.asm:
- Add a nothing lib string to the display nothing found.
- Add DEBUGLIB option to allow enabling the debugging output (display nothing found name), now disabled by default.
- Add _LIBSCAN define to allow disabling library scan code.
- Fix, set nothingsp before any branch to notfound_invalid. On lCDebugX this could corrupt memory within the data entry stack segment, for example the areas table.
- Add _MCP define to select the startup script name for MCP debugger.
- In eldapend.c, align the ELD payload to a paragraph boundary. (This incorrectly states that it aligns the ELDTAIL header. As ELDs usually are 16-byte aligned in their size, the ELDTAIL header will happen to be aligned too, but this is incidental.)
- Add boot_init_findname and initialise it in boot init code. Copies most of the findname code from lDOS boot test payload (testpl.asm).
- Add two data links for device mode debugger, for the quittable registers copy and device header address variable.
- extname.asm: Add NAMELIB0 signature to after the ELD instance header so that another ELD can tell where the nothing library buffer lives.
- enamelib.asm: New Extension for lDebug to set the extname.eld library from load file. This is for the MCP which wants to search its own executable for ELDs not found otherwise. At this point there was a problem: Loading the two ELDs (extname and enamelib) to set the library string to the executable pathname requires already knowing where to find the two ELDs, ie knowing the executable pathname already. But if it is known then the enamelib.eld is of no use!
- Update the manual section rcref-0E with the return codes used as yet by enamelib.eld
- Do not force _CONFIG disabled for a boot-only build.
- Allow an empty pathname in IF EXISTS Y command, treating it as non-existing. This can be entered either using double quote marks, or if the upcoming ::EXECUTABLE:: keyword refers to an empty string.
- Add the ::EXECUTABLE:: keyword. Unlike ::CONFIG:: and ::SCRIPTS:: this doesn't specify a prefix to a subsequent filename, rather it reads the entire pathname from the init_executable_pathname variable and treats anything after the keyword as a command line tail. Adds init code to find the executable pathname from enamelib.eld.
- enamelib.asm: If the init_executable_pathname is supported and not empty, use its content for the extname.eld library string.
ETA:
- Fix build of enamelib.eld, asciz mmacro typo.
- Another fix to the build of enamelib.eld, unmarked relocations.
- Also return with error and RC 0E7Bh if enamelib.eld finds that the init_executable_pathname.end pointer points below the variable.
- Add RUN TRUENAME mode to enamelib.eld
- Add InDOS checks to enamelib.eld, although it cannot occur because the ELD is transient only (requiring InDOS to load).
- Add RC 0E7Ch and 0E7Dh to the rcref-0E manual section (enamelib.eld truename related).
- Add RUN YNAME mode to enamelib.eld
- Do not hardcode nothinglib size in a different spot in extname.asm
- Update news-r10 with the rcref manual section, RC reassignment patches, and yy ::EXECUTABLE:: keyword.
- Align the ELD1TAIL trailer in eldapend.c even if the ELD's size is not aligned.
- Shorten status message of eldapend.
- Truncate extpak.eld after the paragraph alignment. This makes the file size aligned.
- Update news-r10 with eldapend alignment of ELD and ELD1TAIL.
MCP scripting
The MCP startup script may now use the following commands:
IF EXISTS Y ::EXECUTABLE:: THENEXT ::EXECUTABLE:: EXTNAME.ELD INSTALLEXTNAME LIB SET ldp/ldosmcp.com(as a fallback if no name was detected)EXTNAME WARNEXT OFFEXT ::EXECUTABLE:: ENAMELIB.ELD RUNEXTNAME WARNEXT ON
After running this script, a simple EXT command such as EXT X will be able to load from the MCP executable's embedded ELD library if no x.eld or x.xld is found.
You could leave a comment if you were logged in.
blog/pushbx/2025/1216_early_mid_december_work_on_the_mcp.txt · Last modified: by ecm
