Hi, On Sun, Dec 14, 2025 at 5:29 PM Ben Collver via Freedos-devel <[email protected]> wrote: > > I traced the ld86.exe problem to zero length write() calls, which > truncated the output part-way through, causing "gaps" in the > executable.
This reminds me of a 2024 blog on OS/2 Museum: "Learn Something Old Every Day, Part XII: Strange File Resizing on DOS" * https://www.os2museum.com/wp/learn-something-old-every-day-part-xii-strange-file-resizing-on-dos/ "[T]he handle-based file API in DOS 2.0 was modeled on XENIX, yet on UNIX systems, the write() function asked to transfer zero bytes simply does nothing." "The MS-DOS 2.0 Programmer’s Reference Manual is quite clear that writing zero bytes either truncates or extends a file." "CP/M 2.2 had no mechanism for resizing files, and CP/M 3 had a separate BDOS function to change file size." _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
