| |
| — | blog:pushbx:2025:1117_ldebug_and_ldos_boot_experimental_loader_support [2025-11-17 19:02:23 +0000 Nov Mon] (current) – created ecm |
|---|
| | ====== lDebug and lDOS boot experimental loader support ====== |
| | |
| | **2025-11-16** |
| | |
| | ===== LZEXE ===== |
| | |
| | In the lzexedat.sh script, [[https://hg.pushbx.org/ecm/lzexe/rev/8561dcafb7a8|redirect the null device into the dosemu2 process]] to avoid accidentally activating [[blog:pushbx:2025:0304_interlude_current_ldebug_startup_files|the input detection of the bootloadable lDebug]] (in the line ''if (rc == 0 && ioi == 0) then q''). |
| | |
| | |
| | ===== lDOS boot experimental ===== |
| | |
| | * boot32: [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/9cb4059f9a14|Note magic bytes for loader support]]. This is to allow patching the first stage loader so it assumes its second stage (FSIBOOT) is already present in memory, rather than trying to load it from the disk. |
| | * iniload: [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/a6a135aeaff6|Add loader support signature and pass through]] an lsvExtra flag. |
| | * Fix: [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/8c908391104c|Pass through the lsvExtra flag properly]], not the lsvExtra partition byte. |
| | * Loader: |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/8a50f08a4221|Initial commit]]. This just loads a debugger. |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/45048f045992|Support the size query entrypoint]], returning the low limit needed for later relocation. |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/fb2227536554|Provide the placement and debug entrypoints]]. Placement relocates the loader back to 00600h (and restores the EBDA) while debug is just a hello world program at this point. |
| | * [[https://hg.pushbx.org/ecm/ldosboot.exp/rev/dabb55238e25|Add _PADDING define to allow enlarging the loader]], up to 65520 Bytes. |
| | |
| | |
| | ===== lDebug ===== |
| | |
| | * In mak.sh [[https://hg.pushbx.org/ecm/ldebug/rev/3d30d1226313|add the use_build_skip_help option variable]] to allow re-using the already assembled and compressed help pages instead of recreating them. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/8e78d98492fa|Extract the function get_size_and_ebda]] from boot_initcode. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/482871d5defb|Allow calling the get size function multiple times]]. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/97234aca8e0a|Detect a loader and call its query function]] if found. Doesn't use the result yet. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/2ad5cfb89b38|Relocate the early init and images to a higher spot]] if needed to free up the loader's low limit. This only happens if neither the init nor the images were relocated **to a lower position** yet. If the lower limit isn't satisfied after having relocated lower, abort with an OOM error. This allows a fairly simple relocation scheme for the relocation to a higher position. (Also calls loader's relocation function.) |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/991fd0c95578|Initialise registers for the loader debug entry]], do not set the dif3_gotint19 flag in that case. That means memory at 00600h is preserved, which will hold the loader at this point. |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/f9b6c66f0fdc|Enable the loader support]] of the initial loader (signature and pass the flag). |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/63a168c1da0f|Drop an int3 breakpoint]] left over from development. |
| | |
| | |
| | **ETA**: |
| | |
| | * [[https://hg.pushbx.org/ecm/ldebug/rev/20f5275ae22f|Fix a bug that would lead to a crash]] when booting a _PM=1 build without the full loader being provided, due to a mixup with the different ''@@'' anonymous local labels. |
| | |
| | {{tag>lzexe ldosboot.exp ldosboot ldebug loader}} |
| | |
| | |
| | ~~DISCUSSION~~ |
| |