On Mon, Mar 10, 2025 at 8:12 PM segaloco via TUHS <tuhs(a)tuhs.org> wrote:
On Monday, March 10th, 2025 at 4:25 PM, Greg A. Woods
<woods(a)robohack.ca> wrote:
...
Which reminds me, wasn't there was some mention of difficulties with
Pascal et al w.r.t. separate compilation earlier in this thread....
Wasn't that one of the features of Berkeley Pascal? I know separate
compilation is a definitely a feature by the time it makes it to
SunOS/Solaris-2. I remember trying to figure it out once for a class
assignment and the TA scowled at me and asked me why on earth I would
ever want to do that, so I never trusted that TA on programming
languages, or much of anything else, ever again.
If by separate compilation you mean the compiler spits out (possibly optionally)
human-readable assembler, I would assume that is nearly crucial for any systems
language, otherwise you're putting a lot of faith in an ABI when it comes to
linking with your machdep assembly files no? I'd be nervous to use something
for bare metal programming that I couldn't easily inspect the resulting
assembler code from...
No, typically that means that you've got two or more source files, say
a.pas and b.pas; you separately compile those into object files, such
as a.o and b.o, and then link them into a file executable binary.
Early Pascal systems were not generally modular in that way, while C
was. Yes, you are putting some faith into the linker and ABI, but on
early Unix, they came from the same folks who wrote the compiler.
Generating assembly listings (or disassembling object files/a,out) is
a separate matter.
- Dan C.