Table of Contents
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 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
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 prepared a patch for this in 2022 but I consider it unfinished.)
However, I did make some changes:
- Pass the pathname to the device driver in its command line, not only the filename. (Also supports lDebug loading.)
- Append a NUL to the device driver command line after the CR LF.
- Allow a dollar sign
$in the pathname. - Fix output specifying GNU GPL v2-only when source indicates v2-or-later.
- Drop some data that doesn't need to be pre-initialised.
- Do not leak file handles in process relocation.
- Allow MZ .EXE header min alloc to be more than 0FFFh paragraphs
- Fix pre-relocation size to include code to relocate
- Hardcode the debug hints offsets at build time using lmacros, rather than formatting them at run time
- Allow ZM signature in MZ .EXE header
- Detect too large flat format files (> 1 MiB)
- Check for a valid device driver header
- Add
/Fswitch 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 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 the directive was changed to %fatal.
lDebug
The big one!
Many of these changes were suggested by a user on the FreeDOS sourceforge.net issue tracker.
- Made
_DNUMbuild option functional to disable DW and DD commands - lDebugX bugfix affecting dumping at the end of a subsequent 64 KiB block in a large segment
- Add DT and DTT commands to dump text or text tables (bottom half as in ASCII or top half)
- Unfinished work on highlighting D command columns in alternating colours
- In
getinputaccept Ctrl-A for Home (Pos1) and Ctrl-E for End - Add COUNT command and variable
- In H command display remainder if the last top-level operator was a division
- 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 a FreeDOS kernel change to make FDCONFIG.SYS variables available to device drivers.) - A Y command bug was fixed, which usually did not get triggered.
- Application mode and device mode now prepend a conditional command to the RC buffer to read startup configuration files.
- Add /IN switch to not read startup configuration files.
- Invalid switches share a message in init now.
- Many new nouns added for INSTALL and UNINSTALL commands. Some changes to the backing code.
- The
/F+switch applies to loading .HEX files as well. - An
ENDkeyword 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 letterL. - Add option to have RVV, RV, and R variable commands display 32-bit and 24-bit values with an underscore separator.
- Add an option which displays a linebreak before an R dump if output is to
int 10hand the cursor is not at the leftmost column - Add D/DB/DW/DD/DX 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 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.
-
- (Should check that
imsg.boothelp_replacementis not longer thanmsg.boothelp.)
- DX command bugfix: Do not corrupt buffered input in
line_in. - Add build option for TESTHELP command (read and display compressed file using DOS).
- Move WHILE buffer out of auxbuff into its own buffer.
- Store G breakpoint list in WHILE buffer while building it, rather than auxbuff.
- Implement RH mode and 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.
