User Tools

Site Tools


blog:pushbx:2026:0210_early_february_work_on_warplink

Differences

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

Link to this comparison view

blog:pushbx:2026:0210_early_february_work_on_warplink [2026-02-10 16:36:09 +0100 Feb Tue] (current)
ecm created
Line 1: Line 1:
 +====== Early February work on WarpLink ======
 +
 +**2026-02-08**
 +
 +This week I worked on WarpLink some and a bit on the lDOS kernel. The lDOS changes are to make use of a new feature, the WLCALC post-link calculation.
 +
 +
 +===== WarpLink =====
 +
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/7d4588211863|Fix a bug]] where files without fixups would fail to initialise data_fixup_count. This is described in some detail [[blog:pushbx:2026:0204_chasing_a_warplink_bug|in a prior blog post]].
 +  * Fix: [[https://hg.pushbx.org/ecm/warplink/rev/1baa678c4b50|Display symbol properly for the COMM_OVRFLW_ERR]]. This required patching the linker to force this error to occur. It doesn't seem like NASM is able to generate object files that would legitimately cause this error.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/0b46ccc4caf7|Initial commit of WLCALC labels]]. Only DIV, SHR, ADD, SUBR, and SUB operations supported. Only a decimal constant up to 65535 supported.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/995911164330|Add switches]]: /XE (support WLEMITALIGN sections), /XC (support WLCALC), and /XA (equivalent to using both /XE and /XC). Without these switches specified, the extensions are disabled now.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/34c7083713ad|Update ecm release]] to r7.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/5ad22fc75a32|Add wlcalc MUL, SHL, XOR, OR, AND operations]].
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/12a321692df7|Add CLR operation]].
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/f8f515d56b68|New wlcalc_parse_number]], based on the number parsing [[https://hg.pushbx.org/ecm/patchini/file/806898e89f1b/patldos.c#l196|in patchini/patldos]] and [[https://hg.pushbx.org/ecm/msdos4/file/766df35bd8d7/src/BIOS/msinit.nas#l2611|the lDOS kernel]]. This allows to enter 32-bit constants in decimal, hexadecimal, or binary.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/4c550ec64eca|Add a non-emitting copy of the handle_wlcalc lframe]] so that the wlcalc_do_* functions can access the same stack frame.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/854f93317d34|Store a dword constant number]] into the stack frame in handle_wlcalc
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/6407b94961c1|Correct the indirect call in handle_wlcalc]] to read ''call near''.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/33b164f7a7a9|Add a protocol comment to the wlcalc_do_* functions]], and add bx as INP and as CHG.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/89d454809aec|Fix wlcalc_parse_number to use base 16]] for H suffix.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/904da62a5bfe|Support full 32-bit wlcalc calculations]]. (Except for shift counts, which are limited to 16 bits.)
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/e4454fa04913|Allow a hex constant that starts with a letter]] A to F.
 +  * Fix, [[https://hg.pushbx.org/ecm/warplink/rev/202a04afa798|strip trailing underscores in wlcalc_parse_number]] (wouldn't allow base suffixes if they were followed by underscores).
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/0c2a0d8e32d2|Support wlcalc REPEAT keyword]] to repeatedly apply an operation.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/ee5666cbee2d|Implement wlcalc passes to enforce an order of operations]] that may differ from the order that the wlcalc symbols appear in the object files.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/a225fca16b0f|Increase ecm release]] to r8.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/83af4b81cb3f|Fix the sense of the 16-bit overflow checks]] for shift counts.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/13835c93aa1f|Fix to allow writing a .COM file]] after the addition of partial write checks. This is an older bug that wasn't noticeable prior to [[https://hg.pushbx.org/ecm/warplink/rev/6fe1ccef6b07|the 2025-09-20 changeset]] due to the less exact check then. Described in more detail in the changeset message.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/5095d9506548|Fix wlcalc addressing of .COM file]].
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/91760d387f06|Fix a latent bug in the calculation of the length of the header padding]] (between relocation table and the image). As described in the comments, the conditions for this bug were and are never met.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/07f3c563d9fe|Replace "K" by "KiB", and pad tbuff with blanks]].
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/7f622c59fb63|Increase ecm release]] to r9.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/4407c134f32d|Fix tbuff display length]] after the prior change.
 +  * [[https://hg.pushbx.org/ecm/warplink/rev/38e1ca714b5d|Fix to detect a CY (returned by int 21h function 40h)]] after writing a relocation entry. This is actually an older bug, even the check [[https://hg.pushbx.org/ecm/warplink/rev/6fe1ccef6b07|prior to 2025-09-20]] used an ''or'' instruction that would unconditionally NC so the ''jnc'' would always be taken.
 +
 +
 +===== lDOS kernel =====
 +
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/4046b7e58d65|Enable WarpLink r9 /XE option]] to build share.exe
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/942e7214fb2a|Add wlcalc mmacro]] to nasm.mac
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/76205f9326f6|Enable WarpLink r9 /XC option]] to build kernel.
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/eabecdbf3e70|Replace some run time calculations]] in the kernel by using wlcalc. This change preserves all offsets in the kernel image, allowing to check the changes using bdiff.
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/61aa2e269084|Drop the code no longer needed]] after prior commit. This is the change that doesn't preserve offsets.
 +  * [[https://hg.pushbx.org/ecm/msdos4/rev/bd9b2eb7477a|Replace msinit.nas dosentry_init_ParaRound]] by using wlcalc instead.
 +
 +{{tag>warplink msdos4 ldos}}
 +
 +
 +~~DISCUSSION~~
  
blog/pushbx/2026/0210_early_february_work_on_warplink.txt · Last modified: 2026-02-10 16:36:09 +0100 Feb Tue by ecm