|
|
|
|
— |
blog:pushbx:2025:1209_early_december_loader_application_and_mcp [2025-12-09 16:35:12 +0100 Dec Tue] (current) ecm created |
| | ====== Early December: Loader application and MCP ====== |
| | |
| | **2025-12-07** |
| | |
| | |
| | ===== lDOS boot (experimental) ===== |
| | |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/ae5ffbb57c92|Add an include and equates to iniload source text]] to allow replacing the payload inclusion section. |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/c7d8281dcfb0|Fix several spots in iniload.asm and multboot.asm]] to use the new equates. |
| | |
| | This is intended to be used by the MCP to support its more complex payload architecture. By using equates, the payloads can also be placed in their own sections (using the multi-section binary format of NASM) rather than all in the single section as is default for iniload. |
| | |
| | |
| | ===== lDebug / Loader ===== |
| | |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/16c6e76ab76a|Include the SLEEP command]] for loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/0fd3abe16e69|Hook int 18h and 19h while loader is hidden]], unhook when moving from hidden to bottom. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/78448facb287|Add the function loader_prepare_resident]] to allow an ELD to install an extension that's hidden above the end of the Low Memory Area. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/a32087234e1e|Add the first loader extension ELD, fdbplace.eld]] - a placeholder for the diskette drive B: to avoid DOS creating a phantom drive once it is booted. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/296655379ce0|Fix to allow building all ELDs again]], options.mac now requires the _LOADER define be set. |
| | * In eld/makone.sh [[https://hg.pushbx.org/ecm/ldebug/rev/e03553766ab1|display which ELD is being assembled]]. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/cc8fd240ef53|Allow loader to link list.eld]] by making the code link yy_dos_parse_name optional. Checks at run time that it is not NOPed out if needed. (This could be solved in a better way.) |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/1dfa3767a390|Set the DIF6 flag for debug mode in the loader]], as it never hooks the trace and breakpoint interrupts. Allows to use houdini breakpoints in ELDs loaded by the loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/ba4c66d9ad4d|Allow to enable _CATCHINT2D (AMIS interface) for loader build]]. This is very convenient because it allows to install amisoth.eld to allow the debugger to access the loader as an other link instance. |
| | * Open question: Should the loader provide a different AMIS signature than the debugger? For now it shares the "ecm" "lDebug" signature. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/5ec2f0cb6e0a|Enable the UNINSTALL command]] for the loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/93f69e8e1d2f|Update attribution years to 2025]] in several files. I used a shell scriptlet to list files with attribution in the range from 2020 to 2024, editing files that were modified in 2025. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/7824d0457013|Rehook int 2Dh if it is hooked]] when moving the loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/f392cb16a4df|Enable update IISP header callout to debugger AMIS interface]] in loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/f79fdb18f085|Default to enable _CATCHINT2D]] for loader. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/f0783e09b97b|Include loader int 18h and 19h hooks]] in the AMIS interrupt table. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/31ec7e87bac8|Allow a comma before THEN keyword]] in IF commands. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/9ada4587e484|Share code for return code 0102h]] in guard_re and guard_rc. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/76d155abe68a|Set return code 0108h for bb.asm]] if no NEW breakpoint left (all breakpoints in use). |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/682597b7d14b|Update some more attribution years to 2025]]. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/7d2fd0b038f6|Set return codes for many specific error conditions]], including the L and W commands if they fail. This was previously noted as not working with L. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/baf91a2187a8|Update news-r10 in the manual]] with the comma before THEN and setting the return code changes. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/d1870e6d4a68|Set the iniload signature to "lDLd"]] for loader. |
| | |
| | **ETA**: |
| | |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/ef5133ced5b3|Preserve last command's Return Code]] when closing RE/RC buffer. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/3800c9838f95|Document most Return Codes in the manual]] (Return Code Reference), with the exception of Extension for lDebug Return Codes. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/34b33f15e17e|Add the three used 0Fxxh Return Codes]] to the manual. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/d772c84ca70d|Add the 0Exxh Return Codes]] (generated by Extensions for lDebug) to the manual. Changeset message includes two scriptlets used to help generate the list. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/400538addf53|Re-assign duplicate Return Codes]] found by the enumeration. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/9afcaffb9501|Pass through Return Codes 0143h and 0144h]] which would be overwritten by the change to preserve last command's RC. |
| | |
| | |
| | ===== Master Control Program ===== |
| | |
| | The MCP is a program containing other programs. For now, it contains the lDOS kernel and the lCDebugX debugger. It can boot into either as a kernel, or run the debugger when loaded as a device driver or application. I plan to add the lDOS comloader to the application payload so that its applications are also available. |
| | |
| | The MCP uses a special arrangement of its payloads so that the debugger image appears both in the trail of the kernel payload and in the lead of the application/device payload. This allows to load the debugger in any mode, without having to put everything into a single triple-mode payload (as was the case for lRxDOS with its early lDOS comloader). |
| | |
| | The Master Control Program is named, of course, for the antagonist of the movie Tron. |
| | |
| | Individual changesets: |
| | |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/bb92e77444a0|Initial commit]]. This just builds the debugger using iniload, producing an exact match. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/e2db5c9e65bc|Fix .lst file generation]]. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/9a4eb1ed5200|Copy iniloadi.asm from the iniload code]] that includes the payload binaries. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/6cccef3670f2|Include three binaries in iniloadi.asm]] |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/cdae904afe8a|Combine the lDOS kernel with lDebug as application payload]]. This puts the debugger into the part shared by both payloads, but does not enable booting the debugger yet. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/c2f37dea7e47|Add iniloadc.mac]] from lCDebugX build. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/d66a9c8d188f|Replace iniloadc.mac contents]]. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/578b6c02ddac|Put the payloads into separate sections]] (using NASM -f bin multi-section format). This juggles all the required equates for iniload. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/874330a00b80|Add an empty PAYLOAD1 section]]. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/4671796a1e65|Implement a menu in PAYLOAD1 which prompts for which program to boot as a kernel]]. Conveniently, this requires no relocation at all because the lDOS iniload to payload protocol already puts the payload at an arbitrary segment given that it fits below the stack. |
| | * [[https://hg.pushbx.org/ecm/mcp/rev/beb732ea63cf|Accept a CHOOSE command on the kernel command line]] to boot into either the kernel (CHOOSE DOS), the debugger (CHOOSE DEBUG), or the menu (CHOOSE MENU). Also, after a CHOOSE command, allow a DEFAULT command to instruct the menu payload to reset the command line as if no command line was given at all (0 byte followed by 0FFh byte). (CHOOSE MENU currently only is useful to follow it up by DEFAULT.) |
| | |
| | |
| | ===== Misc ===== |
| | |
| | * [[https://www.bttr-software.de/forum/forum_entry.php?id=22964|Asked about the error codes returned by 21.7305]] on the forum. |
| | * Circled back to [[https://github.com/FDOS/kernel/issues/207|the FreeDOS MCB corruption error condition I reported to the kernel repo]], which was home to the script in which I found the L command doesn't set the RC variable on errors. |
| | * [[http://svardos.org/?p=forum&thread=1764705038|Described the loader + drive B: placeholder combo]] as a companion application to ethflop on the SvarDOS forum. |
| | * It is expected that the MCP exceeds the file size allowed by the FreeDOS original loaders (128 KiB to 134 KiB). |
| | |
| | To do: |
| | |
| | * Allow the MCP menu to time out and use a default option, probably should be configurable (using an lCFG block?). |
| | * MCP currently allows patldos to access only the first lCFG block (the lDOS kernel's). Probably want an extension where in or after the lCFG block, or in a separate signature block, we specify that a subsequent lCFG block follows, along with a field giving the rough distance to the next lCFG block to avoid searching the entire file. |
| | * The comloader probably should default to the debugger in the MCP, instead of the version command. |
| | * Programs to output the .exe image trail info and lDOS iniload signature. |
| | * MCP comloader version: Include lDebug version line? |
| | * Append a .7z ball to the MCP executable? |
| | * Append extlib.eld to the MCP executable using eldapend? (Probably don't want extpak.eld as it needs to read a lot more from the disk to load an embedded ELD.) |
| | * Devise a way for the EXT command to try the appended extlib.eld automatically if an ELD is not found on the FS? |
| | * Add loader to the MCP? |
| | * Build loader as a current release build? Should also build its fdbplace.eld |
| | * Loader manual in or alongside lDebug manual? |
| | * Build MCP as a current release build? |
| | |
| | |
| | {{tag>ldosboot ldosboot.exp ldebug loader mcp}} |
| | |
| | |
| | ~~DISCUSSION~~ |
| |