====== Up to early 2023 July work ====== **2023-07-09** The desktop Linux box is back in action after re-installing Debian on a new HDD. In the last two weeks some work happened on multiple repos. Last Sunday I prepared [[https://retrocomputing.stackexchange.com/questions/27275/creating-8086-binary-larger-than-64-kib-using-nasm-or-any-other-assembler/27279#27279|an example program demonstrating how to implement segment relocations]] without an external linker, using only NASM's ''-f bin'' output format. I did this instead of writing a blog post. ===== devload changes ===== [[https://hg.pushbx.org/ecm/devload/rev/e53d9e719008|The first change]] was to mark the environment in devload's (relocated) PSP as zero, to indicate it was freed. This helps lDebug to find the environment of devload's parent process rather than trying to access what used to be devload's. (In my tests usually the device driver being loaded ended up where the stale environment segment pointed to, but this is by no means certain.) While at it I also worked some more on devload. The conundrum of supporting large memory blocks and passing the full size to the device driver init is not yet solved. (I [[https://pushbx.org/ecm/test/20220509/devload.diff|prepared a patch for this]] in 2022 but I consider it unfinished.) However, I did make some changes: * [[https://hg.pushbx.org/ecm/devload/rev/a07e19ed06af|Pass the pathname to the device driver]] in its command line, not only the filename. (Also supports lDebug loading.) * [[https://hg.pushbx.org/ecm/devload/rev/7f6c22d656ee|Append a NUL]] to the device driver command line after the CR LF. * [[https://hg.pushbx.org/ecm/devload/rev/e5a695583ace|Allow a dollar sign]] ''$'' in the pathname. * [[https://hg.pushbx.org/ecm/devload/rev/abb04291c583|Fix output specifying GNU GPL v2-only]] when source indicates v2-or-later. * [[https://hg.pushbx.org/ecm/devload/rev/90a72fdb0602|Drop some data]] that doesn't need to be pre-initialised. * [[https://hg.pushbx.org/ecm/devload/rev/418465695ce8|Do not leak file handles]] in process relocation. * Allow MZ .EXE header min alloc [[https://hg.pushbx.org/ecm/devload/rev/4bcf2a88ef85|to be more than 0FFFh paragraphs]] * [[https://hg.pushbx.org/ecm/devload/rev/a592f7d55674|Fix pre-relocation size]] to include code to relocate * [[https://hg.pushbx.org/ecm/devload/rev/98902f9a8fa6|Hardcode the debug hints offsets]] at build time using lmacros, rather than formatting them at run time * [[https://hg.pushbx.org/ecm/devload/rev/95f19dcca293|Allow ZM signature]] in MZ .EXE header * [[https://hg.pushbx.org/ecm/devload/rev/c1d2a9b53483|Detect too large flat format files]] (> 1 MiB) * [[https://hg.pushbx.org/ecm/devload/rev/17791de143dc|Account for .EXE header size]] * Check for [[https://hg.pushbx.org/ecm/devload/rev/f056af734f88|a valid device driver header]] * Add ''/F'' switch [[https://hg.pushbx.org/ecm/devload/rev/147c81a722a0|to disable header checks]] ===== TracList ===== While looking at some regexps in TracList it occurred that a question mark was missing in one. This meant that entering hexadecimal numbers as ''0xABCD'' without a trailing ''H'' may not have worked. https://hg.pushbx.org/ecm/tractest/rev/21db7f62ab6e ===== insref ===== While linking to refer to an example in the instruction reference, it was noted that the example sections did not contain keywords to reference them. This [[https://hg.pushbx.org/ecm/insref/rev/8a2f1965ad0b|has been fixed]]. ===== lmacros ===== During development of the heatshrink depacker for online help pages of the debugger, it was found that the ''resetdef'' check for the correct context would emit an ''%error''. However, a subsequent use of an undefined variable in an ''%if'' emitted an error that hid the output of the ''%error'' directive. Therefore [[https://hg.pushbx.org/ecm/lmacros/|the directive was changed]] to ''%fatal''. ===== lDebug ===== The big one! Many of these changes were suggested [[https://sourceforge.net/u/asm2/profile/|by a user]] on [[https://sourceforge.net/p/freedos/feature-requests/|the FreeDOS sourceforge.net issue tracker]]. * [[https://hg.pushbx.org/ecm/ldebug/rev/ca087256625e|List parameters accept]] ''AS WORDS'' or ''AS DWORDS'' keywords to specify units other than bytes * Made ''_DNUM'' [[https://hg.pushbx.org/ecm/ldebug/rev/0a5b3458185d|build option functional]] to disable DW and DD commands * [[https://hg.pushbx.org/ecm/ldebug/rev/34d61b4e780e|lDebugX bugfix]] affecting dumping at the end of a subsequent 64 KiB block in a large segment * Add [[https://hg.pushbx.org/ecm/ldebug/rev/0d38cfb2c70b|DT and DTT commands]] to dump text or text tables (bottom half as in ASCII or top half) * [[https://hg.pushbx.org/ecm/ldebug/rev/231b48eb2cf5|Unfinished work]] on highlighting D command columns in alternating colours * In ''getinput'' [[https://hg.pushbx.org/ecm/ldebug/rev/114128a67fd8|accept Ctrl-A for Home (Pos1) and Ctrl-E for End]] * [[https://hg.pushbx.org/ecm/ldebug/rev/93e38407fb3d|Add COUNT command]] and variable * In H command [[https://hg.pushbx.org/ecm/ldebug/rev/9b0a148075cf|display remainder]] if the last top-level operator was a division * [[https://hg.pushbx.org/ecm/ldebug/rev/d9c93b87b1c3|Improve detection of DD command]] to allow ''dds:...'' or ''ddx'' or ''ddi'' to be evaluated as bytewise D commands * [[https://hg.pushbx.org/ecm/ldebug/rev/670053dfff50|Determine config path at init]] from ''%LDEBUGCONFIG%'' variable or executable's directory. (This needed two of the devload changes, to find the environment and the executable directory.) (This also needed [[https://github.com/FDOS/kernel/commit/3d1ba0d4868b6ba15ca30bcaad4eae90049ae882|a FreeDOS kernel change]] to make FDCONFIG.SYS variables available to device drivers.) * A Y command [[https://hg.pushbx.org/ecm/ldebug/rev/55f105767f98|bug was fixed]], which usually did not get triggered. * Application mode and device mode now [[https://hg.pushbx.org/ecm/ldebug/rev/83f47ab0254f|prepend a conditional command]] to the RC buffer to read startup configuration files. * [[https://hg.pushbx.org/ecm/ldebug/rev/925cbe61ea07|Add /IN switch]] to not read startup configuration files. * Invalid switches [[https://hg.pushbx.org/ecm/ldebug/rev/bd000d4b3053|share a message in init]] now. * [[https://hg.pushbx.org/ecm/ldebug/rev/0a48a5247a5c|Many new nouns added]] for INSTALL and UNINSTALL commands. Some changes to the backing code. * The ''/F+'' switch [[https://hg.pushbx.org/ecm/ldebug/rev/66e94107e912|applies to loading .HEX files]] as well. * An ''END'' keyword [[https://hg.pushbx.org/ecm/ldebug/rev/d051ec60a090|may be used in range parameters]] to prefix the end offset. This is needed in case the end offset starts with a variable or symbol name starting with a letter ''L''. * Add a ''?VERSION'' [[https://hg.pushbx.org/ecm/ldebug/rev/f8b71c97ed33|command which lists the very first line]] from ''?BUILD'' or ''?B'', only. * Add option [[https://hg.pushbx.org/ecm/ldebug/rev/ab4da9ba4d6c|to have RVV, RV]], and [[https://hg.pushbx.org/ecm/ldebug/rev/a649c037b017|R variable commands]] display 32-bit and 24-bit values with an underscore separator. * Add [[https://hg.pushbx.org/ecm/ldebug/rev/82f418340906|an option which displays a linebreak]] before an R dump if output is to ''int 10h'' and the cursor is not at the leftmost column * Add D/DB/DW/DD/DX [[https://hg.pushbx.org/ecm/ldebug/rev/6101f0bcaba3|TOP keyword to allow display of top half text]] in the text dump, but only for one command (rather than as a DCO option). * In BOOT READ/WRITE [[https://hg.pushbx.org/ecm/ldebug/rev/4666472cb234|do not set a random error code]] if 33-bit access attempted on CHS-addressable unit. * In boot YY handling prepare to make it more usable for non-YY uses. * Allow [[https://hg.pushbx.org/ecm/ldebug/rev/5569e020deda|to build help pages separately]]. Also [[https://hg.pushbx.org/ecm/ldebug/rev/24004c3a8b6b|allow to compress them]] to [[https://hg.pushbx.org/ecm/ldebug/rev/db2f4096ddc4|depack at run time]]. * (Should check that ''imsg.boothelp_replacement'' is not longer than ''msg.boothelp''.) * [[https://hg.pushbx.org/ecm/ldebug/rev/c78d9cf1900f|DX command bugfix]]: Do not corrupt buffered input in ''line_in''. * Add build option for [[https://hg.pushbx.org/ecm/ldebug/rev/304738edcde9|TESTHELP command]] (read and display compressed file using DOS). * [[https://hg.pushbx.org/ecm/ldebug/rev/a096260d7a52|Move WHILE buffer]] out of auxbuff into its own buffer. * [[https://hg.pushbx.org/ecm/ldebug/rev/dfca0dbcec8e|Store G breakpoint list in WHILE buffer]] while building it, rather than auxbuff. * Implement [[https://hg.pushbx.org/ecm/ldebug/rev/90ca791eac2e|RH mode]] and [[https://hg.pushbx.org/ecm/ldebug/rev/3705a3ab4e86|RH command]] to store and display register dump history in auxbuff. Similar to what the SILENT keyword for T/TP/P does, and in fact shares much code with it. {{tag>devload lmacros ldebug heatshrink}} ~~DISCUSSION~~