Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [compilers]

Historical compilers, or modern compilers targeting retro platforms.

Filter by
Sorted by
Tagged with
7 votes
0 answers
332 views

It was suggested to me to move this question from SO to here. There was a relatively short (in tech terms, at least) period during which MMX was the only way to vectorise integer operations on the x86,...
Stanislaw Petreus's user avatar
28 votes
6 answers
4k views

See title. I saw that forks of LLVM and GCC compilers for 80s CPUs like MOS6502, Z80, Intel, M68k, etc are being maintained. Please note that I'm talking about the binary benchmarks, not the compiler ...
Kamoverflow's user avatar
13 votes
1 answer
3k views

When C was gaining popularity across various computer architectures and it was being ported to those architectures, was it always done via cross-compiling, or was there a known case of a C compiler ...
Leo B.'s user avatar
  • 22.3k
3 votes
1 answer
257 views

After searching for the file system for this computer I have gained interest in this machine and development for it. I have found a C compiler but anything else. So basically I would like to ask if ...
Borg Drone's user avatar
  • 2,298
6 votes
3 answers
511 views

There was an implementation of Algol-68 on PDP-11, which is present in the form of raw binary files, allegedly from RSX-11M, and UNIX V7 loaders/adapters for them in the form of Assembly language ...
Leo B.'s user avatar
  • 22.3k
6 votes
0 answers
311 views

As far as can be seen in ISO 7185:1990, §6.9.1, page 60 read(f,vi,...,v„) shall access the textfile and establish a reference to that textfile for the remaining execution of the statement; each of vi,...
Leo B.'s user avatar
  • 22.3k
3 votes
0 answers
236 views

Algol 58 had a do statement that performed a kind of macro substitution. It is described on page 16 in the preliminary report. Even though the language was intentionally drafty and incomplete, various ...
texdr.aft's user avatar
  • 3,930
4 votes
0 answers
278 views

I stumbled upon the /LD compiler option in the Microsoft compiler and I wondered why my Visual Studio 2022 doesn't have that option. So I asked this question on StackOverflow, where famous Hans ...
Thomas Weller's user avatar
31 votes
3 answers
19k views

During the 80s and 90s, Borland developed several amazing, cutting edge developer products. Their Turbo Pascal and Delphi, an Object Pascal development environment, were very popular on DOS and ...
ATL_DEV's user avatar
  • 692
12 votes
2 answers
1k views

In Microsoft Visual C++, I can use the macros _MSC_VER for compiler identification and _MSC_FULL_VER for its version number to retrieve the data of the used compiler at runtime of my C program. But ...
Coder's user avatar
  • 1,282
4 votes
2 answers
285 views

Reading the report on the first Algol 60 compiler in the world, namely the Dijkstra-Zonneveld ALGOL 60 compiler for the Electrologica X1, which contains the Pascal source faithfully reproducing its ...
Leo B.'s user avatar
  • 22.3k
19 votes
6 answers
6k views

I was wondering why C has the long and short integer type in addition to the plain int, and came across the following quote in the C99 Rationale (thanks to this answer here): [...] In the 1970s, 16-...
user51462's user avatar
  • 551
7 votes
0 answers
555 views

Back in the 80s I ran across a book at a garage sale titled something like "Programming Fortran In English" or "Programming Fortran In Natural Language" that described a compiler ...
JockM's user avatar
  • 71
23 votes
3 answers
3k views

In 1977, Guy Steele published a paper entitled Debunking the “expensive procedure call” myth or, procedure call implementations considered harmful or, LAMBDA: The Ultimate GOTO. The paper was the ...
Alexis King's user avatar
34 votes
11 answers
12k views

Please take a look at this post: Is there a performance difference between i++ and ++i in C? There are two essential statements in the answer: Modern compiler produce the same machine code no matter ...
zomega's user avatar
  • 5,490
24 votes
2 answers
4k views

I have a simple C program, and I would like to compile it targeting MS-DOS. Can this be achieved with Clang? I would like to produce the following formats: COM executable 16-bit MZ executable 32-bit ...
tpimh's user avatar
  • 902
