Questions tagged [c]

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

Filter by
Sorted by
Tagged with
11 votes
3 answers
4k views

How can I create a pipe for stdin/stdout of command.com (or 4dos.com) 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
1 vote
2 answers
170 views

DOS, create pipe for stdin/stdout of command.com(or 4dos.com) in C or Batch? [duplicate]

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() command from unistd.h isn't present in ...
user avatar
  • 275
13 votes
10 answers
2k views

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
90 votes
20 answers
19k views

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
5 votes
3 answers
2k views

Were some Atari 2600 games written in C?

I thought all Atari 2600 games had been programmed in 6502/6507 assembly language (plus whatever activated the Stella sound system), but at a party recently, a friend indicated that some 2600 ...
user avatar
3 votes
1 answer
514 views

How to read disk files using CBM specific functions in cc65 with proper error checking

TL:DR What is the reason my kernel_read() function ignoring file errors? I'm trying to understand how to work with files in cc65 using CBM specific functions. My target is Commodore 64 with 1541 ...
user avatar
  • 2,484
6 votes
3 answers
1k views

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
-3 votes
2 answers
1k 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: ...
user avatar
1 vote
1 answer
612 views

How do I compile C code with the IRIX X Window System?

I have typed out a rather large file in C code that is defining OpenGL graphics and will draw a triangle on the screen. While I know all of the functions of the X Windowing System, I do not know how ...
user avatar
3 votes
4 answers
867 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 ...
user avatar
  • 3,178
19 votes
6 answers
4k views

What caused the downfall of Pascal? [closed]

From 1985 to 1990 Borland's Turbo Pascal was at least as popular as C for DOS systems. Turbo Pascal was especially popular because of it's ground breaking BGI graphics interface while C was stalled in ...
user avatar
  • 4,291
9 votes
1 answer
1k views

What was the name of the object-oriented C language I used in the 1980s on the Mac

I clearly recall working with an object-oriented C derivative on the Mac but I cannot find any definitive references to it. It was back in the days of System 7 and later System 8. It had both ...
user avatar
33 votes
2 answers
5k views

Why was UNIX never backported to the PDP-7?

Originally, UNIX was written in PDP-7 assembly, and then in PDP-11 assembly, but then when UNIX V4 began to be re-written in C in 1973 and was run mostly on the PDP-11. So far as I can tell, there ...
user avatar
  • 34.3k
98 votes
9 answers
38k 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 ...
user avatar
  • 34.3k
20 votes
3 answers
6k 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. ...
user avatar
  • 1,780
52 votes
5 answers
16k views

Why did C have the return type before function names?

In general, there are two types of syntax of defining functions - Something like C, C++, C#, or Java (int functionName(char arg)) vs the ML (and others) tradition of defining the return type after the ...
user avatar
  • 1,503
42 votes
7 answers
9k views

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
36 votes
5 answers
9k views

Why (historically) include the number of arguments (argc) as a parameter of main?

A comment on this answer to a StackOverflow question made me curious. According the C99 standard, section 5.1.2.2.1: The function called at program startup is named main. The implementation ...
user avatar
  • 653
50 votes
2 answers
24k 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 (...
user avatar
  • 15.8k
31 votes
5 answers
6k views

How was the C language ported to architectures with non-power-of-2 word sizes?

By the time the C language started to gain popularity outside of the PDP-11 circles (mid-1970s), mainframes with "weird" word sizes, and no capability to address individual bytes efficiently were ...
user avatar
  • 15.8k
16 votes
3 answers
1k views

Are there any public tools for the TMS34010?

I am interested to learn about the Texas Instruments TMS34010, a 32-bit fully functional CPU with built-in graphics manipulation capabilities, which appeared in Atari's Hard Drivin' arcade boards ...
user avatar
  • 1,732
32 votes
2 answers
8k 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?
user avatar
15 votes
1 answer
3k views

What was the first C compiler for the Mac?

When did a C compiler first become commercially available for the Apple Macintosh? And what was its name? The only programming languages that I recall were available for the Mac at launch (January ...
user avatar
  • 7,754
28 votes
10 answers
16k 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 ...
user avatar
  • 49.3k
21 votes
2 answers
3k views

What was the first C compiler for the IBM PC?

When did a C compiler first become available for the IBM PC? I have fond memories of Turbo C, but that didn't become available until the mid to late eighties; it definitely wasn't the first one. ...
user avatar
  • 49.3k

1
2