====== Early mid September work on lDebug, EDR-DOS, and lDOS instsect ====== **2024-09-15** ===== lDebug ===== * [[https://hg.pushbx.org/ecm/ldebug/rev/5e558b757f50|Add structure]] for Extension for lDebug (ELD) trailer header * [[https://hg.pushbx.org/ecm/ldebug/rev/d2b65ed49018|Support ELD trailer header]] in debugger's ELD loader * [[https://hg.pushbx.org/ecm/ldebug/rev/e74979c83a2e|Support ELD trailer header]] in list.eld * [[https://hg.pushbx.org/ecm/ldebug/rev/091bc489eba1|Add eldapend tool]] to create a file with ELD trailer header pointing at an ELD * In eldapend [[https://hg.pushbx.org/ecm/ldebug/rev/c244621fce35|require destination file to exist]] * In eldapend [[https://hg.pushbx.org/ecm/ldebug/rev/fbce6cfddf23|check that destination file doesn't have an ELD trailer header yet]] * [[https://hg.pushbx.org/ecm/ldebug/rev/557ffe9498c8|Document ELD trailer header in eldexe section]] of the manual * List ELD trailer header support [[https://hg.pushbx.org/ecm/ldebug/rev/d47eae88f396|in news-r9 section]] of manual * [[https://hg.pushbx.org/ecm/ldebug/rev/461727687f85|Update a different reference in manual]] for ELD trailer header * [[https://hg.pushbx.org/ecm/ldebug/rev/10a03fe7a35e|Disable _DX option by default]] (needed to be able to build lCDebugX with _ELDTRAILER=1) * Update eld-dx to [[https://hg.pushbx.org/ecm/ldebug/rev/752ea2faccd8|refer to _DX=0 default]] (another reference to the dx.eld still has to be updated) * [[https://hg.pushbx.org/ecm/ldebug/rev/2537632d5939|Add _SREVERSE option]] to allow disabling support for S command REVERSE keyword * [[https://hg.pushbx.org/ecm/ldebug/rev/6c3514690a11|Use an equate]] for length of SRO array * [[https://hg.pushbx.org/ecm/ldebug/rev/fe82d04e5d02|Fix s.eld overflow of SRO array]] in _PM=0 debugger build * [[https://hg.pushbx.org/ecm/ldebug/rev/cb6e398be689|Optimise SRO array indexing]] During the review I noticed that the AXO variable exists, which is supposed to be for the next address of the _DX command. However, it has several problems: * It isn't conditional on the _DX define * The dx.eld doesn't install a variable structure for it * It actually points at the offset for the AAO variable (a_addr), not the intended variable (x_addr). So it never was functional as intended. Edited to add: * [[https://hg.pushbx.org/ecm/ldebug/rev/e53068933fed|Fix AXO variable in debugger]] * Prepare dx.eld for ELD variable use by [[https://hg.pushbx.org/ecm/ldebug/rev/1688bb30d4e6|moving install code to behind data section]] * [[https://hg.pushbx.org/ecm/ldebug/rev/86e9f2b26187|Add AXO variable]] as an ELD variable to dx.eld ===== Enhanced DR-DOS ===== * Fix [[https://github.com/SvarDOS/edrdos/issues/111|issue #111 of the SvarDOS repo]], allowing [[https://hg.pushbx.org/ecm/edrdos/rev/1192143fcfc3|to select C: as the boot drive if it is a partition on hdb]] and there are none on hda ([[https://github.com/SvarDOS/edrdos/commit/3092c8ac024ed503aea946332d01b86fb7a10a98|SvarDOS pick]]) * Work on [[https://github.com/SvarDOS/edrdos/issues/109|issue #109]]: * [[https://hg.pushbx.org/ecm/edrdos/rev/57bd9fc4efd9|Display cs:ip and code hex dump]] in int 0 handler * [[https://hg.pushbx.org/ecm/edrdos/rev/0b2cc8420eea|Fix to display int 0 dump to stderr]] * [[https://hg.pushbx.org/ecm/edrdos/rev/4dc263c6dc1c|Display four GPRs]] in int 0 handler too * Likely fix the issue [[https://hg.pushbx.org/ecm/edrdos/rev/5113afa906a9|by not calculating CHS values for units accessed with LBA]] ([[https://github.com/SvarDOS/edrdos/commit/1b985bd5a62500da51c24e3790d2d64eb9567f31|SvarDOS pick]]) * Fix version.mac [[https://hg.pushbx.org/ecm/edrdos/rev/188410a95b70|writing long version if nasm option -t]] (TASM compatibility) is used, affecting the "Starting" message in init.nas ===== lDOS instsect ====== [[https://hg.pushbx.org/ecm/instsect/rev/b6d4544a1283|Add a type heuristic]], allowing instsect to inspect the boot sector loader for which load protocol it appears to implement. This as yet only uses far jumps, either those presumably transferring control to the next stage (kernel / initial loader) or those early in the FreeDOS loaders to transfer to the relocated sector loader. The latter happens to be immediately before [[https://github.com/FDOS/kernel/blob/1cc00e194dd969d30c78775c67a1df44af307abf/boot/boot.asm#L203-L207|the loadseg variable]] which controls where the next stage is loaded **and** what address it is entered at. The recognised load protocols so far are: * lDOS (new), ''jmp 200h:400h'' * lDOS (old), ''jmp 70h:400h'' * MS-DOS v7, ''jmp 70h:200h'' * MS-DOS v6 / IBM-DOS / lDOS (EDR-DOS), ''jmp 70h:0'' * FreeDOS (FreeDOS), ''jmp 1FE0h:XXXXh'' followed by ''dw 0, 60h'' * FreeDOS (Enhanced DR-DOS), ''jmp 1FE0h:XXXXh'' followed by ''dw 0, 70h'' * FreeDOS (other), ''jmp 1FE0h:XXXXh'' followed by ''dw 0'' * lDOS (FreeDOS), ''jmp 60h:0'' (The parameters marked by XXXXh are wildcards in the search patterns.) {{tag>ldebug edrdos instsect ldosboot freedos}} ~~DISCUSSION~~