blog:pushbx:2026:0825_extensions_for_ldebug_comparison_eldcomp_debugging
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | blog:pushbx:2026:0825_extensions_for_ldebug_comparison_eldcomp_debugging [2026-08-25 14:51:53 +0000 Aug Tue] (current) – created ecm | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Extensions for lDebug comparison (eldcomp) debugging ====== | ||
| + | |||
| + | I tried out the eldcomp Extension for lDebug recently to verify that the updated alias Extension for lDebug doesn' | ||
| + | |||
| + | |||
| + | ===== Bugs found in and with eldcomp ===== | ||
| + | |||
| + | I found six discrepancies around the use of eldcomp this week: | ||
| + | |||
| + | * eldcomp didn't hash the entirety of the ELD data block, due to a bug in the date time stamp handling [[https:// | ||
| + | * The date time stamps recorded the build date time down to seconds granularity, | ||
| + | * The library ELDs (extlib.eld, | ||
| + | * rcexec.eld doesn' | ||
| + | * tsc.eld stores the current Time Stamp Counter, which naturally differs between the XLD and ELD run. | ||
| + | * reserve.eld preserves 256 bytes read from part of line_in (overflowing at the end) to allow it to operate on its commands during injecting various commands of its own. eldcomp didn't initialise the tail of line_in, leading to bogus data block differences. Fixed by having eldcomp clear the entirety of line_in + 1 (256 bytes) with all-zeroes first, then [[https:// | ||
| + | |||
| + | |||
| + | |||
| + | ===== The eldcomp setup ===== | ||
| + | |||
| + | Create a serial port that is attached to a socat instance whose Linux end is named / | ||
| + | |||
| + | < | ||
| + | picocom / | ||
| + | |||
| + | Connect the DOS end to dosemu2 like so: (We're using COM2 because that is the default for lDebug' | ||
| + | |||
| + | < | ||
| + | |||
| + | With the debugger running, connect to the dosemu2 serial port: | ||
| + | |||
| + | < | ||
| + | |||
| + | Prepare the debugger with two more commands [[https:// | ||
| + | |||
| + | < | ||
| + | uninstall paging</ | ||
| + | |||
| + | To store the test results to a file written to the Linux file system using dosemu2' | ||
| + | |||
| + | < | ||
| + | co name 20260825.1</ | ||
| + | |||
| + | Use a perl scriptlet to extract the commands and [[https:// | ||
| + | |||
| + | < | ||
| + | if (/test (?: | ||
| + | my $command = $1; | ||
| + | $ARGV =~ / | ||
| + | my $base = $1; | ||
| + | print "ext eldcomp.eld ext $base.xld $command; ext reclaim.eld; | ||
| + | }' eld/*.asm | | ||
| + | ~/ | ||
| + | |||
| + | The sendser.pl script: | ||
| + | |||
| + | < | ||
| + | |||
| + | # lDebug commands to serial send program | ||
| + | # by C. Masloch, 2019 | ||
| + | # | ||
| + | # Usage of the works is permitted provided that this | ||
| + | # instrument is retained with the works, so that any entity | ||
| + | # that uses the works is notified of this instrument. | ||
| + | # | ||
| + | # DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. | ||
| + | |||
| + | use warnings; | ||
| + | use strict; | ||
| + | |||
| + | use Time:: | ||
| + | use Getopt:: | ||
| + | |||
| + | our $sleepduration = 0.008; | ||
| + | our $bytesleep = 0.0; | ||
| + | my $byte; | ||
| + | |||
| + | GetOptions( | ||
| + | ' | ||
| + | ' | ||
| + | ) or die; | ||
| + | |||
| + | $| = 1; | ||
| + | LINE: | ||
| + | while (<>) { | ||
| + | Time:: | ||
| + | s/ | ||
| + | if ($bytesleep != 0.0) { | ||
| + | foreach $byte (split //, $_) { | ||
| + | Time:: | ||
| + | print($byte); | ||
| + | } | ||
| + | } | ||
| + | } continue { | ||
| + | if ($bytesleep == 0.0) { | ||
| + | print or die "-p destination: | ||
| + | } | ||
| + | }</ | ||
| + | |||
| + | It uses [[https:// | ||
| + | |||
| + | Finally, close the file using a Copy Output ELD command to the debugger, so that further testing results aren't appended to the log file: | ||
| + | |||
| + | < | ||
| + | |||
| + | {{tag> | ||
| + | |||
| + | |||
| + | ~~DISCUSSION~~ | ||
blog/pushbx/2026/0825_extensions_for_ldebug_comparison_eldcomp_debugging.txt · Last modified: by ecm
