User Tools

Site Tools


blog:pushbx:2024:0827_mid_late_august_work

Mid late August work

2024-08-25

lDebug

Bernd Böckmann requested a build of lDebug that can be booted on a machine with 256 KiB of low memory. I prepared smalll.sys, which can boot with as little as 192 KiB and leaves 86 KiB resident. This required a few changes:

Unrelated changes:

lDOS boot (experimental)

I described the changes for the upcoming FSIBOOT5 revision in a mail to the freedos-devel mailing list today. In particular, two new entrypoints are added. The one is called fsiboot_memorysize and calls int 12h as well as detecting an RPL memory reservation (peeking at and calling the int 2Fh handler).

The other new entrypoint is a no-op as yet, but could be changed later without incrementing the FSIBOOT revision.

Finally, the proper LBA check and its Xi8088 ROM-BIOS bug workaround are enabled by default as they now fit both with _COMPAT_LDOS and _COMPAT_FREEDOS.

The other changes in ldosboot.exp are for adding the testboot program. This is a boot sector loader (compatible with FAT12, FAT16, and FAT32) which dumps register values on entry, the first 32 vectors from the IVT, as well as 544 bytes of memory including the entire boot sector itself. I developed this for testing the EDR-DOS load on different machines as needed by Bernd Böckmann.

The initial revision did not display the IVT yet. The second revision did display it, but only as a byte-wise dump. The final revision included several optimisations and changes the IVT dump to a segment:offset format.

patchini

The patchini repo collects two patch programs that can be used to modify a program wrapped in the lDOS iniload, drload, or inicomp stages. Relevant to this week's changes is patchpro, which allows to patch the three different choices for depack progress display of inicomp, one each for application mode, device driver mode, and bootloaded mode.

The choices are encoded in three bytes of the lCFG block, an lDOS mechanism to store some configuration within an executable. Such a block is inspired by the FreeDOS kernel CONFIG block. Its use is to provide a mechanism to configure things during the early boot stages, before configuration files can be accessed using the block device drivers and file system. The environment variables and command line tail available to a DOS application may also not be supported by boot loaders.

The change is to support the lCFG block to start on any dword boundary in the first 8 KiB of the file, rather than only any paragraph boundary. This increases the locations to check from nearly 512 to nearly 2048 for a file that is at least 8 KiB in size.

The change is in preparation for the SvarDOS flavours Enhanced DR-DOS kernel to get an lCFG block early in its (first) kernel file. This is simplified by only needing dword alignment. The kernel can make use of an lCFG block to store a setting for the debugger check support. It was determined that on some machines the ROM-BIOS does not set up a proper no-op interrupt 3 handler, so that opportunistically calling int3 may fail.

fixmem

ident86

Two changes, both related to parsing data directives to avoid disassembling data blocks when different byte ranges are selected. The first is to advance to the next TLS directive when it ends below the start of the next byte to disassemble. The second is a small fix to advance the ulength variable when a directive neither matches the range nor ends before the next byte to disassemble.

I'm not sure how this code could have worked before these fixes. But apparently it sometimes did. I noticed that it failed when listing the data from EDR-DOS's drbio.bin file's version strings, as the date time stamp differed. The program disassembled these bytes despite the TLS directives indicating they were data.

Enhanced DR-DOS

I picked all recent changes to the kernel in the SvarDOS repo. Further, I added the kernel changes that I previously did not pick from their repo, gated with conditional assembly that allows to build either the lDOS or SvarDOS flavours of the kernel.

I also updated and fixed the compkern program, which allows to generate a SvarDOS flavoured single-file kernel, optionally compressed in two blocks for part of the drbio and all of the drdos module.

The goal is to have SvarDOS pick up the entire source tree as ported to NASM, so that future development happens on NASM only. The SvarDOS developer for the EDR-DOS kernel, Bernd Böckmann, plans to do this in the upcoming weeks.

You could leave a comment if you were logged in.
blog/pushbx/2024/0827_mid_late_august_work.txt · Last modified: 2024-08-27 19:19:30 +0200 Aug Tue by ecm