Table of Contents
Late March work on the debugger and kernel
2026-03-29
This week I also finished my stackoverflow.com Q&A and companion blog post on NASM label delta arithmetic. I have espoused the use of this for years, but there wasn't a canonical explanation to refer to yet.
BTTR Software bootmgr
After seeing it listed in the "50 boot managers" collection (via RC.SE), I got interested in the old bootmgr. (Last release was in 2008.) I'm interested in adopting bootmgr because lDOS is still missing a way to configure and install its MBR loaders.
I asked Robert (rr) for older versions and we collected 12 revisions in total, spanning from 2005-01-31 to 2008-03-18.
Apart from that I added a few updates already:
- Add an unpacked binary by way of debugging the last release's binary (debugging commands in the changeset message).
- Add a map directive to the source text.
- Identicalise source texts to the last release's (unpacked) binary.
- Fix some orphan labels missing colons. These were all actually intended to be labels.
- Add new Hide partition types for each specific DOS partition type (to make the display clearer).
- Fix a typo (wrong closing parens) in manual.
- Add a conditional int3 breakpoint to boot loader, just before it passes control to a subsequent loader. (Needed this to allow debugging the boot loader, as it relocates its own code and writes its own code back to the HDD. So two temporary
int3breakpoints ended up written to the disk.)
wwwecm scripts
- No longer run hg clean for ldebug, lddebug, and lcdebug builds. This allows these builds to re-use help files and object files and ELD files whose dependencies didn't change since the last build. (A few files need to be rebuilt for any build, due to including revision IDs or the version string.)
patchini
- patldos.c: Fix, if ALL LIST is specified with a kernel file that doesn't have an lCFGMULT block, do not list everything twice.
- patldos.asm: Same fix, the port was true to the original in this aspect and thus reproduced the bug.
- Improve interface from patldos.c to included patchqry.c, passing the already opened file. Also, no arguments are passed if patchqry is called at the end of a LIST run. This fixes the bugs around ALL or a specific block number being specified.
- patldos.asm: Fix parsing of PRO progress type. Has to reject empty argument list, not the reverse.
- Implement patldos.asm LIST tail call to patchqry.asm, branching either to patchqryhelp or gotunit (with some setup).
- (Bug if not LIST and file is not opened?)
- Update mak.sh script to build the assembler ports of patldos and patchqry rather than the C programs.
- (Default patldos.asm doesn't include patchqry? mak.sh passes the option explicitly.)
lDebug
- Add zerocomp, mvcomp, and lzexedat depacker usage conditions to the manual (all are attributed to ecm).
- Mention in the manual that heatshrink and lzexedat may be used to compress the help pages and extpak ELD.
- Switch on the use of makefiles for building the debugger .big images and the ELDs.
- In makmcp.sh also mak all ELDs and the special fdbplace ELD (only used for loader).
- Optimise ELD depacker, do a sub instruction before branching rather than having to skip it later. I discovered this while writing about the circular window buffer depacker for another blog post.
webecm
-
- (All years updated or maybe missed some?)
- Add a section for WarpLink. Lists the support for DWORD and 4KIB alignment, the better short write checks, and the wlemitalign, wlcalc, and wllist extensions.
tractest/listvars.pl
Avoid an error that an expected assume doesn't match (details in the changeset message). Update the expected assumes if expect or expect2 variable already matches the segreg being written to.
lDOS kernel
- Do not use the IFS pointers in the CDS or SFT any longer. These were used to distinguish "local" IFS from "remote" redirectors. The distinction doesn't seem to exist in MS-DOS v3 and v5, and so we now treat all redirected CDS and SFTs as redirected and remote. A user had reported that int 21h function 4409h returned a bogus result for a Microsoft network client drive.
- In abort.nas only clean up busy SFTs (reference counter equal to FFFFh), not all in-use SFTs. This seems to match MS-DOS v5.
- In the manual drop a note on MS-DOS similarity of COMPAT=NOCOLLECTALLMCBS. As usual the reality is stranger than I expected.
- Update manual with new INSTALL directives, and a link to ldosboot.htm manual for the patch query site.
- Add zerocomp, mvcomp, lzexedat depacker usage conditions to the manual.
- Update ksection.txt, particularly to divide DOSDATA and DOSCODE tables.
- Optimise entry.asm, share an entry for okcall and badcall. Also drop an alignment directive and only put one NOP in front of i00 entrypoint.
- Do not anti-align the transfer_xmsentry code.
- After int 23h was called (from a DOSDATA stub) go through a relocated entrypoint to return to DOSCODE.
- Delete the makefiles themselves as prerequisites to some object and binary files in the makefiles.
- Drop the separate i23returnentry and just branch to i21 entry, which currently does the same thing anyway.
- Allow to override the NASM executable to use from the make environment.
- Avoid PUBLIC directives with dollar sign prefixed labels in format sources, which tripped a bug in more recent NASM revisions.
