This is an old revision of the document!
Table of Contents
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 NASM didn't support those. (In the upcoming NASM v3.00 some support has been added.)
To bridge this gap, I modified the trusty fixupp utility once 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.
- Treat SEG keywords like OFFSET, indicating the operand is an immediate.
- Add --replace-dollar switch as a companion to the new fixupp feature.
- Add the equals sign as a valid separator before a name for dollar replacement.
- 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, add a far keyword or push cs instruction (depending on which segment is active).
- Fix a match to be nongreedy so End Of Line match works as intended.
- Replace leading dollar signs in class names too. (Would be skipped because class names are specified with single quotes in the original code.)
- Fix another spot expecting no dots in section names.
- Enter allcaps equate name for sections if exact section switch not given. This avoids creating port equates that are the reverse of what is needed, immediately before the section directives.
- 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 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
- Improve .map files generated from extlib.asm to include the library filenames in labels.
- Comment out a line of a multi-line comment that was misdetected by convlist.pl as a segment directive.
- In helpdepk.asm do not include in the listing all the stand-alone code, particularly omitting the section directives.
- Introduce the hiddenusesection mmacro which emits the expansion of its section name into the listing file using a
%notedirective. - In makinst.sh add the _PAYLOAD_PREFIX_LST define for building instsect.
WarpLink
- 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.
- Increment ecm release to r3.
- 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.)
- Copy ovlmgr.nas from ovlmgr.asm
- Swap reversed section port equates (later fixed in fixmem.pl).
- Identicalise three far branches and a missing push cs (also fixed in fixmem.pl later).
- Identicalise even directives to emit nop to match TASM build.
- Build ovlmgr.obj using NASM and fixupp.
- 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.
- Undo ovlmgr.nas changes to avoid the segment attribute redefinition warnings.
- 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.
- Add -D switch to dump all instructions with different byte values, even if the semantics mean "no difference".
- Add -Y switch to highlight (with reverse video) the length indicators of disassembled instructions with mismatching byte values.
- Add another check for -Y switch to highlightdump, may be faster.
- Support .tls switch to base lines with negative bases.
- Increment the last startrange for figuring out the inverted map ranges, so that the last inverted range has 0FFFF_FFFFh as its end value.
- Increment valid priorendrange value for calculation of inverted map ranges, fixing the exact boundary.
- For NASM .map file fix the sign of the org adjustment so it works as intended.
- 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, 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, add a tls directive.
- 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 for adding to tls directives.
- Comment on the commented code that addlistu handles the missing directives.
- 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
- Add sortmap.pl switch to list alignment.
- Add sortmap.pl switch to allow disabling or enabling listing of overlay sections.
- In sortmap.pl allow trailing blanks after section name if empty class name.
- For sortmap.pl support NASM -f bin format .map file.
- In convlist.pl fix .data: misdetected as a MASM sectioning directive.
- In listvars.pl support switch to negative base.
- In convlist.pl support %note for including other listing files.
- Some support for .xma and .xls file name extensions (used by lDebug XLDs).
- In convlist.pl detection of
.data:check that the parameter for the colon is defined before using eq. - In traclist.pl 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
- 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.)
- Update ksection.txt sections list with the new revision and add the new --list-align switch.
- Add to nasm.mac the new section mmacro that avoids segment attribute redefinition warnings on struc use.
- Fix segment mmacro with %00 section name (not used?).
- Add to makinst.sh the _PAYLOAD_PREFIX_LST define.
- Align amis_sign on a word boundary, burning two bytes of padding before 70h:B0h in DOSENTRY.
