User Tools

Site Tools


blog:pushbx:2025:0914_early_mid_september_work

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

blog:pushbx:2025:0914_early_mid_september_work [2025-09-14 16:35:04 +0200 Sep Sun] (current)
ecm created
Line 1: Line 1:
 +====== Early mid September work ======
 +
 +**2025-09-14**
 +
 +
 +===== MSDebug =====
 +
 +[[https://hg.pushbx.org/ecm/msdebug/rev/6513d801306a|Correct a typo]] in the manual's ldebug-ad section.
 +
 +
 +===== lDebug =====
 +
 +Work on the amitsrs Extension for lDebug:
 +
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/19e2779709a0|Add ONLY= keyword]] accepting a number or a range (''FROM value TO value'' or ''FROM value LENGTH value''). Only the specified multiplex numbers are listed.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/3efb53ac257d|Add DEVICE keyword]] to list device headers returned by AMIS function 06h.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/65757f1103c4|Add output of each device header]].
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/ea9c6a8cabf4|Add BLOCK and CHAR keywords]] to allow displaying only one type of device header.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/22c3b5c0462b|Add DPB keyword]] to display block devices and the DPBs that point to them.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/f06c4e6d4bf4|Make DEVICE and DPB work in Protected Mode]].
 +
 +[[https://hg.pushbx.org/ecm/ldebug/rev/0fc2f7ee57a3|Add a new ELD, devices.eld, to dump the DOS device chain]]. Code largely lifted from the updated amitsrs.eld
 +
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/dae49bf9c60e|Document]] devices.eld and update documentation of amitsrs.eld
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/53690eb8b975|Correct a typo]] in ldebug-ad manual section.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/c4c0dece6934|Update ldebug-ad section]] from [[https://hg.pushbx.org/ecm/msdebug/file/6513d801306a/doc/msdebug.but#l957|MSDebug manual]].
 +
 +
 +===== tractest/convlist.pl =====
 +
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/964f1c8e1e8c|Add support]] for GAS .lst (listing) files, objdump .rel (relocations) files, and gcc-ia16 .map files. (Intended for use with SRDisk.)
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/af7ba19f03fe|Update list]] of supported projects.
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/c79ad5be6b83|Determine section bases]] from gcc-ia16 .map files. This was previously left as writing "unknown" because we didn't understand the .map file sufficiently. [[https://gitlab.com/tkchia/gcc-ia16/-/issues/1|Asking tkchia for help]] proved fruitful.
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/6ef06132e41b|Drop obsolete condition part]] accidentally copied into last changeset.
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/f49a25761892|Drop remark on being unable to determine section bases]] for gcc-ia16 .map file.
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/ab3f5574c53a|Harden the use]] of ''$1'' to 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.
 +  * [[https://hg.pushbx.org/ecm/tractest/rev/8c2f7c100603|Expand GAS support]] with differing widths and pass through the information displayed from the ''-ag'' switch.
 +
 +
 +===== ident86 =====
 +
 +  * [[https://hg.pushbx.org/ecm/ident86/rev/2d3f76d80ec5|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?)
 +  * [[https://hg.pushbx.org/ecm/ident86/rev/704b9b23ea92|Extract the matchsize function]] to avoid repeating all the special detection of data directives.
 +  * For the show diff mode (-j switch) [[https://hg.pushbx.org/ecm/ident86/rev/e83ca0fb370f|display last label before a listing match]]. May require the -x switch to work as expected.
 +  * [[https://hg.pushbx.org/ecm/ident86/rev/8db7c1ab4d4e|Fix the -p pattern split amount check]]. Needed parens.
 +  * [[https://hg.pushbx.org/ecm/ident86/rev/65938fd6732b|Repeat the -p check]] so it runs first thing.
 +  * [[https://hg.pushbx.org/ecm/ident86/rev/317ad64fc409|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:) [[https://hg.pushbx.org/ecm/srdisk/rev/fe0d3910c721|Make physical_alloc function not static]] to help debugging.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/6893dcc9cd29|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 [[https://github.com/dosemu2/dosemu2/issues/2567|dosemu2 was broken]], which is why this bug was activated at all. dosemu2 eventually fixed two bugs on their side. (Prior link [[https://github.com/dosemu2/dosemu2/issues/2574|and this]].))
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/c815746c6fc9|Add trivial mak.sh script]] what just calls make
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/27bd3709e0c3|Parse /X switch]] to OR, CLR, or rewrite a mask number known as the xvariable.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/ebe40d7dc3fe|Implement /X1 switch to force use]] of allocate + move + free dance for resize, instead of trying to reallocate an existing block.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/53c041179078|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.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/9e26b86bb1f4|Add convlist.pl command]] to generate srdisk.tls trace listing file.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/86319b7a7ee7|Add /X2 switch to enable VERBOSE output]] in srdxmsf.c
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/01e88f8d9352|Fix a check for DOS version 3.20]], need to check 314h not 314 (decimal).
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/b1721e189fc7|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.)
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/6c8132cd9640|Add srdmulti.nas device driver]] that embeds other drivers, places one of them to run later.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/50d52ddda1b7|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.
 +
 +
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/53a2e90f41d9|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.)
 +
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/7c59f89adb8e|Check in a forgotten srdisk.rsp response file]] needed to link the (old) srdisk.exe
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/cb28e22dfe25|Rename combined executable to srdik.exe]], old one is renamed to srdiskc.exe
 +  * In combined.nas [[https://hg.pushbx.org/ecm/srdisk/rev/f2ff8e7bddae|use a different workaround to avoid]] running a ''retf 000Ch'' at 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 [[https://github.com/dosemu2/dosemu2/issues/2575|a relevant dosemu2 issue]].)
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/e3e957a21144|Delete obsolete files]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/b2d107dfa2d8|Pick amis.mac]] from [[https://hg.pushbx.org/ecm/msdos4/file/f3fccea40141/src/INC/amis.mac|lDOS kernel repo]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/adcf20ea24b5|Update to use an AMIS multiplexer]] instead of int 2Fh function 72h hook.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/8ae577d13011|Depend srdisk.exe on srdmulti.sys]]
 +  * Bugfix [[https://hg.pushbx.org/ecm/srdisk/rev/0cbfc0dcecc9|to set a lower stack if GIOCTL code isn't kept resident]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/e9e9bd82c61c|Align the stack size on a paragraph boundary]] for neatness.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/66f7286c611e|Drop an obsolete call to int 2Dh function 01h]], no longer used.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/9d02dd9e371b|Delete int3 breakpoints in comloader]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/178251165881|Add switch /X4]] for dumping detected AMIS multiplexers.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/c9e28a18bff1|Add /X4 output for calling of AMIS (private) functions]] 10h and 20h.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/f261f199d0c9|Update version number]] to 2.10
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/70b95464dda1|Make the int 19h handler]] (not used in default build) 8086-clean.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/4791d122c749|Comment on ctrl0 variable]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/515dda336529|Add dependencies on srdisk.h]] for use of the VERSION define.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/0640efcdaedb|Delete MULTIPLEXAH equate]] from macro file, no longer used.
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/139b82fa662d|Correct some typos in comments]].
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/34b0f6ea3893|Pass more listing options to GAS]], for use by the new convlist.pl
 +  * [[https://hg.pushbx.org/ecm/srdisk/rev/dede5a62a047|Add -masm=intel switch to gcc compile commands]] so that the .s files use MASM style instructions.
 +
 +
 +===== lDOS kernel =====
 +
 +  * In comloader [[https://hg.pushbx.org/ecm/msdos4/rev/f3fccea40141|avoid the possible retf at the end of a segment problem]]. This would crash both qemu and dosemu2. (Problem [[https://github.com/dosemu2/dosemu2/issues/2575|was fixed in dosemu2]] after discovery.)
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/a758a8cac5e3|Parse the CHECKDEVICE= directive]] in the ldos.ini configuration.
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/0f93e8858210|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.
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/05ea7bae6f24|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.)
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/4943854d3f27|Comment more on the CHECKDEVICE checks]].
 +
 +
 +===== 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 [[https://pushbx.org/ecm/test/20220509/devload.diff|outside the repo]] until yesterday, when I [[https://hg.pushbx.org/ecm/devload/rev/f1d8766610f6|finally cleaned it up and committed it]]. There still is a comment reading "ecm 2022 May" on the crucial part.
 +
 +Two more patches followed:
 +
 +  * [[https://hg.pushbx.org/ecm/devload/rev/2dc6b59e81f6|Increment version number]] to v3.26 and indicate ecm in the attribution line.
 +  * [[https://hg.pushbx.org/ecm/devload/rev/16984869043b|Initialise the MCB name of the relocated DEVLOAD process]] to the original process's MCB name.
 +
 +
 +===== webecm =====
 +
 +  * [[https://hg.pushbx.org/ecm/webecm/rev/d3e92dc5c88d|Add projects-srdisk and projects-devload sections]].
 +  * In news, [[https://hg.pushbx.org/ecm/webecm/rev/fe3f708d70b6|mention projects-srdisk first]].
 +  * In projects-srdisk [[https://hg.pushbx.org/ecm/webecm/rev/c94e5d027d24|also mention new use of AMIS interrupt 2Dh]].
 +
 +{{tag>msdebug ldebug amitsrs eld convlist.pl ident86 srdisk ldos devload webecm}}
 +
 +
 +~~DISCUSSION~~
  
blog/pushbx/2025/0914_early_mid_september_work.txt ยท Last modified: 2025-09-14 16:35:04 +0200 Sep Sun by ecm