OK. You guys are all over the place.

I do think you are confusing Compiler and Run Time first off.

I ran Turbo C on my DEC Rainbow which had MS-DOS compatibility but not
PC-DOS/PC BIOS compatibility.
TCC would run in this environment (modulo it's use of INT 18 which I did a
hack to allow on the Rainbow
which used that interrupt for its screen code).

TCC would read files off the disk with MS-DOS calls to open the file, etc.
Same with writing. It worked
on all machines because it did this. It was no different than MASM or other
command line compilers at
the time which generally (but not always) avoided PC BIOS calls.

For the Rainbow, if I wanted to use vanilla DOS, I used the default run
time. If I wanted to use an optimized
version that I had back then (but haven't seen recently), I had to add a
bunch of command line flags to get
it to swap out what's the equivalent of libc.a and crt0.o on Unix/Linux.

So, you could write a program than runs on any MS-DOS computer. Or, you
could use your own libc to do
the low-level stuff and have it run on a specific computer. It would still
need to be MS-DOS (though CP/M 86
was possible with a .EXE to .CMD converter and there were also hacks to
convert the .OBJ files to .o
files that some Unix-based loaders could cope with, but I really haven't
seen those anywhere in a long time,
though I've not needed to look). DOS handled all the weird formatting
differences between a
DEC Rainbow, IBM-PC and whatever other weird thing TCC ran in (at least in
the early days). There was also
no official support for the DEC Rainbow after the first TCC release (which
is why I had to do the INT 18
hacks).

If you wanted to run on raw hardware, though, you'd need to write a boot
loader, which is way beyond the
scope of this email :).

Of course, you can use dosbox or similar to run the old-school compilers /
assemblers to generate the binaries
on Linux / FreeBSD. I've done this lately...

So if it is running MS-DOS, there's a chance you can run TCC at least on it
(at least early versions). The early
versions were more MS-DOS-centric and less 'only runs on PC-DOS' at least.
I moved on to FreeBSD/Linux
around this time, so I don't know how things evolved.

Warner

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

>  Ok now some things are coming back. Borland compilers work from the
> ms-dos command line. Bcc 5.5? came with an old textbook. But the Dimension,
> although I assume has some sort of command line structure, doesn't have an
> ms-dos command line. So let's just say tje program got up and running, even
> compiled code (all that assumes a lot). How is it going to save the .obj
> file. The file structure of Northstar dos would have to be identical to
> ms-dos, 8.3. It would have to be able to read an ms-dos formatted disk. And
> the main kicker is the object codw format, creating a 256 byte psp. Amongst
> other shit I have to assume. Or does ms-dos itself handle some of that. Is
> a compiler'a executable format compatible with this. This thing is binary
> compatible in a broad sense. But can you simply for instance run Linux
> wares on bsd?

Reply via email to