User Tools

Site Tools


blog:pushbx:2026:1018_early_mid_october_work_on_serboot_ldos_kernel_ldebug

Early mid October work on serboot, lDOS kernel, lDebug

2026-10-18

This week I worked on the serial boot disk loader application donated by Neil H. Gray, added a few patches to the lDOS kernel, and reviewed over 200 changesets to be then pushed into the default (non-experimental) lDebug repo.

Serial boot disk loader (serboot)

These programs were originally developed by a SvarDOS user and provided under the MIT license for hosting on our hgweb server. I changed a lot of the details of how they work. The individual changesets:

The FAT scan is interesting for a few reasons. Its purpose is solely to display what file is being accessed in the normal terminal output of the server. It likely doesn't cope well with fragmented files. Finally, if a file is created, written, or deleted while the server runs without being restarted, then the file map initially stored may easily become desynced. Despite these shortcomings, I left it in for now.

ident86

lDOS kernel

  • Update lmacros macro collection from lmacros repo. A few edits to lmacros1.mac previously added to the msdos4 repo are retained.
  • Improve CHS arithmetic for an edge case. Unclear how much this is really needed, but it may be hit by a non-pathological use case. The pathological case in which it was detected concerned reading 129 sectors in a single int 13h call. With the new bounds checks of serboot, this read was rejected with an error 09h. The kernel then splits up the read request into several reads. With this patch, that works, albeit both serboot and the kernel operate on the buffer offset only and will thus corrupt the beginning of the buffer segment upon wrapping around the segment's end. (Ticket #1031.)
  • Update lDOS version to 2026 October. Rather prematurely so.
  • Correct a typo in a comment ("higu" to "high").
  • Fix new CHS arithmetic handling to reset DS and DI upon errors, and add notes for CY needing to be set in error cases. (That particular error case is probably never reached, as an earlier scan will fail if no matching UPB is found.)
  • Support diskettes with >255 cylinders and >65_535 sectors. Due to an underflow when truncating exactly 65_536 sectors to 16 bits, a divide overflow could be reached. The divide error was not unique to the underflow case however, any calculated disk size > 0AAAAh sectors would do. This result came about due to assuming that diskettes are so small they're to be formatted as FAT12 disks with 1 Sector per Cluster. The calculated FAT size is likely not used in normal operation. (Ticket #1032.)
  • Read the BPB in PROCESS_OTHER of msbio/msinit.nas, commented out. This was an attempt to support the 32 MiB superfloppy format available from serboot. It was disabled prior to committing the changes though. This spot is not the correct place to read the BPB.
  • In msbio/msdisk.nas MOVBPB allow the full range of BPB values, including amounts of sectors >65_535 and 256 CHS Heads geometry. (Other values were supported with some earlier hacks already.) After MOVBPB, only the hidden sectors are forcibly zeroed now. (Ticket #1033.)
  • Fix: Write the copies of FAT sectors, not only the first FAT's sectors. This is a longstanding bug that would silently let the FAT copies become stale upon FAT writes. Randomly found during serboot tests. (Ticket #1034.)

lDebug

I wrote more about the subrepo failure in a bug ticket, ticket #1029.

wwwecm scripts

webecm

webpushbx

Bugtracker

Adds 15 new bugs (tickets #1020 to #1034) concerning the debugger, Extensions for lDebug, and the lDOS kernel.

You could leave a comment if you were logged in.
blog/pushbx/2026/1018_early_mid_october_work_on_serboot_ldos_kernel_ldebug.txt · Last modified: by ecm