118
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 ...
103
votes
Accepted
Why did DOS use dollar-terminated strings?
The short answer is that DOS was designed to be similar to CP/M, and drawing a quote from here:
While 8-bit programs could not run on 16-bit computers, Intel
documented how the original software ...
82
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” ...
81
votes
Accepted
What computer system is this from 1984 Doctor Who?
This is an example of BBC BASIC with inline (6502) assembler code. The computer in use would have been a BBC Microcomputer, manufactured by Acorn Computers Ltd.
The display was probably a studio ...
81
votes
Accepted
How did the SNES do the “pixelate” transition effect?
Believe it or not, it's a dedicated hardware feature of the Super Nintendo — it's the mosaic register, at address $2106. The programmer can pick a pixellation value from 1 to 16, which will cause the ...
79
votes
Accepted
Were later MS-DOS versions still implemented in x86 assembly?
C did exist when DOS was developed, but it wasn’t used much outside the Unix world, and as mentioned by JdeBP, wouldn’t necessarily have been considered a good language for systems programming on ...
76
votes
Accepted
Why did the MS-DOS API choose software interrupts for its interface?
TL;DR;
Using INT comes not only natural due the way the 8086 is designed, but was as well intended by Intel as OS entry point, much like a Supervisor Call (SVC) on /360 type mainframes:
(Excerpt from ...
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 ...
56
votes
Accepted
Why use static RAM addresses instead of the stack?
The 8 bit 6502 family doesn't have any stack-relative addressing modes that would make it easy to use the stack for variable storage. One can access values on the stack with a sequence such as TSX; ...
56
votes
Why weren't 80s arcade games programmed in C?
I think the question I would ask is why would you program arcade gamers in C back in the 80's.
Firstly, C was not nearly as popular in the world of microprocessor programming as you might imagine back ...
53
votes
Was memory corruption a common problem in large programs written in assembly language?
Coding in assembly is brutal.
Rogue pointers
Assembly languages rely even more on pointers (through address registers) so you can't even rely on the compiler or static analyzing tools to warn you ...
52
votes
Accepted
Why are first four x86 General Purpose Registers named in such unintuitive order?
There are no technical reasons, as any order would work and result in the same amount of gates. More likely it originated in the process by which the 8086 was developed. A main goal was to allow easy ...
50
votes
Accepted
How was the first assembler for a new home computer platform written?
Gates and Allen used remote terminal access to a minicomputer (Harvard's DEC PDP-10) to cross-assemble, and simulate, their implementation of BASIC for the Altair 8800. Commodore Basic (for the 6502) ...
48
votes
Why use static RAM addresses instead of the stack?
Off the top of my head I can think of two reasons, there are probably more.
The first reason is that these variables may be set by a routine each frame, and then a lot of code uses them during the ...
48
votes
Accepted
Will PC-DOS run faster on 4 or 8 core modern machines?
No, DOS won't use any additional CPU (*1) ever.
(Though it might run faster due them new CPUs being faster)
Quite the same way as DOS doesn't take advantage of the extended memory or additional ...
46
votes
Accepted
How slow was the 6502 BASIC compared to Assembly
Yes, BASIC is much slower than assembly for many operations. For an
easy example, try out this program on a Commodore 64 or emulator:
for i = 1024 to 1984 : poke i,peek(i) or 128 : next
You will see ...
45
votes
Why can't I invoke the next interrupt service by incrementing the AX register after calling the same interrupt?
When calling the mouse driver interrupt with AX = 0, it returns 0xFFFF in AX if a mouse driver is installed.
So if it is installed, the code with INC AX will increment AX back to 0 and then it will ...
45
votes
Accepted
Managing registers/memory effectively on the Z80
It's quite a while since I did any Z80, but there's an important difference between classic Z80 systems and modern kinds of computer.
Memory is fast.
Unlike modern systems where memory accesses take ...
43
votes
How was the first assembler for a new home computer platform written?
As someone who did it....
We wrote an assembler for an 8080, as there was nothing affordable from Intel.
We wrote it in ALGOL 60, if I recall, and ran it on a mainframe.
the first thing we ran ...
43
votes
Which was the first programming language that had data types?
The premise:
Machine language (and Assembly language) don't have the concept of data types
is not quite correct, because tagged architecture means exactly this, machine language where the data is ...
43
votes
Why is the processor instruction called "move", not "copy"?
Besides the matter of semantics and personal taste, there’s a much more practical reason: some instructions sets claim to be copyrighted, as the Wikipedia Z80 article states:
Because Intel claimed ...
42
votes
When did assembly source code begin to be written in lowercase?
It changed when people learned that a) they HAD lowercase, b) typing in uppercase is a pain in the neck, c) that it doesn't matter what case it's in.
It's just the natural progression as capabilities ...
40
votes
When and why did high-level language compilers start targeting assembly language rather than machine code?
why did high-level language compilers start targeting assembly language rather than machine code
Well, the answer is probably: to avoid developing a high level language to binary converter for each ...
40
votes
Accepted
What 8086 instructions accept REP?
All of them. But it will only have an effect with a select few.
Contrary to what the question implies, the rep prefix is not an orthogonal looping construct that can be combined with any instruction. ...
37
votes
Accepted
How did early x86 BIOS programmers manage to program full blown TUIs given very few bytes of ROM/EPROM?
The architecture of the original IBM PC (and its clones) let the BIOS access the video memory directly.
So making nice text layouts did not require positioning the cursor or making a sequence of ...
37
votes
Accepted
Why is the processor instruction called "move", not "copy"?
Because "move" is the typical necessary function
It isn't always this way, of course, but especially with earlier CPUs, there were limited destinations for data from a particular operation - e.g., ...
37
votes
Was there any automated unit testing prior to 1972?
Yes: The Apollo Guidance Computer
Update: Computers in Spaceflight: The NASA Experience confirms that unit testing was performed on the Apollo software:
The simulations followed individual unit tests ...
37
votes
Accepted
Why are the Intel 8080's rotate instructions called opposite to intuition?
What historical reason is there for these instructions being called that?
"Historical Reason" is the right key word here, as ...
TL;DR: It's Piled Up Heritage
The 8080 inherited the ...
36
votes
Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?
I'm just speculating here, but one possible reason for using a 2-byte NOP would be if you wanted to change an existing 2-byte instruction into a NOP (to fix a bug, for instance), without changing the ...
36
votes
Why are assemblers called assemblers?
The first use seems to be in "Wilkes, M. V., D. J. Wheeler, and S. Gill, The Preparation of Programs for an Electronic Digital Computer. Reading, MA.: Addison-Wesley, 1951". This book can ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
assembly × 2166502 × 34
z80 × 27
ms-dos × 22
programming × 22
commodore-64 × 19
history × 16
8080 × 14
x86 × 14
8086 × 13
c × 10
game-boy × 10
apple-ii × 9
graphics × 9
instruction-set × 8
cc65 × 8
pdp-11 × 7
ibm-pc × 6
basic × 6
intel × 6
cp-m × 6
hardware × 5
cpu × 5
unix × 5
software-development × 5