blog:pushbx:2026:0628_mid_to_late_june_work
Table of Contents
Mid to late June work
2026-06-28
webecm
- Add section on the bugtracker, a link in links, and list it in the news
- Update news item and hgweb link, on use of the Anubis Web AI Firewall Utility for the hgweb service
lDOS patchini
- Add halt flag 16 to mean do not halt on an expected device mismatch (DEVCRASHDOS, added on 2026-05-25)
Buggy (bug ticket format tool)
- Add license hyperlinks to all footers, tracked in ticket #1005
- Add ticket source hyperlink to the ticket footer. The descriptive text and the directory address part for the hyperlink are to be provided on the command line of the buggy tool. Tracked in ticket #1006
Instruction reference
DEVLOAD
- Optimise writing 0FFFFh to a word to terminate the DPB chain.
- Add a workaround so that DPBs aren't installed into the chain with an offset of all-zeroes. MS-DOS v4 and v5 expect DPB offsets != 0000h, as tracked in ticket #1007
ACEGALS
- Add description and example of pushing into
lvarstack slots to initialise them, and how to format these push instructions. - Add section on NASM terms and concepts
- Update NASM section
lDOS kernel
- Replace a few AND instruction operands with NO_ equates, to use
~instead. Scriptlet used:
ldos/src/DOS$ perl -i -pe '
if (/^\s*(test|or|and)\s+word\b[^,]+,\s*([^;]+)/i) {
my $op = $1;
my $imm = $2;
$imm =~ s/^\s+|\s+$//g;
if ($imm !~ /^e?[abcd][xhl]$|^e?[ds]i$|^e?[sb]p$|^-/i) {
if ($op !~ /and/i or $imm !~ /^(?:[-]\s*)?[0-9A-Fa-fHh]+$/) {
if ($op =~ /and/i and $imm =~ /^no_/i) {
s/^([^,]+,\s*?)\s?no_(.*)/$1 ~ $2/i;
}
}
}
}' *.nas
- Use the lmacros3.mac macros for
testopt,setopt, andclroptfor memory word accesses (test,or,and), allowing to optimise these accesses to byte accesses. Saves 144 bytes of the msbio.bin kernel payload image. Scriptlets used:
ldos$ perl -i -pe '
if (/^\s*(test|or|and)\s+word\b[^,]+,\s*([^;]+)/i) {
my $op = $1;
my $imm = $2;
$imm =~ s/^\s+|\s+$//g;
if ($imm !~ /^e?[abcd][xhl]$|^e?[ds]i$|^e?[sb]p$|^-/i) {
if ($op !~ /and/i or $imm !~ /^(?:[-]\s*)?[0-9A-Fa-fHh]+$/) {
if ($op =~ /and/i and $imm =~ /^~/i) {
s/^(\s*)and\s+word(?:\s+ptr)?\s*([^,]+,\s*?)\s?~(.*)/$1clropt $2$3/i;
} elsif ($op =~ /or/i) {
s/^(\s*)or\s+word(?:\s+ptr)?\s*/$1setopt /i;
} elsif ($op =~ /test/i) {
s/^(\s*)test\s+word(?:\s+ptr)?\s*/$1testopt /i;
}
}
}
}' src/DOS/*.nas src/BIOS/*.nas
ldos$ hg stat -mn0 |
xargs -r0 grep -L lmacros3.mac |
xargs -r perl -i -e '
while (<<>>) {
if ($done) { print; next; };
if (/^\s*\[list -\]/) { $nolist = 1; };
if (/^\s*\[list \+\]/) { $nolist = 0; };
if (/%include/) {
/([\r\n]+)$/;
$linebreak = $1;
if (not defined $linebreak or $linebreak eq "") {
$linebreak = "\n";
}
print "\t%include \"lmacros3.mac\"$linebreak";
if ($nolist) {
print "[list -]$linebreak";
}
print;
$done = 1;
next;
};
print;
} continue {
if (eof) {
$done = 0;
$nolist = 0;
}
}'
- Drop an unneeded %include directive created by prior changeset's scriptlets
- Note that clropt makes flags NC for use in SYS_RET_OK, and drop a pronoun in a comment
- Add a cld instruction to the kernel entrypoint, needed for the device entries. This fixes the bug tracked in ticket #1008
- After prior changeset, drop a cld instruction in the entry error handler that's now redundant
- Reset AX in the halt loop of the entry error handler, otherwise the AX return of int 16h function 00h could be used for the subsequent halt call. However, this only happened if a debugger changed the flags in order to "return" from the halt call (which is of no use here).
- Check the CDS DPB pointer's segment rather than offset for being nonzero. Bug tracked in ticket #1007
Bugtracker (non-ticket changes only)
- Pass hg revision parameters to buggy (description and revision URL)
- Change hg URL to point to the file page rather than the rev page after the prior changeset
- An empty changeset, with the scriptlet to renew tickets with the appropriate ticket source hyperlinks. Described in ticket #1006. Scriptlet reads:
hg up a2450e016a1f
hg up "$(hg id -r . --template '{children|short}\n')" &&
buggy "hg $(hg id --template '{node|short}\n' -r .)" \
"https://hg.pushbx.org/ecm/bugtracker/file/$(hg id --template '{node|short}\n' -r .)/"
lDOS boot
- Reset single-sector flag of initial loader unconditionally, and add a build time define to drop this reset entirely. Prior to this the flag would be passed as set to the payload if it was set by the query patch site but no disk access was needed to complete the payload. Tracked in ticket #1003
- Add instsect-compatible disable options to the boot sector loaders. These are to disable forcing the diskette units to CHS access for auto-HDD LBA detection (
_LBA_HDD_ONLY_DISABLED) and to completely disable LBA access (_FORCE_CHS). instsect reference, and tracked in ticket #1004 - Optimise to discard LBA packet using the size field, in the LBA sector read done pathes of the boot sector loaders. Same optimisation already had been done to the initial loader on 2025-10-12
Remaining new bugs (not mentioned elsewhere)
- Ticket #1001: Turned out that int 21h functions 5F07h and 5F08h are already supported by lDOS kernel. Points to the interrupt list patch to correct these entries as indicating MS-DOS v4 rather than v5
You could leave a comment if you were logged in.
blog/pushbx/2026/0628_mid_to_late_june_work.txt · Last modified: by ecm
