Table of Contents
Mid late September work on the debugger and various
2026-09-27
This week changeset 7000 was added to the ldebug.exp repo.
testpxms
This program tests whether calling the Protected Mode XMS entrypoint succeeds with a number of different choices. The choices are:
- B - set Big bit of the stack segment
- D - set Default size bit of the code segment
- O - set Operand size of the call instruction to 32-bit
- C - compare the resulting data to insure it is correct
Crucially, this test assumed the 2019 dosemu2's semantics. This meant that a zero handle in the XMS move structure would interpret an address as a Virtual 86 Mode 16:16 far address, composed of a segment word and an offset word.
This it turns out is no longer what the 2026 dosemu2 uses for its function 0Bh when called from the Protected Mode XMS handler.
The individual changesets:
- Set default options to bdO (16-bit stack, 16-bit CS, 32-bit operand size).
- Compare destination data to IVT.
I reported the various failures of this test program to the dosemu2 project. I was eventually told that function 0Bh works differently when called in Protected Mode now.
This led to adding the Protected Mode XMS extension function 7Bh, which accepts a type in the AL register indicating the interpretation of handle zero addresses:
- 00h - Virtual 86 Mode far address
- 01h - Linear address
- 02h - Near 32-bit offset in current DS selector
- 03h - Protected Mode 16:16 far address (selector and offset)
- others - unsupported types return new error AEh
symsnip
- Identicalise build (-f obj vs -f bin) by chaining a conditional jump in delete.asm
- Identicalise build with _SYMBOLIC _DUALCODE=0 _BOOTLDR=0 by spaghettifying some code.
ident86
- Add the --delta and --delta-always options to show the values and deltas checked in fuzzy compare, either only for fuzzy mismatch or always.
- Handle continued machine code dump of DW (word-sized data) on odd startnew address, want to round down the start address to an even boundary from startold.
- Start disassembly at startold if type u, as the startnew address can easily not be an instruction boundary.
- Add the --no-map-ranges option to suppress map ranges display.
ACEGALS
- Add section pointersplus on
+>arrows used for indices pointing to data within some structure that doesn't use near or far or segment pointers.
lDebug (experimental)
- Symsnip and other changes to identicalise _SYMBOLIC _DUALCODE=0 _BOOTLDR=0 builds. This includes lDEBUG_CODE (first code section) 2-byte alignment if not _DUALCODE && _SYMBOLICDUALCODE, similarly to an earlier change to symbols.asm and the same change to several files during the
-f objsupport being added. - Add debugging dumps of sizes, commented out.
- Fix the behind_code_truncated label of the _BOOTLDR=0 _DUALCODE build. Led to crash in init because the truncated code1 section was treated as larger than it actually was.
- Use the dosemu2 PM XMS extension functon 7B00h to have 2026 dosemu2 interpret the XMS move structure just like in Virtual 86 Mode. Also fixes the use case of a 16-bit DPMI client, which should far call the XMS entrypoint with an o16 operand size.
- Fix to link to code2_to_code_ret_to_ext function only if _PM. (Hint: Is this useful at all?)
- Major fix in init. In application mode or device driver mode, do not patch the boot loader parts of code1 discarded during initialisation. This error was hidden because it only causes problems if _DUALCODE _PM=0, or _PM=1 and no 386 was detected. Otherwise, no patches happened to be applied to the boot loader part of code1.
I originally wrote this fix as the head changeset of the ldebug.exp repo. Later, I reconsidered and exported it (hg expo) then imported it (hg impo) on top of the non-experimental repo's head changeset. To avoid a doubled changeset, I stripped the original from ldebug.exp then pulled the imported one and merged it with the prior experimental head.
Usually I avoid modifying history, but in this case the only modification happened in the experimental repo, so it is less critical.
- Identify SALIAS or MALIAS in the ELD instance header, only the full alias.eld remains as ALIAS.
- Support BOOT required links in the ELD linker, and PM or BOOT required, and PM and BOOT required. Also use equates for the various flags set in
?optionalvariable. - In extname.eld use BOOT required links to allow use by a _BOOTLDR=0 build.
- Allow specifying a %5 parameter to linkdatarelocation. If the keyword "first" is specified (without quote marks), then this non-other data link is processed first by the linker.
- Add the _ELD_BUILD_LATE option. This finally properly handles build options (build_option_PM and build_option_BOOT) so they're handled in the second pass of the ELD linker, but if their data links aren't found then the link is handled as if _PM=1 or _BOOTLDR=1. There was an attempt to do this much earlier, on 2023-10-23, which curiously wasn't listed in the blog post describing that week.
- In dxms.eld use the dosemu2 PM XMS function 7B00h and also dispatch to o16 or o32 XMS call depending on client bitness.
- In manual add XMS and PM XMS functions to serviceref.
- In symbols.asm and dxms.asm check that the V86M XMS entry segment is nonzero before calling it.
tractest/TracList
- Update the manual:
socat -r, autkeep2, pid files, and --listing with multiple file parameters.
