User Tools

Site Tools


blog:pushbx:2026:0304_late_february_early_march_work_on_warplink

Late February (+ early March) work on WarpLink

2026-03-01

ETA 2026-03-04:

  • Fix a fairly harmless bug: zero_mem_image would write to a final word rather than a byte if given an odd length.
  • Add the /TZ switch to force use of a temporary file.
  • Fix cutting the 256-byte prefix with /TZ /C switches. This error could occur in the original WarpLink revision, but only if the setup_exe_image function (in mlimage1.nas) found more than 20 KiB of free DOS memory but below what would be needed to hold the entire executable image. (Note that the progbits image size used to be limited to <= 64 KiB minus the 256 Bytes prefix.)
  • Rework several file write loops, and add a check of the .COM prefix contents. The check generates a warning if the /C switch is used (without /CZ), and the first 256 bytes of the image are neither all-zeroes nor all NOP instructions (value 90h bytes).
  • Add DOS error code -2 for "short read", and set it when detecting a short read in several spots. This doesn't fix all possible cases of short reads as yet. As the custom "solution" text states, a short read is likely to be an internal error of the linker.
  • Add the /XCW switch, treat /XC wlcalc "unknown" errors as warnings. This is useful to enumerate multiple wlcalc errors at once, rather than having to fix them one by one to discover the next one. The wlcalc overflow errors are unaffected. This also adds an /XLW switch for wllist, though this is less useful.
  • Fix to reset es after the _wlcalc_get_segdef_entry or _wlcalc_get_grpdef_entry functions. This seems to have caused some funny crashes. It now makes use of the fact that these functions leave ds => DGROUP.
  • Fix: Do not zero the file_mod_id field of segpart structures. I don't know why this should be cleared here. According to the comment next to it, it was "overwriting [the] unneeded file_mod_id". I don't know whether "unneeded" means this was merely to tidy up loose ends and not really needed (I hope!) or whether there is more of a reason why this should be done. In any case, it foiled my attempt to use the segpart structure's object index to get the correct object filename for wlcalc errors. I didn't notice the failure before working on lDebug's _LINK option because the clearing would set the field to zero, which is a valid object index and would appear to point to the first object file.
  • Document /XCW switch in the ecm readme file.
  • Add optional digit groups with separators to the ITOA wlcalc operation. This adds a rare use of an "inner" lframe, which re-uses the bp as set up by the outer frame (actually a non-emitting copy of the handle_wlcalc lframe here). By using lpar and lpar_return, the minimum amount of instructions (exactly 1) is used to modify sp in the function. In this case, access to the outer lframe isn't needed, but using the inner frame is still advantageous as compared to using a "nested" lframe because it uses fewer setup instructions. Also in this case, the outer frame could be used as is to add more lvar variables – but this is possible only once, whereas the inner lframe can be used for multiple functions with possibly different inner stack frames.
  • Document ITOA digit groups in the ecm readme.
You could leave a comment if you were logged in.
blog/pushbx/2026/0304_late_february_early_march_work_on_warplink.txt · Last modified: 2026-03-04 17:14:00 +0100 Mar Wed by ecm