====== Early September work ====== **2025-09-07** ===== fixupp ===== To help port the default overlay manager of WarpLink to NASM, we had to use symbols starting with a dollar sign. But [[https://bugzilla.nasm.us/show_bug.cgi?id=3392922|NASM didn't support those]]. (In the upcoming NASM v3.00 some support has been added.) To bridge this gap, I [[https://hg.pushbx.org/ecm/fixupp/rev/07e8e8cbf669|modified the trusty fixupp utility]] once [[https://github.com/SvarDOS/edrdos/issues/113#issuecomment-3243053817|again]]. It will now replace one or more leading "D." in section, class, or symbol names by a dollar sign each. ===== fixmem ===== I modified fixmem during my use for porting the WarpLink overlay manager. * [[https://hg.pushbx.org/ecm/fixmem/rev/8f2c8d4134de|Treat SEG keywords like OFFSET]], indicating the operand is an immediate. * [[https://hg.pushbx.org/ecm/fixmem/rev/44adc3f5dad6|Handle COMM directive]]. * [[https://hg.pushbx.org/ecm/fixmem/rev/2fb5238d1d32|Allow dots in section names]]. * [[https://hg.pushbx.org/ecm/fixmem/rev/4f69441ea0e3|Add --replace-dollar switch]] as a companion to the new fixupp feature. * [[https://hg.pushbx.org/ecm/fixmem/rev/00772637f70b|Add the equals sign as a valid separator]] before a name for dollar replacement. * [[https://hg.pushbx.org/ecm/fixmem/rev/7f18b3cb09fb|Allow dots in ENDS segment names]]. * [[https://hg.pushbx.org/ecm/fixmem/rev/28486458c36c|Allow dot in NASM section directive's section name]]. * [[https://hg.pushbx.org/ecm/fixmem/rev/b786bef344ed|Fix two bugs]] (capitalisation sensitive match and priority of keywords) so that indirect branch with a DWORD keyword is converted to a far branch. * When calling a far procedure, [[https://hg.pushbx.org/ecm/fixmem/rev/d7c12706e84b|add a far keyword or push cs instruction]] (depending on which segment is active). * [[https://hg.pushbx.org/ecm/fixmem/rev/c7e92fdc7800|Update attribution year]]. * [[https://hg.pushbx.org/ecm/fixmem/rev/ac515f59dbbf|Fix a match to be nongreedy]] so End Of Line match works as intended. * [[https://hg.pushbx.org/ecm/fixmem/rev/0e57d6709e50|Replace leading dollar signs in class names]] too. (Would be skipped because class names are specified with single quotes in the original code.) * [[https://hg.pushbx.org/ecm/fixmem/rev/db0821156c5b|Fix another spot expecting no dots]] in section names. * Enter allcaps equate name for sections if exact section switch not given. This [[https://hg.pushbx.org/ecm/fixmem/rev/3c8c1e0799f9|avoids creating port equates that are the reverse of what is needed]], immediately before the section directives. * [[https://hg.pushbx.org/ecm/fixmem/rev/b3bccc807771|Detect addequate or addlabel call without a valid canonical name]]. This should not happen ever. ===== instsect ===== Add a NASM v2.17 / v3.00 ''%note'' directive [[https://hg.pushbx.org/ecm/instsect/rev/b780f030905d|to reference nested listing files]], used for the boot sector files included using incbin. This allows to create a complete .tls trace listing that includes the boot sector loaders. ===== lDebug ===== * [[https://hg.pushbx.org/ecm/ldebug/rev/df6a621cef40|Create .map files for ELDs]]. * [[https://hg.pushbx.org/ecm/ldebug/rev/b9b5a10d1029|Update eldlink.asm attribution year]]. * Improve .map files generated from extlib.asm [[https://hg.pushbx.org/ecm/ldebug/rev/dcaaf8507e72|to include the library filenames in labels]]. * [[https://hg.pushbx.org/ecm/ldebug/rev/636222bb9b58|Comment out a line]] of a multi-line comment that was misdetected by convlist.pl as a segment directive. * In helpdepk.asm [[https://hg.pushbx.org/ecm/ldebug/rev/918711920c03|do not include in the listing all the stand-alone code]], particularly omitting the section directives. * [[https://hg.pushbx.org/ecm/ldebug/rev/8304e68ec140|Introduce the hiddenusesection mmacro]] which emits the expansion of its section name into the listing file using a ''%note'' directive. * In makinst.sh [[https://hg.pushbx.org/ecm/ldebug/rev/25abf322533f|add the _PAYLOAD_PREFIX_LST define]] for building instsect. ===== WarpLink ===== * [[https://hg.pushbx.org/ecm/warplink/rev/3cef7a07fcf5|Update acbp byte with the correct alignment order]] if DWORD present. (The changeset message includes a lengthy test case.) This affected the then most recent lDOS kernel build which got a DWORD alignment for the overall SYSINITTRAIL where a PARA alignment was desired. * [[https://hg.pushbx.org/ecm/warplink/rev/a85145bf4f62|Increment ecm release]] to r3. * [[https://hg.pushbx.org/ecm/warplink/rev/a1a5e4378c92|Fix a check for "paragraph alignment or better"]] which would misdetect DWORD as a "better" alignment than PARA. This affects only overlay file sections. (Again, the changeset message includes a test case.) * [[https://hg.pushbx.org/ecm/warplink/rev/392d2399f956|Copy ovlmgr.nas]] from ovlmgr.asm * [[https://hg.pushbx.org/ecm/warplink/rev/951ffab95c73|Run fixmem.pl on ovlmgr.nas]] * [[https://hg.pushbx.org/ecm/warplink/rev/9bfaef491a82|Swap reversed section port equates]] (later fixed in fixmem.pl). * [[https://hg.pushbx.org/ecm/warplink/rev/1936f2dee1ed|Avoid segment attribute redefinition warnings]]. * [[https://hg.pushbx.org/ecm/warplink/rev/661d4d2faac8|Add updated macro file nasm2.mac]] picked [[https://hg.pushbx.org/ecm/msdos4/file/5f7376b98eec/src/INC/nasm.mac|from msdos4 repo]]. * [[https://hg.pushbx.org/ecm/warplink/rev/bd8e2f91e475|Identicalise three far branches]] and a missing push cs (also fixed in fixmem.pl later). * [[https://hg.pushbx.org/ecm/warplink/rev/34d49b7245d4|Identicalise even directives]] to emit nop to match TASM build. * [[https://hg.pushbx.org/ecm/warplink/rev/719d9c7c2e66|Build ovlmgr.obj using NASM]] and fixupp. * [[https://hg.pushbx.org/ecm/warplink/rev/fade3d7bc1e0|Rerun updated fixmem.pl]] * [[https://hg.pushbx.org/ecm/warplink/rev/8b5d055fc2a9|Re-apply patch to avoid segment attribute redefinition warning]]. * [[https://hg.pushbx.org/ecm/warplink/rev/6a4235572afb|Re-apply patch to emit NOP for even directives]]. * [[https://hg.pushbx.org/ecm/warplink/rev/3d0361be1581|Merge]]. * [[https://hg.pushbx.org/ecm/warplink/rev/3ff98d7a04bd|Add ENDS comment for added section directive]]. * [[https://hg.pushbx.org/ecm/warplink/rev/abd3839c0c59|Add a new section mmacro]] to nasm.mac and nasm2.mac which avoids the segment attribute redefinition warning if struc uses %%__SECT__%% to restore a section. * [[https://hg.pushbx.org/ecm/warplink/rev/705702d31734|Undo ovlmgr.nas changes]] to avoid the segment attribute redefinition warnings. * [[https://hg.pushbx.org/ecm/warplink/rev/3cd5bfc55763|Fix segment mmacro with %00 segment name]] (not used). ===== ident86 ===== The updates to the identicalisation tool are mainly to help identify NASM encoding choice differences, which turned out to all be in xchg reg,reg instructions. * [[https://hg.pushbx.org/ecm/ident86/rev/a33e4f6e652d|Add -D switch]] to dump all instructions with different byte values, even if the semantics mean "no difference". * [[https://hg.pushbx.org/ecm/ident86/rev/ba906fb7cfb1|Add -Y switch]] to highlight (with reverse video) the length indicators of disassembled instructions with mismatching byte values. * [[https://hg.pushbx.org/ecm/ident86/rev/49bbf53c3493|Add another check for -Y switch]] to highlightdump, may be faster. * [[https://hg.pushbx.org/ecm/ident86/rev/6f2462a34988|Support .tls switch to base lines]] with negative bases. * [[https://hg.pushbx.org/ecm/ident86/rev/27891b6676b4|Support NASM -f bin .map files]]. * [[https://hg.pushbx.org/ecm/ident86/rev/3e527b5e6275|Increment the last startrange for figuring out the inverted map ranges]], so that the last inverted range has 0FFFF_FFFFh as its end value. * [[https://hg.pushbx.org/ecm/ident86/rev/facd9e0f0485|Increment valid priorendrange value]] for calculation of inverted map ranges, fixing the exact boundary. * For NASM .map file [[https://hg.pushbx.org/ecm/ident86/rev/08fe578afac1|fix the sign of the org adjustment]] so it works as intended. * [[https://hg.pushbx.org/ecm/ident86/rev/6ca70da8d443|Add in args.offset to NASM .map ranges]]. * [[https://hg.pushbx.org/ecm/ident86/rev/9a8e8bf6ee4a|Undo prior changeset, and delete addition of args.offset to the inverted map ranges]] too. The args.offset is added once, to the map ranges. * If a firstdifference instruction is not found during the .tls scan, and it points into an inverted map range, [[https://hg.pushbx.org/ecm/ident86/rev/0aa5447baa84|set start to firstdifference]]. This avoids disassembling some instructions before the different byte unnecessarily. (This was apparent only with the -D switch.) * If not done and difference is in an inverted range, [[https://hg.pushbx.org/ecm/ident86/rev/c31633234f93|add a tls directive]]. * [[https://hg.pushbx.org/ecm/ident86/rev/b76a3386efcd|Display a message in findsourceline if searching for the -j switch]] and the range is in an inverted map range. This is instead of ending the run with a ListingError exception. * Comment out code of a prior changeset [[https://hg.pushbx.org/ecm/ident86/rev/e153012ab685|for adding to tls directives]]. * Comment on the commented code [[https://hg.pushbx.org/ecm/ident86/rev/9d48f7119e2b|that addlistu handles the missing directives]]. * [[https://hg.pushbx.org/ecm/ident86/rev/e6a5a8feeb6e|Hide new debugging output by default]]. * [[https://hg.pushbx.org/ecm/ident86/rev/d47d4354559e|Fix if start points before the end of a file section]] but firstdifference points at alignment. Would dump the last instruction from the file wrongly. ===== tractest ===== * [[https://hg.pushbx.org/ecm/tractest/rev/cdd33c53b5e3|Add sortmap.pl switch]] to list alignment. * [[https://hg.pushbx.org/ecm/tractest/rev/266423d9bad9|Parse overlay number]]. * [[https://hg.pushbx.org/ecm/tractest/rev/ad39275c7923|Add sortmap.pl switch]] to allow disabling or enabling listing of overlay sections. * In sortmap.pl [[https://hg.pushbx.org/ecm/tractest/rev/1a9adfc72e65|allow trailing blanks after section name]] if empty class name. * For sortmap.pl [[https://hg.pushbx.org/ecm/tractest/rev/8f88f3fbf027|support NASM -f bin format .map file]]. * In convlist.pl [[https://hg.pushbx.org/ecm/tractest/rev/83804fdd04c5|fix .data: misdetected as a MASM sectioning directive]]. * [[https://hg.pushbx.org/ecm/tractest/rev/f42f45539dbd|Update attribution year]]. * [[https://hg.pushbx.org/ecm/tractest/rev/fc5bf64b4745|Support new NASM %note directive for section changes]]. * [[https://hg.pushbx.org/ecm/tractest/rev/6ef3ab82a6ae|Start to support NASM -f bin map files]]. * [[https://hg.pushbx.org/ecm/tractest/rev/19c3d0ade65e|List negative bases with a minus sign]]. * In listvars.pl [[https://hg.pushbx.org/ecm/tractest/rev/41d13bce1c25|support switch to negative base]]. * In convlist.pl [[https://hg.pushbx.org/ecm/tractest/rev/02afad5ca42c|support %note for including other listing files]]. * [[https://hg.pushbx.org/ecm/tractest/rev/6d050fbc4de9|Some support for .xma and .xls file name extensions]] (used by lDebug XLDs). * In convlist.pl detection of ''.data:'' [[https://hg.pushbx.org/ecm/tractest/rev/283e0ffdc8df|check that the parameter for the colon is defined]] before using eq. * [[https://hg.pushbx.org/ecm/tractest/rev/12d422722071|Support negative vstart in NASM .map file]]. * [[https://hg.pushbx.org/ecm/tractest/rev/878656600b51|Support negative org and start]]. * [[https://hg.pushbx.org/ecm/tractest/rev/44c455b5b1a8|Avoid use of undefined $base, set it to zero instead]]. * In traclist.pl [[https://hg.pushbx.org/ecm/tractest/rev/346e649428e8|allow offsets to be negative]], as needed for lDOS device bases. (The DOSENTRY section at segment 60h contains entries addressed using segment 70h, needing a minus 256 offset for TracList.) ===== lDOS kernel ===== * [[https://hg.pushbx.org/ecm/msdos4/rev/95a140899091|Do not align SYSINITSEG and SYSINITTRAIL to paragraph boundary]] in msdos/msinit.nas. (This exposed a bug in WarpLink r2 that didn't align SYSINITTRAIL correctly.) * [[https://hg.pushbx.org/ecm/msdos4/rev/301440b9d792|Note that WarpLink r3 is needed]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/5f7376b98eec|Update ksection.txt sections list]] with the new revision and add the new -%%%%-list-align switch. * Add to nasm.mac [[https://hg.pushbx.org/ecm/msdos4/rev/1306c35eaa1d|the new section mmacro that avoids segment attribute redefinition warnings]] on struc use. * [[https://hg.pushbx.org/ecm/msdos4/rev/637cfcc5a4d1|Avoid the remaining cases of segment attribute redefinition warnings]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/569ffb386a04|Fix segment mmacro with %00 section name]] (not used?). * Add to makinst.sh [[https://hg.pushbx.org/ecm/msdos4/rev/4da7e67bf5e5|the _PAYLOAD_PREFIX_LST define]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/2ebcf4b5b5ca|Add the makinstl.sh script to generate an instsect.tls trace listing file]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/dc03f20973f7|Align amis_sign on a word boundary]], burning two bytes of padding before 70h:B0h in DOSENTRY. {{tag>fixupp fixmem instsect ldebug warplink identt86 tractest convlist.pl sortmap.pl traclist.pl ldos}} ~~DISCUSSION~~