On Tue, 27 Dec 2022, Chris via cctalk wrote:
Not all compilers were designed specifically to run on
an ibm pc. If the
compiler itself utilzes bios fumction calls to display anything, it will
not run on anything but an pc or compatible. If you're referring to
saving object code to disk, well I giess that's a good question. But
there were compilers prior to tje 5150, and even after, a few of which,
I have to imagine, had some other means to save files.
In general, a compiler will use the operating system for its file I/O.
CP/M, MS-DOS, etc.
The problem that you are referring to, and yes, it is a real problem, is
generally an issue of programs that go below DOS, and even below the BIOS,
and do hardware access of video memory, keyboard, etc. for "improved
performance". It is impractical to do a graphical user interface without
doing that.
Therefore, what you want is a "command line" based compiler.
Those tend to be hardware agnostic.
Many/most of those were before ANSI C, and complied with the compiler
author's interpretations of the K&R holy scripturees. So, there are
differences, such as whether puts() appends a newline by default, etc.
One small one that I found was quick and easy to get started with, was the
DeSmet "Personal C Compiler"; it tends to work fine on MS-DOS macines that
are VERY NOT PC compatible.
For larger projects, Lattice C was the major workhorse for most
developers.
A graphical "IDE" ("Integrated Develpment Environment", TOTALLY
unrelated to IDE "Integrated Device Electronics", as used on hard drives)
is where you would encounter the difficulties.
But, even some of those will sometimes work on some machines that are
only "close" to PC compatible.
--
Grumpy Ol' Fred cisin(a)xenosoft.com