6 votes
5 answers
4k views

Compiling takes computing power, and to a lesser extent, storage and memory. Back in the 70s and 80s personal computers weren't powerful enough to compile codes in high-level languages or if capable ...
Schezuk's user avatar
  • 3,834
3 votes
1 answer
2k views

TIOBE index has been tracking the most popular programming languages since 2001, which reflects the dominance of C/C++/Java in the first score of 21st century. However C derivatives hadn't beat Pascal ...
Schezuk's user avatar
  • 3,834
7 votes
1 answer
412 views

I found some Ada compilers for CP/M machines but no luck for 6502-based C64/Apple II/BBC Micro. I'm not sure if Abacus Ada on C64 exists or how much a subset it implements for Ada. There is, though, ...
Schezuk's user avatar
  • 3,834
19 votes
3 answers
3k views

Looking at the C code from the Fast Inverse Square Root, the casting of a float to a long is done via pointer arithmetic: i = * ( long * ) &y; // evil floating point bit level hacking The ...
Adam Hyland's user avatar
  • 1,082
26 votes
3 answers
1k views

I would like to understand historical roots of the quirk in the SysV calling convention for the 32-bit x86, which was inherited by the ELF standard, and so remains used on Linux to this day. Consider ...
amonakov's user avatar
  • 363
14 votes
1 answer
976 views

