Questions tagged [c]

The C programming language: its historical aspects and use on/targetting retro platforms.

Filter by
Sorted by
Tagged with
98 votes
9 answers

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 ...
user avatar
  • 34.3k
20 votes
3 answers

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. ...
user avatar
  • 1,780
11 votes
3 answers

How can I create a pipe for stdin/stdout of (or in C or a batch file?

I'm working on a retro project and was trying to create a pipe of stdin/out/err in DOS, but I can't find any functions to to this. For instance the pipe() function from unistd.h isn't present in ...
user avatar
  • 275
90 votes
20 answers

Have programming languages driven hardware development?

Programming language development has been influenced by hardware design. One example from this answer mentions how C pointers were, at least in part, influenced by the design of the PDP-11. Has the ...
user avatar
  • 863
58 votes
4 answers

Why were single quotes ('…') chosen for characters, and double quotes ("…") for strings?

In C, '' is used to denote a character, while "" is used to denote a string. Why was this syntax chosen? I tried to research this using Wikipedia’s Timeline of Programming Languages along ...
user avatar
  • 633
42 votes
7 answers

The history of the NULL pointer

As we know, in C to dereference a null pointer is undefined behaviour. From what I understand, the PDP-7 and the PDP-11 both have ordinary memory that can be written to and read from at address 0. On ...
user avatar
  • 34.3k
72 votes
5 answers

Why did C use the arrow (->) operator instead of reusing the dot (.) operator?

In the C programming language, the syntax to access the member of a structure is structure.member However, a member of a structure referenced by a pointer is written as pointer->member ...
user avatar
  • 14k
40 votes
4 answers

When was this C function definition style, with type declarations of parameters after the parameter list, invented?

Recently I dug a little bit into old graphics libraries and found libxmi. The site was last updated on 08/09/2000. And in the source code I found the following style of function definitions which I ...
user avatar
  • 583
13 votes
10 answers

Alternatives for TurboVision on DOS

TurboVision was a library by Borland for developing TUI's (Text User Interfaces). It was included with their C++ and Pascal compilers. Were there any other TUI libraries that supported multiple ...
user avatar
6 votes
3 answers

Allocate 64 KiB in Watcom C 16-bit DOS

I'm trying to allocate a 64 KiB buffer in Watcom C 16-bit DOS. I'm using the "compact" memory model which defines the code segment to be limited to 64 KiB and addressed by near pointers (...
user avatar
  • 271
9 votes
2 answers

Which linker or object-file format imposed the 6-character restriction on external names?

It's my understanding that the reason that external identifiers in portable C programs had (still have?) to be unique in the first six characters is that six 6-bit characters¹ fill a 36-bit machine ...
user avatar
  • 1,388