On Thu, Dec 11, 2025 at 10:29:11PM -0800, Ben Collver wrote: > Now ld86.exe produces executables, but they don't run correctly. I > am still troubleshooting this.
I traced the ld86.exe problem to zero length write() calls, which truncated the output part-way through, causing "gaps" in the executable. I added a macro to skip zero length write() calls, and that helped. Here is a download link for bcc 0.16.21 built for FreeDOS using OpenWatcom 1.9: <gopher://tilde.pink/9/~bencollver/files/dos/devel/bcc/bcc_pt1.zip> This can be fetched on FreeDOS with: curl -O I tested this against several programs including my OpenBSD ed(1) build. One difference from the FreeDOS 1.4 package is that this build omits the headers and C libraries for the ELKS targets. It has libdos.a for the .com file target and libc_s.a for the BIOS target. Below are more detailed notes: I fetched the dev86 bcc version 0.16.21 source code from: <https://github.com/lkundrak/dev86> I unzipped the sources without DOSLFN to get short names. I ran mkall.bat to make this build. My build batch files do not require DJGPP nor LFN. The resulting binaries are 16-bit and do not support LFN. The changes were for OpenWatcom compatibility unless otherwise noted. The 128 byte command line limit workaround was necessary to build libc on DOS. Files modified: * ar\ar.c * as\pops.c * as\syshead.h * bcc\bcc.c (128 byte command line limit workaround) * bcc\bcc-cc1.c (128 byte command line limit workaround) * cpp\main.c (128 byte command line limit workaround) * ld\io.c * ld\ld.c (128 byte command line limit workaround) * ld\ld86r.c (128 byte command line limit workaround) * ld\rel_aout.h * ld\syshead.h * libc\error\error2.c Files added: * bccargz.c (128 byte command line limit workaround) * man2txt.awk * mkall.bat * mkbcc.bat * mkclean.bat * mkdoc.bat * mkinc.bat * mklibcs.bat * mklibdos.bat * readme.dos (copied from FreeDOS) * version.h (generated from: awk -f version.awk Makefile) * version.awk * libc\error\mktab.awk (based on mktab.sh) * libc\error\error_li.h (generated from: awk -f mktab.awk liberror.txt) * txt\as86.txt (generated from: awk -f man2txt.awk man\as86.1) * txt\bcc.txt (generated from: awk -f man2txt.awk man\bcc.1) * txt\ld86.txt (generated from: awk -f man2txt.awk man\ld86.1) I hope this helps, -Ben _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
