====== Late November work ====== **2026-11-29** ===== lDebug (experimental) ===== * [[https://hg.pushbx.org/ecm/ldebug.exp/rev/1a84e486e5f6|Use dynamiclabel a bunch for equates]] that are the same as another label. There is a problem in the symbol file program: If the same "label" is defined in every leg of an ''%if'' ''%else'' construct which is in an active outer leg, the label takes on the value found in one of the legs. This is the wrong thing to do if the label is actually an equate. As a workaround, use dynamiclabel so that only the correct equate is used. * [[https://hg.pushbx.org/ecm/ldebug.exp/rev/4f289e0e4962|Add the option opt7_zz_no_capsfold]] (INSTALL CAPSFOLD, reverse). * [[https://hg.pushbx.org/ecm/ldebug.exp/rev/df2ab538e597|Update symsnip]] with caps-folding function zz_match_symbol. ===== Symbolic support snippets ===== * [[https://hg.pushbx.org/ecm/symsnip/rev/8882aea3eaf6|Uncapitalise data in zz_hash]], to allow capsfolding later. * [[https://hg.pushbx.org/ecm/symsnip/rev/354c314d1cc4|Do capsfolding comparison]] in zz_match_symbol (unconditionally). * [[https://hg.pushbx.org/ecm/symsnip/rev/9fd1728c07e2|Fix standalone build]] by including capitalise function. * [[https://hg.pushbx.org/ecm/symsnip/rev/f3427681eb8b|Observe the debugger option for capsfolding]]. * [[https://hg.pushbx.org/ecm/symsnip/rev/ea5f8b15507e|Fix so that CX = 0 entry of zz_comparename preserves ZF]]. The symsnip repo again doesn't show up as updated [[https://hg.pushbx.org/ecm/?sort=lastchange|in the hgweb overview repo list]]. It is unknown why this happens. ===== WarpLink ===== * [[https://hg.pushbx.org/ecm/warplink/rev/a24f945e1fd8|Add /S switch to WarpLink's own linker response file]] for caps-sensitive linking and map file. * In get_hash [[https://hg.pushbx.org/ecm/warplink/rev/f7c86a22f407|caps-fold the input data]] to allow eventual caps-folding of symbol names. * [[https://hg.pushbx.org/ecm/warplink/rev/e36186971018|Add /SC switch]] for caps-preserving map file and caps-folding comparison. This replaces most occurrences of ''cmpsb'' instructions by function calls. There's three functions: compare_asciz which compares until a mismatch or NUL match, compare_length which works like ''repe cmpsb'', and compare_byte which works like ''cmpsb''. The former two function call the latter. It is a single ''cmpsb'' by default; if the /SC switch is specified then this instruction and a ''retn'' are patched into two NOP instructions. Querying the option byte in the function would require changing a segment register because both DS and ES may point somewhere else than the program's data segment. So the patch is easier. * [[https://hg.pushbx.org/ecm/warplink/rev/827ef5f41490|Increment ecm release to r24]]. * [[https://hg.pushbx.org/ecm/warplink/rev/8bb2e8f7a132|Update readme ecm file for r24]], listing the /SC switch. ===== lDOS ===== * Fix to [[https://hg.pushbx.org/ecm/msdos4/rev/d8c82f674429|check for DIR /P pagination]] if an entry has no date to show. * [[https://hg.pushbx.org/ecm/msdos4/rev/20b2946bb0ce|Disable label-redef-late warning for NASM]] in nasm.mac macro file. (The lmacros1.mac already did this, but it isn't included by every NASM source text file.) * In entryseg.nas [[https://hg.pushbx.org/ecm/msdos4/rev/a4c088911518|enable listing before the include guard]] to get the desired ''%if'' structure in the .tls trace listing file. * [[https://hg.pushbx.org/ecm/msdos4/rev/e7d2d75ea479|Optimise the shell some]]. This includes fewer segment overrides by setting up DS earlier/more, sharing some code to set the NUMBER_SUBST variable, replacing the callers of SetSize to calculate their desired sizes using wlcalc in a single immediate instead, using CLD and STI and HLT in some spots to harden and improve some code. Some OR are replaced by TEST (more idiomatic but same code size), some MOV are optimised to XCHG with AX, in one case a sequence of AND AX, 1 then NOT AX is replaced by AND AL, 1 (only the flags matter and NOT doesn't change any flags). * [[https://hg.pushbx.org/ecm/msdos4/rev/2f45c8481c0b|Update lDOS version to 2026 November]]. * In nasm.mac [[https://hg.pushbx.org/ecm/msdos4/rev/beccb7324790|disable the uppercase directive]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/e2044ff741d6|Enable caps-folding link and caps-preserving map file]] for the kernel link, using WarpLink's new /SC switch. ===== tractest/convlist.pl ===== * [[https://hg.pushbx.org/ecm/tractest/rev/360c5879695a|Support NASM dump content properly]]. * [[https://hg.pushbx.org/ecm/tractest/rev/e04d4ad04c47|Fix NASM detection]] if a ''-P'' pre-include file emits a warning. This would break the invariant that the first line contain listing line number 1 (it shows line 0 instead) and that it contain no dump nor warning nor note. This would in turn break things like section change detection. This happened because lDOS's nasm.mac accidentally included a lone dot in the first line, which was treated as an orphan label with the corresponding warning. ===== Symbolic support scripts ===== * [[https://hg.pushbx.org/ecm/symscr/rev/bdaf219dbfaf|Simplify %00 handling]], replace the %00 in the ''matchsource'' object and fall through, rather than adding an ''alabel'' ourselves. * [[https://hg.pushbx.org/ecm/symscr/rev/9efce7c90f41|Add the equate field to alabel tuple type]], and add ''handlelabelorequate'' function (almost a no-op at this point). * Fix, [[https://hg.pushbx.org/ecm/symscr/rev/51476255fc67|the empty label needs equate = None]] not False. * [[https://hg.pushbx.org/ecm/symscr/rev/a45821243df7|Process equate symbols that are equated to dollar sign or another label]], with support for simple constant addition or subtraction. Equates are never local label base labels. However, both their own names and the names that they reference may be local labels that go through the usual expansion. * In process.pl, [[https://hg.pushbx.org/ecm/symscr/rev/f94b671bfc45|assume origin zero]] if none specified. * In processt.py, [[https://hg.pushbx.org/ecm/symscr/rev/db69dc16fb32|support letter S in hex dumps]], which is used for ''-f obj'' segment relocations. * [[https://hg.pushbx.org/ecm/symscr/rev/e218035ab1c4|Sort sections on base]] before display. * [[https://hg.pushbx.org/ecm/symscr/rev/6f10556312f3|Initial commit of bump.pl]] * [[https://hg.pushbx.org/ecm/symscr/rev/9c8b002be1fa|Add the E. of ecm initials, and update attribution years]], in process.pl and sendser.pl ==== Bump script ==== This script, bump.pl, is written specifically for the DOSCODE section/group of the lDOS kernel build. The section starts with a vstart of zero, like any usual OMF group, but its first 50h bytes are discarded early. Relocation starts at offset 50h. This is needed because DOSCODE may be relocated into the HMA. If the DOSCODE program section started at linear 10_0000h and was addressed using segment FFFFh, then it would start at offset 10h (last paragraph of the ROM-BIOS is below this offset). However, it actually is addressed using segment FFFEh, adding 10h to the offset. Further, the VDISK header/BPB is at linear 10_0000h, and takes 20h bytes, so add 20h to the offset. Finally, the first HMCB is behind the VDISK header, adding another 10h bytes. This gives a total offset of 50h to address the actual start of the DOSCODE section. The eventual symbolic lDebug base relocation support will kick in when relocation of a byte corresponding to a section start symbol is detected. This would never activate for DOSCODE as is because the relocation starts at offset 50h rather than offset 0. So with bump.pl, which is used like ''./bump.pl msbio.sym -%%%%-adjust 0x50 -%%%%-section DOSCODETABLE > msbio2.sym'', the DOSCODE section start is bumped to vstart 50h and all linear addresses based on it are lowered by 50h. This will allow the relocation to be detected. ===== IntList ===== All of these changes are on addlinks.pl, [[https://github.com/LoopZ/TheList/issues/133|a companion program to The List's current revision of makehtml]]. It processes the makehtml output to add hyperlinks to all the supported references in the HTML files. * [[https://hg.pushbx.org/ecm/intlist/rev/b17b1af1289d|Copy from intlist.pl file]], no change. * [[https://hg.pushbx.org/ecm/intlist/rev/eecbfd163fe6|Initial commit]]. * [[https://hg.pushbx.org/ecm/intlist/rev/e4939ed916b9|Drop some trailing blanks in the program source text]]. * [[https://hg.pushbx.org/ecm/intlist/rev/629ca0b54485|Open the tag before a table's descriptor line]]. This requires a second pass through the HTML file, as the Table indicator may be on a subsequent nonempty line which cannot be detected in time using a simple line-by-line pass. * [[https://hg.pushbx.org/ecm/intlist/rev/7e7fb01a0ab0|Support reg-only hyperlinks]] in INTERRUP.LST entries. * Fix, [[https://hg.pushbx.org/ecm/intlist/rev/25ba44ea2fd3|reset the find variables for every hyperlink]]. If a table hyperlink was followed by an interrupt with registers hyperlink on the same line, the registers would be ignored. Now the variables are reset correctly. * [[https://hg.pushbx.org/ecm/intlist/rev/98dcd531d11f|Speed up processing by using separate arrays]]. This change reduced the time for a full list on our server from >8min to <100s. It uses one array per interrupt number, and one array each for tables, ports, memory, and far calls. * [[https://hg.pushbx.org/ecm/intlist/rev/213e40735305|Speed up more]]. This reduces the time to 70s. It uses separate arrays for every combination of an interrupt number and an AH register value. It is possible that an even greater speedup could be achieved by splitting more registers into perl hashes rather than relying on scanning the arrays for matching register hash values. But that would be more work and it isn't obvious how exactly to partition the data. {{tag>ldebug ldebug.exp symsnip warplink ldos msdos4 tractest convlist.pl symscr intlist addlinks.pl}} ~~DISCUSSION~~