User Tools

Site Tools


blog:pushbx:2023:1022_late_mid_october_work_on_extensions_for_ldebug

Late mid October work on Extensions for lDebug

2023-10-22

This week mainly involved more work on lDebug and its ELDs.

Changes not specific to ELDs

Optimise init memory use

Today I added a change to the debugger's init. Rather than allocating enough memory for the biggest total size (24 KiB aux buffer + 8 KiB layout 3 gap + 63.9 KiB ext buffer) and relocating init high enough for all configurations initially, the init size reserved for aux buffer and ext buffer is reduced to nearly 8 KiB for each.

That means if the specified final size (the "want" size) is larger, it may be necessary to grow the debugger allocation and relocate the init a second time. This, of course, can fail if there is not enough space to grow the allocation.

This error condition is only possible if either the /A= or /X= switch is specified or layout 3 is used, though. There being a new error condition is a disadvantage, but the initial debugger allocation grew to over 200 KiB with a full aux buffer and ext segment which is not acceptable for small devices like the HP 95LX.

During development of this change I accidentally always relocated init to just behind the original init, which blew up with /A=MAX /X=MAX. In truth, this relocation target is the minimal relocation target to avoid an overlapping move. However, if it doesn't suffice then a higher target needs to be used.

ELD infrastructure

ELD architecture

Specific ELDs

List ELD

This ELD can operate on any accessible ELD files. The files to operate on are specified by a pathname pattern. The last component of the pattern may include wildcards.

For DOS SFN search and bootloaded mode directory search, the asterisk is taken to fill the remainder of the field it occurs in. For example, "L*IST.ELD" will ignore the "IST" suffix in the name pattern and match just like "L???????.ELD". DOS LFN search may behave differently, but I do not consider this a defect in the debugger.

There are three blocks of information that the list ELD can display:

  • ELD filename and description line (if any)
  • ELD format magic, ELD instance name, and ELD header initial memory use indicators
  • ELD help (if any)

The second block is enabled by a trailing "VERBOSE" keyword. The third block likewise by a "HELP" keyword. The first block is displayed unconditionally.

It was a lot of work to support DOS and bootloaded directory search, including an inject handler to restore global state (DOS SFN search DTA, close DOS LFN search find handle). The boot directory search underwent two major revisions of the code links exported to ELDs.

An optional code relocation is used to access the _PM=1 function intcall_ext_return_es to avoid including this function in _PM=0 builds of the debugger. The ELD checks its own code to insure the code link succeeded if it is needed.

KDISPLAY ELD

This ELD displays the current contents of the N/K command buffers that are used by the L and W commands.

CONFIG ELD

This ELD allows to show or set the config path and scripts path. These are the paths used by the EXT and Y commands to find the config path and scripts path: The config path is used by explicitly using a "::config::" prefix, and the scripts path can be used either with an explicit "::scripts::" prefix or if a single-file look up doesn't find a file for an EXT or Y command.

RN and RM command ELDs

These ELDs now default to use their own internal fnsave buffers rather than using the auxiliary buffer. Using the auxiliary buffer is still possible in the sources but disabled by a build option.

You could leave a comment if you were logged in.
blog/pushbx/2023/1022_late_mid_october_work_on_extensions_for_ldebug.txt · Last modified: 2023-10-22 19:17:16 +0200 Oct Sun by ecm