Skip to main content
125 votes
Accepted

Why wasn't ASCII designed with a contiguous alphanumeric character order?

Why is ASCII this way? First of all, there is no one best sorting order for everything. For example, should UPPER or lower case be first? Should numbers be before or after letters? Too many choices, ...
manassehkatz-Moving 2 Codidact's user avatar
120 votes
Accepted

Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?

One use is as a copyright mechanism. Many distributors would steal/copy programs and sell pirate or derivative copies, by changing the text strings inside the code and reordering the blocks, it was ...
LOIS 16192's user avatar
  • 1,232
109 votes

Why was `!` chosen for negation?

Since the few document trails on this topic quickly run cold, I contacted Ken Thompson. He confirmed that if there was anything he would have been influenced by at the time, it would have been BCPL ...
Kaz's user avatar
  • 1,660
91 votes
Accepted

Where did the popularity of the `i` variable come from?

FORTRAN made all variables starting with I, J, K, L, M and N integer by default. So just I by itself could be conveniently used as a loop variable. I imagine that choice was made because I, J, K, M ...
George Phillips's user avatar
89 votes

Why didn't C++ specify filename extensions?

Because it's not important to ... anything. The compilers don't care. The editors don't care. Back in the day, some operating systems didn't even HAVE "file extensions". DOS mandated them, ...
Will Hartung's user avatar
  • 12.4k
84 votes
Accepted

Does this 8088 code in the Leisure Suit Larry 2 game actually do anything?

In a brief email conversation with Al Lowe (yes, the man himself!) he suggested that he probably used the COMMAND.COM file as the basis for this code as it would have been installed on every PC. ...
Noel Whitemore's user avatar
83 votes
Accepted

Who is credited for the creation of Assembly Language?

According to Wikipedia, the first assembly language, "Contracted Notation", was developed in 1947 by the late Kathleen Booth (née Britten). The language doesn’t look anything like “modern” ...
Stephen Kitt's user avatar
80 votes
Accepted

Did Forth's inventor Charles Moore really write a CAD program in only 5 lines of code?

tl;dr summary tl;dr It's not 5 lines and it's not a CAD program, but it's still extremely small, but that's not as impossible as it first sounds. What is meant by "CAD" program? You are ...
Jörg W Mittag's user avatar
78 votes
Accepted

How did old MS-DOS games utilize various graphic cards?

Did every programmer of every game implemented all possible various API's that old graphic cards supported? Yes - but it went even deeper than that. Early graphics cards had virtually no callable ...
Greg Hewgill's user avatar
  • 7,009
73 votes

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

It's the original C syntax as designed by Dennis Ritchie, so bite your tongue :-) As mentioned in another answer, the style was not unusual at the time. For an example of early art: FORTRAN II (1958) ...
dave's user avatar
  • 36.4k
72 votes

Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?

