Questions tagged [compilers]

Historical compilers, or modern compilers targeting retro platforms.

Use this tag for questions regarding the compilation of source code for retrocomputers: either compilers running on the retrocomputer itself or cross-compilers running on a modern machine.

See Are programming questions on-topic? for a related Meta discussion.

67 questions
66
votes
10 answers

How was C ported to architectures that had no hardware stack?

Thinking about machines such as the PDP-7, PDP-10, CDC-160 and so on1, these are machines which do not have a stack pointer which can quickly and easily change to point to a new stack frame, like the x86 or ARM machines we have today. The C standard…
Omar and Lorraine
  • 38,883
  • 14
  • 134
  • 274
34
votes
15 answers

When did compilers start generating optimized code that runs faster than an average programmer's assembly code?

It is highly unrecommended to write your own code in assembly now since, in most cases, gcc -O3 does magic. But in the ‘80s it was believed that compiled C code takes 4(?) times or more than a well-organized assembly equivalent. When and why does…
Schezuk
  • 3,752
  • 1
  • 17
  • 40
17
votes
1 answer

ZSPL language, anyone heard of it?

While reading the Byte sieve article (Gilbreath 1981), I came across a language I have never heard of, ZSPL. I suspected this was actually a specific version of another language, perhaps PL/1. However, the listing shows it most closely resembling…
Maury Markowitz
  • 19,803
  • 1
  • 47
  • 138
14
votes
1 answer

Did any compilers hash long symbol names when truncating them?

Many early compilers and interpreters had maximum length for variable and function names. Usually you could use longer names but everything beyond e.g. the first 8 characters was discarded. This required putting as much distinguishing information to…
jpa
  • 1,696
  • 7
  • 17
11
votes
7 answers

Did compilers ever give error messages without line numbers?

I'm having an argument with my friend, who told me that when she was learning programming in the 1980s, the compiler gave errors without line numbers. I'm pretty sure that compilers have always given a line number (or card number) for errors, going…
JoelFan
  • 2,117
  • 2
  • 15
  • 18
7
votes
1 answer

BCC LD86 file has bad magic number

I wanted to write a simple hello world program in DOSBox, so I downloaded Bruce's C Compiler from here. And wrote this program (using edit.exe): #include int main() { printf("Hello, World!\n"); return 0; } I ran bcc like this: bcc…
MarinB
  • 73
  • 4