Questions tagged [compilers]

For questions regarding language compilers for retrocomputers.

Filter by
Sorted by
Tagged with
6
votes
2answers
248 views

Why isn't the 'restrict' keyword useful in SDCC when compiling for Z80 target? [closed]

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 ...
9
votes
1answer
2k views

What was the first LISP compiler?

LISP is generally considered 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 for ...
3
votes
0answers
255 views

How do Apple II BASIC compilers compare? [closed]

Programs like The Beagle Compiler allow AppleSoft BASIC or other Apple II BASIC variants to be compiled. How do the compilers compare in terms of speed, compatibility, and features?
4
votes
1answer
204 views

Was dynamic type check in Pascal commonplace?

The BESM-6 Pascal compiler I'm experimenting with has a notable difference from Standard Pascal: formal arguments of formal parameters-procedures or functions are not specified, but are checked at ...
17
votes
1answer
2k views

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. ...
34
votes
5answers
6k views

Did any compiler fully use Intel x87 80-bit floating point?

There is a paradox about floating point that I'm trying to understand. Floating point is an eternal struggle with the problem that real numbers are both essential and incomputable. It's the best ...
1
vote
2answers
243 views

What was the first language compiler to support subtype polymorphism? [closed]

I'm trying to understand the history of Dependency Injection in compiled languages, as an intentional feature of the language. The Wikipedia article on the subject is decidedly Java focused, but I ...
3
votes
0answers
131 views

How did the template cache in CFront work?

I've seen some discussion of how templates were historically implemented in CFront around the web, including here. The link describes the Borland model, which is familiar, and the CFront model with a ...
5
votes
2answers
283 views

How was dataflow analysis performed before SSA?

If we look at something like LLVM or the GNU Compiler Collection, Dalvik and many others, their intermediate representation (IR) uses SSA (Static Single Assignment form), as part of their Data-Flow ...
7
votes
1answer
271 views

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 <stdio.h> int main() { printf("...
38
votes
5answers
4k views

Is it possible to make a ROM converter?

Based on my understanding, an emulator is necessary because the machine with the emulator on it (say Windows), doesn't execute the same machine code as the target platform (6502, for example). So what ...
2
votes
3answers
191 views

Was parsing or operating systems the first user of dollar sign as end of string/input?

According to the question Why did DOS use dollar-terminated strings? DOS uses dollar-terminated strings, inherited from CP/M which used them because DEC also used dollar as the string terminator. ...
-3
votes
2answers
501 views

gcc: installation problem, cannot exec 'as': No such file or directory

How do I compile my code that I have typed on my SGI Indy computer? I have already tried to install the GCC/G++ compilers, but when I run my application, I get the error that says: gcc: ...
6
votes
2answers
328 views

Why is the following p-Code generated by the Apple 3 pascal compiler?

On an Apple 3 the following pascal function function randu( High: integer): integer; begin randu:= random mod High end; will be translated to Proc = 06 Typ = P-Code codeBeg = 02A6 Exitcode=...
21
votes
4answers
5k views

Would a C compiler for the Apollo Guidance Computer be plausible?

The Apollo Guidance Computer was used to control the command/service module and lunar module on the missions to the moon. (Definitely a retrocomputer!) As noted in this answer, programs were written ...
65
votes
10answers
14k views

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 ...
5
votes
0answers
258 views

Link N64 object file while preserving relocation data

The N64 SDK provides the makerom tool to create a ROM image given a file describing the ROM layout called spec and the various object files it refers to such as the N64 OS, RCP microcode, and the game'...
3
votes
4answers
602 views

Was there ever a compiler type that was just large enough to contain a memory segment?

From this answer, Hark back to the days of segmented 16-bit architectures for example: an array might be limited to a single segment (so a 16-bit size_t would do) BUT you could have multiple ...
5
votes
1answer
495 views

On the use of the “Code Improver”

Very early C compilers, (mostly K&R C, as seen in UNIX V6, or this compiler for the Atari ST called "Megamax C") came with a "code improver". This was apparently a separate binary, named c2, and ...
65
votes
8answers
19k views

Why do C to Z80 compilers produce poor code?

When reading some other questions about compiling C for the Z80, How much benefit should be expected on a more advanced compiler for z80/r800 based computers? Native C compiler for Sinclair ZX ...
12
votes
3answers
3k views

Native C compiler for Sinclair ZX Spectrum

I am looking for a native C compiler for the Spectrum 128. I would like one which: Has good support for the latest C standard at the time. Is not limited to compiling ridiculously short source code. ...
40
votes
2answers
23k views

Why were the /\ (min) and the \/ (max) operators abandoned in the C language?

In the UNIX V7 version of the C language (but not yet in the V6 version), there were the /\ (min) and the \/ (max) operators. In the source of the scanner part of the compiler, case BSLASH: if (...
20
votes
5answers
2k views

Early Forth for personal computers

What were the earliest Forth programming language implementations for 8-bit personal computers? Was it FIG Forth? Or a predecessor? Or some other development? Why did Forth lose its relative ...
28
votes
2answers
7k views

Which tools were used to create the C language?

Was the original C compiler written in some old assembly language and now later flex and bison are used instead?
27
votes
10answers
15k views

How to get started writing C for the IBM PC in 1980-81

Suppose it's late 1980 to early 1981, you've got some software you want to write for the IBM PC which will be released later in 1981, want to get started ASAP, and believe C is the right language for ...
11
votes
6answers
2k views

Do any mainframe emulators exist with a functional FORTRAN compiler?

Similar to this question, but generalized to any mainframe computer from before the microprocessor era, does there exist an emulator and OS for a vintage mainframe computer that will run the output ...
7
votes
1answer
413 views

What libraries do I need in order to compile for Windows 98?

I am attempting to compile John Burger's StdTel for Windows 98. I am using Pelles C, because it has Windows 98 support, but it appears that I don't have the necessary libraries. This is the compiler's ...
15
votes
8answers
2k views

How were bugs reported for compilers that shipped on and were installed via floppy disks?

Take the Microsoft C 1.0 compiler for example. It shipped on multiple 5.25" 360K disks, and when it ran on machines without internal hard disk, so users had to switch floppies between the editor, ...
7
votes
1answer
384 views

P′′ Language Interpreter/Compiler Resources

According to Wikipedia, P′′ is a "primitive computer programming language created by Corrado Böhm in 1964 to describe a family of Turing machines." P′′ contains only four instructions has influenced ...
15
votes
4answers
544 views

How can I run COMIT code?

I recently learned about the existence of COMIT, which was the first string processing language. It's very old (1957), but it was used a lot in the first 10 years it was around, mainly in academic ...
22
votes
5answers
2k views

How much benefit should be expected on a more advanced compiler for z80/r800 based computers?

I am self studying about compilers, and get hands on very good textbooks about the subject. I am thinking in develop a compiler using the almighty llvm infrastructure to cross compile to old computers,...