====== Early December work ====== **2024-12-08** Today marks the 100th blog post that I wrote on the HP 95LX. It also is likely to be the last post in December due to the café closing for a few weeks starting tomorrow. ===== lDebug ===== The lDebug repo got updated some. * [[https://hg.pushbx.org/ecm/ldebug/rev/c9cd4edcabbb|Put the online help depack buffer into the message segment]], avoiding eating into the data/entry segment. Initially this was progbits allocation to simplify the change. * Introduce [[https://hg.pushbx.org/ecm/ldebug/rev/876c56d4c732|the message segment nobits size equates]]. * Fix debug.asm [[https://hg.pushbx.org/ecm/ldebug/rev/c4d7fde59d6f|to use message segment nobits size]] for BOOTCODETARGET1 * [[https://hg.pushbx.org/ecm/ldebug/rev/77c4f39ff406|Move online help depack buffer at end of message segment]], nobits, with an indirection in the case of boot help truncation. * Fix init.asm [[https://hg.pushbx.org/ecm/ldebug/rev/11d9f1a4ec5d|to use message segment nobits size]] for total boot allocation size * [[https://hg.pushbx.org/ecm/ldebug/rev/315902a4fb22|Initialise the nobits trailer of message segment]] in boot init * [[https://hg.pushbx.org/ecm/ldebug/rev/693fd95a39e7|Enable immediate assembler _IMMASM and expression evaluator in second code segment _EXPRDUALCODE]] by default * [[https://hg.pushbx.org/ecm/ldebug/rev/892505e899c5|Enable use_build_help_external and use_build_help_compressed]] by default * [[https://hg.pushbx.org/ecm/ldebug/rev/bab563dcdae9|Enumerate largest help text file]] to shrink the online help depack buffer by 246 bytes. * Only [[https://hg.pushbx.org/ecm/ldebug/rev/2fc11ce1f0a9|show hint about heatshrink Z use once]] during help compressing * [[https://hg.pushbx.org/ecm/ldebug/rev/2a180ccb35a9|Update news-r9 section]] of manual * [[https://hg.pushbx.org/ecm/ldebug/rev/a66c660ce13b|Minor heatshrink online help depacker optimisations]] ==== Online help compression ==== Compressing the online help using heatshrink, non-solid (ie every page on its own), costs about 300 bytes of code and nearly 3 KiB for the depack buffer which now lives in the message segment. However, the total memory use of the debugger as well as the size of the uncompressed executable both shrink by several kibi bytes. ==== Immediate assembler and dual code segments ==== Prior to release 9 we have now enabled [[https://pushbx.org/ecm/doc/ldebug.htm#cmdimmasm|the immediate assembler feature of the debugger]]. This is accessible to the user using dot commands, eg ''. add ax, 26'' would add 26h to the AX register and set the arithmetic flags accordingly. Most instructions are supported for this. Those involving CS or IP are implemented using a number of workarounds and "as if" processing to get the expected results. As a side effect of enabling _IMMASM, the lDebugX (DPMI-enabled) builds now employ the dual code segments. This is bad for performance but allows the code to grow more than before, limited as it was to 64 KiB. ===== MS-DOS kernel ===== * In EVEN mmacro [[https://hg.pushbx.org/ecm/msdos4/rev/66dec9882a4a|emit NOPs for BIOCODE section]] * [[https://hg.pushbx.org/ecm/msdos4/rev/7acf57f3ec18|Rename msbio CODE section]] to BIOCODE * [[https://hg.pushbx.org/ecm/msdos4/rev/bb8d87d5b105|Fix inclusion of empty TEXT and Table sections]] in msdos, and add paragraph-aligned DOSSTART * [[https://hg.pushbx.org/ecm/msdos4/rev/3ee9b0b69616|Fix inclusion of an empty TEXT section]] in msbio * [[https://hg.pushbx.org/ecm/msdos4/rev/e15d8ccd1759|Include dosseg.nas]] in msbio1.nas * [[https://hg.pushbx.org/ecm/msdos4/rev/42bbeeeb324a|Fix src/INC/MAKEFILE not listing msgserv.nas]] * Prepare src/INC/MAKEFILE [[https://hg.pushbx.org/ecm/msdos4/rev/458beefe581a|to use const2.nas ported file]] (forgotten during porting) * [[https://hg.pushbx.org/ecm/msdos4/rev/ecc135254ed6|Delete src/INC/CONST2.ASM original file]] (forgotten during porting) * Rename five variables in msdos to avoid clash with msbio variables: * [[https://hg.pushbx.org/ecm/msdos4/rev/eef796edd9c1|DAYCNT_DOS]] * [[https://hg.pushbx.org/ecm/msdos4/rev/8d1cb5cf0a54|SECCNT_DOS]] * [[https://hg.pushbx.org/ecm/msdos4/rev/7b1aec567cfc|GETBP_DOS]] * [[https://hg.pushbx.org/ecm/msdos4/rev/d64da0433a00|DELIM_DOS]] * [[https://hg.pushbx.org/ecm/msdos4/rev/06ecd58d8395|HARDERR_DOS]] * [[https://hg.pushbx.org/ecm/msdos4/rev/d8f69f0cbe91|Link the entire msdos]] at the end of msbio module * [[https://hg.pushbx.org/ecm/msdos4/rev/cdabb5df4879|Make use of the linked in msdos]] rather than that passed by lDOS drkernpl * [[https://hg.pushbx.org/ecm/msdos4/rev/3096279ab46b|Pass empty binary file]] instead of msdos.sys when building the lDOS drkernpl stage * Update msinit.nas INIT comment [[https://hg.pushbx.org/ecm/msdos4/rev/4b523ce87084|to note the passed DOS is no longer used]] * Add support for lCFG block and its check debugger field, picked from EDR-DOS changes to the same effect ([[https://hg.pushbx.org/ecm/edrdos/rev/575895d7321b|1]], [[https://hg.pushbx.org/ecm/edrdos/rev/1e453d972df2|2]]). (Lightly modified the register usage.) Split into two changesets: [[https://hg.pushbx.org/ecm/msdos4/rev/cac1f929c0ea|Pass and use lCFG block]] for two flags, and [[https://hg.pushbx.org/ecm/msdos4/rev/c288ebf7eadb|add two more flags]]. * [[https://hg.pushbx.org/ecm/msdos4/rev/8b02e803ae05|Comment on msinit.nas INIT]] receiving cx:di -> lCFG block **2024-12-11** * [[https://hg.pushbx.org/ecm/msdos4/rev/b99a005a3cc5|Quote a warning message]] that got corrupted from a define (''Debug'') in msconst.nas * [[https://hg.pushbx.org/ecm/msdos4/rev/fb5c53fdb75d|Change class of DOSSTART to DOSSTART]] to avoid generating a different section in the sharer * [[https://hg.pushbx.org/ecm/msdos4/rev/e51fdfb45eff|Use new object files for sharer]] to prepare for nobits DOS data. This changeset produces exactly the same output as the prior one. * [[https://hg.pushbx.org/ecm/msdos4/rev/13ac460898dc|Adjust sectioning in sharer]] to match new one of msdos * [[https://hg.pushbx.org/ecm/msdos4/rev/5e152a704171|Truncate sharer executable by only assembling DOS data as nobits]] (uninitialised) space. Saves about 5000 bytes of executable size at no cost. Checked to generate the same prefix and same effective minimum allocation as prior changeset using ident86. * [[https://hg.pushbx.org/ecm/msdos4/rev/2b4d1ae9fc24|Avoid creating empty TEXT section]] in const2.nas * [[https://hg.pushbx.org/ecm/msdos4/rev/bb13f3e96dc2|Rename different LAST section to AFTERDOS]] to clarify. (It likely only worked **because** it was another LAST section, not the one used by the msdos objects. As we discovered, [[https://stackoverflow.com/questions/79255053/getting-nasm-f-obj-and-warplink-to-emit-alignment-for-an-empty-last-section|the LAST section isn't empty]].) * [[https://hg.pushbx.org/ecm/msdos4/rev/7ea19f9e3a4e|Align end of LAST section to 1 paragraph]]. ===== ident86 ===== * Add -j / -%%%%-show-diff switch, [[https://hg.pushbx.org/ecm/ident86/rev/4dcc319fb59b|to dump trace listing lines that correspond to differing bytes]]. I found my self doing this look up and crossreferencing manually, so of course there was an idea to automate it. * [[https://hg.pushbx.org/ecm/ident86/rev/aa8b46cd911b|Strip some leading blanks]] before the -j trace listing line dump. * [[https://hg.pushbx.org/ecm/ident86/rev/1bbd2d92bfa5|Shorten the -j trace listing dump]] some more. * Add -J / -%%%%-show-diff-colour switch [[https://hg.pushbx.org/ecm/ident86/rev/4a10dff7c556|to reverse video the specific bytes]] that were listed as different bytes. * Before -j output [[https://hg.pushbx.org/ecm/ident86/rev/370bf88a129d|display filename related to the trace listing lines]]. * [[https://hg.pushbx.org/ecm/ident86/rev/4a05c0a93019|Match MS-DOS I_am mmacros as sized data directives]] in the trace listing file. * Put a debug message to [[https://hg.pushbx.org/ecm/ident86/rev/e9768f96037d|after currentfile being defined]], and check that currentfile is not empty. * Add [[https://hg.pushbx.org/ecm/ident86/rev/40d225cfa21d|some .tls directive debugging output]]. * [[https://hg.pushbx.org/ecm/ident86/rev/cba62c8f0ed4|Allow to match question marks in the hexdump]] generated by NASM. Needed for MS-DOS sharer conversion to use a nobits image of DOS data. * [[https://hg.pushbx.org/ecm/ident86/rev/d7a7896d970e|Avoid an exception]] if no -%%%%-include paths given. * [[https://hg.pushbx.org/ecm/ident86/rev/29eabb56365f|Disallow to match structure members]], needed after the change to allow matching question marks. * [[https://hg.pushbx.org/ecm/ident86/rev/7933349aafa0|Add more debugging output]] around map ranges use. * Fix, [[https://hg.pushbx.org/ecm/ident86/rev/b63ee47821b3|add args.offset to mapranges once]], after the headersize has been applied to the default args.offset of ''+0''. Needed after [[https://hg.pushbx.org/ecm/ident86/rev/5261d1fb3ca4|the 2024-12-01 changeset]] that added the headersize variable to every map range tuple. In addlistu we used to add the args.offset to every map range tuple, so that effectively the header size got counted twice. * Add -X / -%%%%-trailer-size switch [[https://hg.pushbx.org/ecm/ident86/rev/b585dccef105|to change length of the listed trailer]]. * [[https://hg.pushbx.org/ecm/ident86/rev/8639ee270990|Display contents and deltas]] of differing MZ header fields and effective minimum allocations. * If no source file name found in the .tls, [[https://hg.pushbx.org/ecm/ident86/rev/f0e73026e3db|use the .tls filename itself]] as the name. * [[https://hg.pushbx.org/ecm/ident86/rev/64c8f90cb560|Fix case of a symlink pointing to another symlink]]. I found that the case of a symlink containing an absolute pathname [[https://docs.python.org/3/library/pathlib.html#operators|is already handled correctly by Python]] when using pathlib's ''/'' (slash) operator. If the second operand is an absolute path, then the first operand is **not** prepended. ===== fixmem ===== * [[https://hg.pushbx.org/ecm/fixmem/rev/8ce25566cbd9|Fix following a symlink with an absolute pathname]], would prepend the link's directory incorrectly before. * [[https://hg.pushbx.org/ecm/fixmem/rev/50e07aca61ed|Fix following one symlink but not a second one]], if a link points to a link. * Use File::Basename dirname function [[https://hg.pushbx.org/ecm/fixmem/rev/1d109c70ea27|rather than manipulating a pathname manually]] in symlink processing. {{tag>ldebug heatshrink msdos msdos4 ident86 fixmem}} ~~DISCUSSION~~