Do you perhaps happen to know, what would be the easiest way to modify my AEC-to-x86 compiler (you can run the core of it in browser: https://flatassembler.github.io/compiler ) to be able to target ...
FlatAssembler's user avatar
14 votes
3 answers
3k views

While Windows 3.x operating system stuck to the 80286 platform, did applications compiled for Windows 3.x have to use 80286 instructions explicitly or be aware of the 80286 memory layout? Or was it ...
Schezuk's user avatar
  • 3,834
26 votes
12 answers
8k views

I'm learning C and was curious as to why the language does not allow nested functions. From what I've read, the lack of nested functions seems to have been a simplification that was inherited from its ...
user51462's user avatar
  • 551
35 votes
5 answers
9k views

I'm looking for the most recent versions of modern C compilers which were/are targeting DOS 8086, also running on DOS 8086 (16-bit). I'm mostly interested in production-ready C compilers, rather than ...
pts's user avatar
  • 5,479
18 votes
1 answer
2k views

I have been compiling some command line programs to run on the classic Commodore Amiga. I started with GCC on WinUAE which worked but I realised I didn't have the understanding of the memory stack and ...
Lee Volante's user avatar
10 votes
1 answer
635 views

On i386 and beyond (assuming MS-DOS as the target OS and IBM PC as the target platform), my impression is game developers most typically used Watcom C / DJGPP plus one of the DOS extenders (DOS4GW, ...
DmytroL's user avatar
  • 2,784
38 votes
6 answers
8k views

In modern C, you may place variable declarations between statements: do_something(); int x; x = something_else(); However, older C compilers required that variables are declared before all statements:...
DrSheldon's user avatar
  • 16.9k
14 votes
1 answer
2k views

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 ...
jpa's user avatar
  • 2,231
7 votes
1 answer
401 views

In the early days of compilers, it was expected that programs would generally be stored in an inexpensive medium (such as punched cards or magnetic tape) when not in use. Although it was possible to ...
supercat's user avatar
  • 41.2k
20 votes
1 answer
2k views

I started a project to get a better understanding on how to compile a game for Windows 3.x. I tried to set up the build workflow so that it produce the byte-exact clone of a great open sourced Win16 ...
SZIEBERTH Ádám's user avatar
3 votes
1 answer
294 views

I started a project to get a better understanding on how to compile a game for Windows 3.x. I tried to set up the build workflow so that it produce the byte-exact clone of a great open sourced Win16 ...
SZIEBERTH Ádám's user avatar
11 votes
7 answers
5k views

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 ...
JoelFan's user avatar
  • 2,147
12 votes
1 answer
574 views

Proebsting's Law asserts that improvements to compiler technology double the performance of typical programs every 18 years, but even granted that this is somewhat tongue-in-cheek, it's not really ...
rwallace's user avatar
  • 65.3k
5 votes
1 answer
353 views

This question is prompted by a related one by texdr.aft. It turns out that the Revised report on Algol-60 allowed numeric labels (3.5.1, page 15), <label> ::= <identifier> | <unsigned ...
Leo B.'s user avatar
  • 22.3k
4 votes
1 answer
410 views

I've been able to find the manual for the CPC version of HiSoft C, but not for the ZX. The only ones I could find appeared to have been OCRed, so virtually all of the necessary information was lost. ...
forest's user avatar
  • 2,129
9 votes
1 answer
701 views

These days, most compilers and interpreters seem to provide the following in diagnostics: A description of the problem The name of the source file A line number A relevant position within the line ...
texdr.aft's user avatar
  • 3,930
14 votes
6 answers
1k views

Occasionally I have heard references to a peculiarity of certain (old) Fortran compilers, with regards to subprogram argument passing. Here is an example, from an answer to a Stack Overflow question: ...
texdr.aft's user avatar
  • 3,930
1 vote
1 answer
248 views

The most important difference between the original 'K&R' C, and ANSI/ISO C89/90, was function prototypes. These started being supported by some compilers in the mid-eighties, were formally ...
rwallace's user avatar
  • 65.3k
24 votes
2 answers
2k views

The closest I was able to find on StackOverflow is What are .S files?, in which no answerer addresses why we use .s for assembly. (And .S for preprocessor/macro assembly; and gcc -S to produce ...
Quuxplusone's user avatar
23 votes
11 answers
8k views

From the earliest K&R reference manuals I read, 'int' was synonymous with machine word and it seemed to raise adverse reactions in various user domains. With the UNIX crowd, they minimally ...
MKhomo's user avatar
  • 482
36 votes
15 answers
13k views

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-...
Schezuk's user avatar
  • 3,834
65 votes
15 answers
12k views

I found Why do C to Z80 compilers produce poor code? very interesting as it pointed out that C (which was leveraged to be an abstraction of a CPU for porting Unix) was not a very easy language to ...
Thorbjørn Ravn Andersen's user avatar
37 votes
11 answers
10k views

From what I've read, the first FORTRAN compiler built a machine-code program entirely in memory; it was, in fact, designed to read the entire source code of the program, and then sequentially load ...
supercat's user avatar
  • 41.2k
12 votes
1 answer
694 views

I would guess the compiler was primarily a modification of Borland's Turbo Pascal, while the Integrated Development Environment and Visual Component Library required a lot more development from ...
joe's user avatar
  • 121
3 votes
3 answers
689 views

This question is about cc65, which is a toolkit including a C compiler, assembler, linker, etc. All targeting various 6502 computers, like the various 8 bit commodores, the Apple II and whatever else. ...
Omar and Lorraine's user avatar
3 votes
5 answers
1k views

I'm attempting to compile a program in C for the ZX Spectrum using Z88DK. However, I'm facing an issue when trying to use printf to print out the value of a float. The code I'm trying to compile: #...
cobbm's user avatar
  • 79
6 votes
2 answers
516 views

Context SDCC claims to support C11. I use it to write games on Z80 target (for fun and experience). C11 defines restrict C11 specifies the restrict keyword on pointers, which can improve generated ...
Stéphane Gourichon's user avatar
20 votes
0 answers
1k views

I kept one floppy from my Commodore 128 (which I used mostly in C64 mode), labelled ‘Oxford C compiler’. It is a 5.25″ floppy. Don't ask me why I kept just this one; probably because I thought I ...
Michel Keijzers's user avatar
11 votes
1 answer
3k views

LISP is considered by some to be primarily an interpreted language, but compilers have been made for it. What was the first compiler? To be clear, this is about compilers that compile LISP code stored ...
cjs's user avatar
  • 29.5k