The NES was also from the era where some sound and graphics resources were also executable code. (Typically, this worked the other way around. Identify a needed sound and listen to chunks of the ...
Eric Towers's user avatar
  • 1,129
69 votes
Accepted

What happened to MODULA-2?

If you are asking whether Modula-2 as a programming language is still in use today, then I believe the answer is "Yes", although it was never a mainstream language. There are still active ...
Jörg W Mittag's user avatar
65 votes

Why was nil defined as a reserved word in Pascal?

The definition of PASCAL is, above all else, intended to be simple. PASCAL was designed as a pedagogical language (with aspirations to be useful for commercial purposes, but that was a secondary ...
Jules's user avatar
  • 13k
62 votes
Accepted

What was the first programming book

I would say one of the versions of the Menabrea paper, written in 1842 by Luigi F. Menabrea. Ada Lovelace became involved in computing when she was asked to translate this paper from Italian to French....
Jerry Coffin's user avatar
  • 5,183
62 votes

Why wasn't ASCII designed with a contiguous alphanumeric character order?

According to ASA X3.4-1963 Appendix A, one of the design considerations was: (7) Ease in the identification of classes of characters Furthermore: A4.4 The character set was structured to enable ...
Greg Hewgill's user avatar
  • 7,009
61 votes
Accepted

What happened to the job market for assembly programmers once high level languages became mainstream?

This isn't like "what happened to the stable hands when cars replaced horses". It is more like "what happened to the mechanics who worked on manual transmissions when automatic ...
manassehkatz-Moving 2 Codidact's user avatar
60 votes
Accepted

What was the first programming language to support “operator chaining”?

COBOL IF X IS GREATER THAN 0 AND LESS THAN 99 ...
dave's user avatar
  • 36.4k
59 votes

What was the first Object Oriented programming language?

Simula 67 Simula has objects, classes, subclasses, and inheritance. Dahl and Nygaard shared a Turing award for their pioneering work.
dave's user avatar
  • 36.4k
58 votes
Accepted

How was collision detection done on the Asteroids arcade game?

it seems to be a simple bounding box check, as shown here from 6502 code disassembly, collision check between ship and saucer HitDetShip: L6A63: CPX #$01 ;Is object 1 not the player's ...
Jean-François Fabre's user avatar
58 votes

Why was `!` chosen for negation?

The ! was around as part of the B programming language, according to the "User's Reference For B" (K Thompson, Jan 1972). Somewhere between BCPL and B, the decision was made to use !. In the ...
Clinton Pierce's user avatar
57 votes
Accepted

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

For type system reasons, and for compatibility with B. B is a programming language that served as the immediate ancestor of C. The salient thing about B is that it had no type system: all values in B ...
user3840170's user avatar
  • 23.2k
56 votes
Accepted

What is this programming language having PROC, DCL, LABEL keywords?

It's PL/I, promoted by IBM as the successor to FORTRAN, Algol 60, and COBOL. That's actual code as far as I recall, not pseudocode. PL/I had abbreviations for keywords; "DCL" is "DECLARE". It starts ...
dave's user avatar
  • 36.4k
55 votes

In what language(s) is the return value set by assigning to the function’s name?

Pascal does this, I don't know of others. Don't know if the practice move forward with other Wirth languages.
Will Hartung's user avatar
  • 12.4k
54 votes

Did type-in-programs or type-in-listings teach programming in the 70s and 80s or was it just tedious typing of the source code?

The typing didn't. The subsequent debugging did.
Mark Morgan Lloyd's user avatar
53 votes

In what language(s) is the return value set by assigning to the function’s name?

The languages in the Visual Basic family do exactly this. This includes VBScript, VBA, Visual Basic and earlier. I believe these inherit the "feature" from QBASIC. For example Public ...
Omar and Lorraine's user avatar
49 votes
Accepted

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

K&R first edition (1978) does not mention the NULL terminator in the argv list at all. This was added later, in ANSI C. The relevant paragraph (section 5.11, p. 110) is: In environments that ...
Greg Hewgill's user avatar
  • 7,009
49 votes
Accepted

Did anyone ever run out of stack space on the 6502?

Unlike its main rival the Z80, the 6502 had a size limit of 256 bytes for the hardware stack. The 6502 stack is mainly meant as a return stack and for register preservation - which usually isn't a ...
Raffzahn's user avatar
  • 228k
49 votes

Does this 8088 code in the Leisure Suit Larry 2 game actually do anything?

It's most definitely not a program 'written' by a programmer, but rather a listing of some random program segment using the disassembly command of a debugger. Have you tried to find that code within ...
Raffzahn's user avatar
  • 228k
48 votes
Accepted

What is 'Adaptive Tile Refresh' in the context of Commander Keen?

"Adaptive Tile Refresh" is the strategy of maintaining a software-drawn tilemap in memory in place by redrawing only the tiles which differ after moving a logical camera across a grid of ...
knol's user avatar
  • 12.6k

Only top scored, non community-wiki answers of a minimum length are eligible