User Tools

Site Tools


blog:pushbx:2025:0803_july:august_work

Differences

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

Link to this comparison view

blog:pushbx:2025:0803_july:august_work [2025-08-03 17:44:25 +0200 Aug Sun] (current)
ecm created
Line 1: Line 1:
 +====== July/August work ======
 +
 +**2025-08-03**
 +
 +
 +===== callver, fdapm, seekext =====
 +
 +Preserve CF when chaining to the int 21h downlink:
 +
 +  * [[https://hg.pushbx.org/ecm/callver/rev/fd67af5c53ee|callver]]
 +  * [[https://hg.pushbx.org/ecm/fdapm/rev/4273b80cbdfb|fdapm]]
 +  * [[https://hg.pushbx.org/ecm/seekext/rev/891871367fb2|seekext]]
 +
 +For seekext, additionally:
 +
 +  * [[https://hg.pushbx.org/ecm/seekext/rev/09a6e60ac832|Increment version number]] to 1.22
 +  * [[https://hg.pushbx.org/ecm/seekext/rev/370a6b3c3d80|Update attribution year]] from 2024 to 2025.
 +
 +Preserving CF for int 21h handlers is based on [[https://stackoverflow.com/questions/79718245/replacing-int-21h-vector-in-dos/79718591#79718591|an answer on stackoverflow]] in which I modified an example to create an int 21h hook that can call its downlink (using pushed flags and a far call). The needed modifications:
 +
 +  * Pass CF and ZF returned from the downlink call to our caller, done using ''lahf'' and setting up ''bp'' to access the iret frame.
 +  * Chain certain functions (00h, 26h, 31h, 4Bh, 4Ch) using a far jump to the downlink rather than using the pushf and far call. As mentioned, [[https://github.com/dosemu2/dosemu2/blob/2740d3b92c96c1d922f37c5c3b5748748713646e/src/base/core/int.c#L1646|dosemu2 passes the same functions like a jump]].
 +  * Pass input flags to the downlink (either in the far call or far jump). DOS probably doesn't care about the live flags in the ''fl'' register, but another caller using ''pushf'' would pass along the live ''fl'' to its iret stack frame.
 +  * Free the environment and close all process file handles.
 +
 +
 +===== LZEXE =====
 +
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/26e47b4be4f6|Allow to disable long literal support]] at build time in lzss.nas
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/97505fece293|Allow to disable 4 KiB window support]] at build time in lzss.nas
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/42837afbd5f4|Add a third build of lzss.nas]], for lzexedat.
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/047eb26e8f09|Disable -l and -4 support]] in the lzss.nas builds for TPC and FPC lzexe.pas
 +  * lzexedat: [[https://hg.pushbx.org/ecm/lzexe/rev/e70d8b65bf61|Move the input and output buffers]] into a separate segment called BUFFER.
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/b5ca0793cbf2|Rename mak.sh to maktpc.sh]]
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/e18ca4c97cc8|Add new mak.sh]] which calls makfpc.sh
 +  * Fix [[https://hg.pushbx.org/ecm/lzexe/rev/ae383bab0476|to use different listing filenames]] for the three builds of lzss.nas
 +  * doc: [[https://hg.pushbx.org/ecm/lzexe/rev/b763c766e005|Update news-r4]]
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/591e731a02bf|Increment ecm release]] to 4
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/d740754e6fad|Add -c switch to lzexedat]] to use 0000h as the combined word for EOS and segment change commands, and document it (also [[https://hg.pushbx.org/ecm/lzexe/rev/7a8376539801|in the news]]).
 +  * lzexedat: Fix [[https://hg.pushbx.org/ecm/lzexe/rev/f7acbd737d6a|a branch to openoutfile.error]] which was accidentally jumping to openinfile.error
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/49bf4e9842cb|Add file depack.asm]] picked [[https://hg.pushbx.org/ecm/ldebug/file/3365baad70ae/source/eld/depack.asm|from lDebug repo]].
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/768cb8ce5d1e|Add lzexedat -d mode]] to depack instead of packing.
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/f75ef7d5f495|Document -d and -h switches]] to lzexedat.
 +  * [[https://hg.pushbx.org/ecm/lzexe/rev/aaa598aa7d6c|List -d and -h switches]] in the news-r4 section.
 +  * Optimise depack.asm:
 +    * [[https://hg.pushbx.org/ecm/lzexe/rev/121540c8ec9c|Add _DXTAG option to keep the tag word in dx]], rather than the offset behind the circular buffer's end. (Picked [[https://hg.pushbx.org/ecm/ldebug/rev/28ae9561f94f|from lDebug repo]].)
 +    * [[https://hg.pushbx.org/ecm/lzexe/rev/faeac53648b5|Re-use part of get_bit to initialise]] the tag word. (Picked [[https://hg.pushbx.org/ecm/ldebug/rev/d858824bd6a8|from lDebug repo]].)
 +    * [[https://hg.pushbx.org/ecm/lzexe/rev/7a0bc7e19cbb|Store the tag position as a cycle mask]] rotating a single set bit through the word's 16 bits instead of a byte counter that counts down from 16. The advantage is one instruction less as the cycle mask needn't be re-initialised like the counter does need to be. (Picked [[https://hg.pushbx.org/ecm/ldebug/rev/de21e6dadac6|from lDebug repo]].)
 +
 +
 +===== inicomp lzexedat.asm =====
 +
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/4c9a251c0216|Add testfile display]] of every literal (extra verbose), EOS, seg change, and long literal commands (extra verbose or exceptional). (Extra verbose means two -v switches specified.)
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/9e54ccef10ab|Add dest and src displays]] to long command display.
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/5f76fe56139b|Shorten the long literal length display text]]. (Avoid wrapping at the end of the terminal's line length.)
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/ba8c1d65f908|Add testfile -c switch]] for "commands verbose". Commands extra verbose or extra verbose causes all long commands to be dumped. Commands verbose without the other two causes EOS and seg change commands to be dumped, but long literals commands are hidden.
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/4fcc60decf0a|Shorten the match display text]].
 +  * Same optimisations as two of the ones for LZEXE depack.asm:
 +    * [[https://hg.pushbx.org/ecm/inicomp/rev/bb0f2db346f4|Re-use get_bit to initialise tag word]].
 +    * [[https://hg.pushbx.org/ecm/inicomp/rev/fa3ec71390bf|Store tag position as a cycle mask]].
 +  * [[https://hg.pushbx.org/ecm/inicomp/rev/fb3dd196d7c5|Fix testfile mode]], calculate "tag bits left" counter value from the cycle mask. This emulates the prior output without actually using the counter internally.
 +
 +
 +===== Interc3 =====
 +
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/2dcb2350b828|Do early check for sp size]], checked later in process. This allows LZEXE's comtoexe to detect the minimum required memory block size.
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/201f41347bf9|Add the E.]] of my initials and update some attribution years.
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/989ddca2cc3c|Correct a typo]] in a comment.
 +  * Use the hw reset retf in interrupt handlers [[https://hg.pushbx.org/ecm/interc3/rev/0eef31934ac3|as a trampoline]] to help debugging. In particular, lDebug's P command can work with the call near instruction now as the instruction immediately following this call is used as the trampoline instruction. (Prior to this the debugger would not re-gain control as expected.)
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/a7ce1f5810ca|Update a forgotten attribution year]].
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/aeb992402faa|Fix E comma in initials]] rather than E dot.
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/aba39da75287|Add files isstring.asm and pathshar.asm]] picked [[https://hg.pushbx.org/ecm/ldebug/file/6f763d1afffd/source|from lDebug repo]].
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/aa091f33eea5|Search path for application executable]], and guess the filename extension (.COM or .EXE).
 +  * doc: [[https://hg.pushbx.org/ecm/interc3/rev/7753cd655ff5|Update list item]] on path search.
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/11bf708f4463|Update attribution year]] in pathshar.asm
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/62c6b2055674|Pass the input command]] to interpre, not what the path search expanded it into.
 +  * Fix [[https://hg.pushbx.org/ecm/interc3/rev/c740d4bf934b|to add 2-byte padding after the buffer]] for path search expansion. This is used for the executable's terminating NUL and the command line tail counter byte.
 +  * [[https://hg.pushbx.org/ecm/interc3/rev/2b3274aba7fb|Align the interpre.dat buffer]] to a paragraph boundary.
 +
 +
 +===== lDebug =====
 +
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/3365baad70ae|Add _DATEXE option]] to build depack.asm for inclusion in lzexedat utility.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/eb83308d469f|Enable lzexedat -l option by default]] for building compressed extpak.eld
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/12daf509379d|Do not create subdirectories]] for every help file when compressing the help using lzexedat -4, these were only needed for the temporary heatshrink files.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/28ae9561f94f|Add _DXTAG option]] to depack.asm (same as for LZEXE).
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/5f9454b9cd29|Fix for empty messages]] (in practice only msg.options_5) with lzexedat-packed help. The encoded string needed to be fixed, and the comparisons to detect an empty message had to be updated.
 +  * Optimise initialisation of tag word by re-using get_bit:
 +    * [[https://hg.pushbx.org/ecm/ldebug/rev/d858824bd6a8|In eld/depack.asm]]
 +    * [[https://hg.pushbx.org/ecm/ldebug/rev/6c34455e3d2d|In helpdepk.asm]]
 +  * Store tag position as a cycle mask:
 +    * [[https://hg.pushbx.org/ecm/ldebug/rev/de21e6dadac6|In eld/depack.asm]]
 +    * [[https://hg.pushbx.org/ecm/ldebug/rev/7feca200620b|In helpdepk.asm]]
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/6f763d1afffd|Adjust pathshar.asm]] for use in INTERC3.
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/e1d0ad103f35|Update attribution year]] in pathshar.asm
 +  * In expr.asm [[https://hg.pushbx.org/ecm/ldebug/rev/d4c693bcbac8|support reg8+reg16 register pairs]] that form a 3byte (24-bit number).
 +  * [[https://hg.pushbx.org/ecm/ldebug/rev/b11b6f28599d|Update news-r10 with 3byte register pairs]], document in varref the 3byte register pairs and also the register + "00" register pairs. (The 16-bit register + "00" pairs already had been supported for much longer, but not documented.)
 +
 +{{tag>callver fdapm seekext lzexe inicomp interc3 ldebug}}
 +
 +
 +~~DISCUSSION~~
  
blog/pushbx/2025/0803_july/august_work.txt ยท Last modified: 2025-08-03 17:44:25 +0200 Aug Sun by ecm