I haven't followed the full thread here, but perhaps this might help:
 when I ported DestinyHunter (destinyhunter.org) from the 6502-based PET to
the IBM PC, I gathered some notes on that process here
https://destinyhunter.org/ibm-5150-development-notes/

Basically: programming on an actual vintage MS-DOS system is very painful
these days.  For starters, the 8.3 filenames and lack of COPY-PASTE.
 True, there are some vintage editors that will have a form of copy-paste.
Another issue is some of those old editors are limited to 32KB or 64KB
files (which with comments, sometimes you might get to pretty large files),
and such old editors might not have multi-file support (like having .h and
.c open at the same time).  I programmed many years in the "old DOS days"
with 8.3 filenames - reliving that wasn't for me.  BUT, it is do-able.

I did try Turbo C 2.0 to make a real-mode .com (the notes in the page setup
a 486-emulation in 86BOX with a DOS 6.0 configuration).

Since I had a project that already used long filenames, that was another
reason I wanted to cross-compile from a modern system instead.  If all the
existing code was already in 8.3 filenames, maybe it would have been less
of an issue.  But in any case, the modern system is faster, so you can
experiment and compile things in a few seconds -- but then you have to
transfer the resulting binary to your vintage system (I was able to use
FTP, but I can understand that' not being easy for everyone).

As another option: I came across the WATCOM C/C++ compiler, but (AFAIK)
it's no longer maintained and getting a "reliable" download of it was a
challenge.  All I recall was I ended up using version 1.9 instead of 2.0.
It is an IDE of sorts, though I mostly still used an external editor
(notepad++).   I can't recall why I didn't use Lattice - maybe it/was
Commercial?  Another compiler is the Intel iC-86, but you end up having to
use the Borland TLINK anyway with that.  NOTE: I think both Turbo C and
WATCOM C have code generation options for 80186 - although offhand I can't
think of any specific code that would need/use 80186 features.    And each
of these compilers does have a slightly different variation of C (with some
settings dials inside on how compliant to be).

Another note: despite using _TINY_, Borland C is still going to make an EXE
- you have to use Microsoft DOS 2.10 - 3.21 to run EXE2BIN to convert it to
a .com.


The next mess is "standard libraries."  Borland was great, but they royally
confused a whole generation of developers on what the "standard C library"
actually meant.   Like, conio.h is not standard.   But regardless - when
implementing the "C standard library" for disk I/O, no one would be
re-implementing FAT -- that'd miss the whole point of having a "DOS".
They'd implement it in terms of software interrupts - that hopefully were
compatible between PC/DR/MS-DOS.    "Self Booters" (like early versions of
Zork, Microsoft Flight Simulator, early versions of King's Quest) had to
implement their own file systems (and it's why they aren't easy to copy,
since they use a non-MS-DOS format).

Thinking about it now, I think making a self-booter disk of DestinyHunter
might be an interesting challenge.  For reference, some notes are as
follows:
https://www.cs.uaf.edu/2011/fall/cs301/lecture/11_18_bootblock.html
http://philipstorr.id.au/pcbook/book1/post.htm

That is, the IBM PC BIOS is pre-programmed to examine the first sector for
code, and do the work of copying 512 bytes to RAM and running it.  What you
choose to do in that boot loader is then up to you (or the OS) -- which
can't be any MS-DOS interrupt calls.   I'm not sure what existing code
could be borrowed to read additional bytes from the disk (an annotated
disaassembly of the BIOS, or examining the MS-DOS code in github maybe as a
starting point).   Nothing in the "standard" library of Borland Turbo C or
WATCOM C, etc. really helps here (none of the fopen, fscanf, stuff).

So it's not that the compiler you're seeking doesn't exist -- but some "off
the shelf" utility functions doesn't readily exist.  You'd have to borrow
or re-implement much of what MS-DOS is already doing (if the 180KB format
was ok).  Again, the early MS-DOS source code is out on github as a
starting reference... As far as writing it specifically to the first sector
of a 5.25" disk -- I never found a "USB adapter" for a 5.25" disk drive;
plenty for the 3.5" drives, but maybe the 525" drw too much power for USB?).

Good Luck!












On Mon, Dec 26, 2022 at 8:20 PM Chris via cctalk <cctalk@classiccmp.org>
wrote:

> It cannot rely on bios/ms-dos services for compiling preferably. Iow I'd
> like to perform what I want to do on the target machine itself, LOL which
> is hysterical as I've never even seen it boot even once. I could complie on
> a standard pc I suppose and pop a disk in the Northstar Dimension. It would
> be nice if it's optimized for it's 80186. Or at least supports it's
> instructions. My goal is to get MINIX running on it, as the original
> Netware-86 OS has proven to be more rare then really anything else. From
> there I'd like to figure out how to support the pc compatible (or so we're
> told) logic boards that are plugged into the motherboard like standard isa
> cards, and even have 34 contacts on their card edge.
>
> It would be nice if someone had the ideal compiler package they don't need
> and could sell.
>

Reply via email to