Table of Contents
Early mid September work
2025-09-14
MSDebug
Correct a typo in the manual's ldebug-ad section.
lDebug
Work on the amitsrs Extension for lDebug:
- Add ONLY= keyword accepting a number or a range (
FROM value TO valueorFROM value LENGTH value). Only the specified multiplex numbers are listed. - Add DEVICE keyword to list device headers returned by AMIS function 06h.
- Add BLOCK and CHAR keywords to allow displaying only one type of device header.
- Add DPB keyword to display block devices and the DPBs that point to them.
Add a new ELD, devices.eld, to dump the DOS device chain. Code largely lifted from the updated amitsrs.eld
- Document devices.eld and update documentation of amitsrs.eld
- Correct a typo in ldebug-ad manual section.
tractest/convlist.pl
- Add support for GAS .lst (listing) files, objdump .rel (relocations) files, and gcc-ia16 .map files. (Intended for use with SRDisk.)
- Update list of supported projects.
- Determine section bases from gcc-ia16 .map files. This was previously left as writing "unknown" because we didn't understand the .map file sufficiently. Asking tkchia for help proved fruitful.
- Drop obsolete condition part accidentally copied into last changeset.
- Drop remark on being unable to determine section bases for gcc-ia16 .map file.
- Harden the use of
$1to cut prefix and suffix of a line. This turned out to be too fragile as the $1 of a prior search could be defined here. - Expand GAS support with differing widths and pass through the information displayed from the
-agswitch.
ident86
- Recognise several GAS directives for byte and word data: .string, .ascii, .byte, .skip, .align, .p2align, .balign all for byte data, .hword for word data. (The gcc-ia16 GAS never seems to be used to write a dword using a single directive, rather the compiler splits the dword into two .hword directives.) (May need to revisit this to avoid matching NASM local labels?)
- Extract the matchsize function to avoid repeating all the special detection of data directives.
- For the show diff mode (-j switch) display last label before a listing match. May require the -x switch to work as expected.
- Fix the -p pattern split amount check. Needed parens.
- Repeat the -p check so it runs first thing.
- Add -F switch to force treating a range as different byte values.
SRDisk
Six months ago I first worked on SRDisk, needing a test case of a block device driver for lDOS kernel reworks. This week I returned to it and took some significant steps.
- (Old patch already in repo:) Make physical_alloc function not static to help debugging.
- Fix resizing to a bigger size when the XMS/EMS reallocate functions don't work. Didn't update the new size correctly. (The XMS reallocate in dosemu2 was broken, which is why this bug was activated at all. dosemu2 eventually fixed two bugs on their side. (Prior link and this.))
- Add trivial mak.sh script what just calls make
- Parse /X switch to OR, CLR, or rewrite a mask number known as the xvariable.
- Implement /X1 switch to force use of allocate + move + free dance for resize, instead of trying to reallocate an existing block.
- Generate gcc-ia16 .s files, then assemble them and generate .lst files and use objdump to generate .rel files. For use with convlist.pl as mentioned there.
- Add convlist.pl command to generate srdisk.tls trace listing file.
- Add /X2 switch to enable VERBOSE output in srdxmsf.c
- Fix a check for DOS version 3.20, need to check 314h not 314 (decimal).
- Place device entrypoints at fixed offsets, so that the multi-device driver needn't change them when placing its payload device driver. (NB This seems to be required for DEVLOAD, but not for the lDOS kernel I believe.)
- Add srdmulti.nas device driver that embeds other drivers, places one of them to run later.
- Include all single device drivers in srdmulti.nas
I went with a simple way to implement srdmulti.sys: Just incbin all the single device drivers and copy the selected one into place. The more difficult choice would have been to really integrate all the drivers into one and only patch the necessarily different parts. This would allow to share more of the setup and such. We may revisit this eventually, but the simple choice was much easier to do.
- Add building of combined.exe. This includes srdmulti.sys as a device driver entry, and a comloader (based on the lDOS kernel's) to run the format utility (old srdisk.exe) when run from the application entry.
Unlike the lDOS comloader, this one is assembled into an object file and linked using WarpLink for now. The lDOS sumspace utility was adapted as getspace to tell how much of a gap (nobits) section needs to be allocated. (This appears to overcount a little but I'm not motivated to figure out why.)
- Check in a forgotten srdisk.rsp response file needed to link the (old) srdisk.exe
- Rename combined executable to srdik.exe, old one is renamed to srdiskc.exe
- In combined.nas use a different workaround to avoid running a
retf 000Chat the end of a segment. (This instruction was the last within an on-stack stub to transfer control from the comloader to the payload srdiskc.exe process.) (There's a relevant dosemu2 issue.) - Update to use an AMIS multiplexer instead of int 2Fh function 72h hook.
- Align the stack size on a paragraph boundary for neatness.
- Drop an obsolete call to int 2Dh function 01h, no longer used.
- Add switch /X4 for dumping detected AMIS multiplexers.
- Update version number to 2.10
- Make the int 19h handler (not used in default build) 8086-clean.
- Add dependencies on srdisk.h for use of the VERSION define.
- Delete MULTIPLEXAH equate from macro file, no longer used.
- Pass more listing options to GAS, for use by the new convlist.pl
- Add -masm=intel switch to gcc compile commands so that the .s files use MASM style instructions.
lDOS kernel
- In comloader avoid the possible retf at the end of a segment problem. This would crash both qemu and dosemu2. (Problem was fixed in dosemu2 after discovery.)
- Parse the CHECKDEVICE= directive in the ldos.ini configuration.
- Check a DEVICE= file to appear valid before executing it. This checks for the second word in the image to equal FFFFh, and that the strategy and interrupt entries both aren't pointing beyond the end of the file. These checks were picked from my contribution to DEVLOAD.
- Drop several breakpoints. The only unconditional breakpoint left is before the NEARDOSINIT call. The conditional breakpoint is used for Check Debugger detection. (There are some breakpoints in system-halting loops as well, but these aren't run ordinarily.)
DEVLOAD
I originally started to work on DEVLOAD in 2022 May, as I wanted a way to test loading of the lDebug executable as a device driver. (Swapping the fdconfig.sys for testing would have been more work than using DEVLOAD.) I quickly learned that DEVLOAD limited the amount of space available it reported to the driver to slightly less than 64 KiB, which wouldn't do for lDebug at all.
Several patches followed, but I wasn't happy with the main size patch. So I left it outside the repo until yesterday, when I finally cleaned it up and committed it. There still is a comment reading "ecm 2022 May" on the crucial part.
Two more patches followed:
- Increment version number to v3.26 and indicate ecm in the attribution line.
- Initialise the MCB name of the relocated DEVLOAD process to the original process's MCB name.
webecm
- In news, mention projects-srdisk first.
- In projects-srdisk also mention new use of AMIS interrupt 2Dh.
