User Tools

Site Tools


blog:pushbx:2026:0628_mid_to_late_june_work

Mid to late June work

2026-06-28

webecm

lDOS patchini

Buggy (bug ticket format tool)

Instruction reference

DEVLOAD

ACEGALS

lDOS kernel

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, and clropt for 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;
    }
  }'

Bugtracker (non-ticket changes only)

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

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: 2026-06-28 17:43:12 +0200 Jun Sun by ecm