Skip to main content

Questions tagged [instruction-set]

For questions regarding the instruction sets of microprocessors.

88 votes
9 answers
16k views

Why is the processor instruction called "move", not "copy"?

Many processors have an instruction called "move" (sometimes spelled MOV) which copies data from one location (the "source") to another (the "destination") in registers and/or memory. It does not do ...
JoelFan's user avatar
  • 2,127
63 votes
3 answers
7k views

How does the LOADALL instruction on the 80286 work?

This undocumented instruction existed in the 80286 and, I believe, the 80386. I think it was added while debugging the chip, so the engineers could quickly put the processor into any state and test it ...
mcleod_ideafix's user avatar
52 votes
4 answers
12k views

What did the 8086 (and 8088) do upon encountering an illegal instruction?

Preface: This question does in part intersect with Use of undocumented opcodes, but targets especially the 8086 instruction handling. I was reading Tanenbaum's "Operating Systems, Design and ...
Joe D's user avatar
  • 631
50 votes
3 answers
8k views

Why did the PDP-11 include a JMP instruction?

The PDP-11's program counter was addressable in two ways: as a general purpose register or as a memory location. Still, the PDP-11's instruction set included separate instructions for moving a new ...
Omar and Lorraine's user avatar
50 votes
2 answers
16k views

How did the Z80 instruction set differ from the 8080?

The Zilog Z80 microprocessor, known for its use in the ZX Spectrum, was designed to be a backwards-compatible extension to the Intel 8080 processor. It introduced several new instructions to the 8080'...
wizzwizz4's user avatar
  • 18.7k
48 votes
4 answers
8k views

Why are first four x86 General Purpose Registers named in such unintuitive order?

On x86 the first four general-purpose registers are named AX, CX, DX, BX. It would be quite intuitive if their indices (those used in instruction encoding) were in alphabetical order, but instead of ...
Ruslan's user avatar
  • 1,454
47 votes
6 answers
13k views

Why does the 6502 have the BIT instruction?

The 6502 has a bit instruction which copies two of the bits into the N and V flags, pretends to and the byte with the accumulator, but discards the result and only affects Z. I'm having a hard time ...
Omar and Lorraine's user avatar
47 votes
3 answers
6k views

What happened to the SEV instruction on the 6502?

The 6502 has a group of opcodes which copy bit 5 from the opcode into one of the status flags. (I know it's not implemented this way, but it looks as though the bit fields are: 2 bits to select the ...
Omar and Lorraine's user avatar
45 votes
8 answers
5k views

Executable ASCII files before x86?

I've known about a technique allowing to bootstrap arbitrary 16-bit x86 code from a subset of instructions representable as printable ASCII bytes since the early 1990s. The first example of an ASCII ...
Leo B.'s user avatar
  • 19.4k
40 votes
4 answers
38k views

Did any processor implement an integer square root instruction?

Has any processor ever implemented an integer square root instruction? Obviously, floating-point square root instructions are quite common, but I've never seen one specifically for integers. One close ...
v-rob's user avatar
  • 857
38 votes
1 answer
4k views

How did the 8086 interface with the 8087 FPU coprocessor?

The 8087 has many instructions - too many, it seems, to be encoded as part of the 8086 instruction set. How did the Intel 8086 interface with an Intel 8087 FPU that a user added? Consider the ...
Jet Blue's user avatar
  • 2,005
33 votes
2 answers
4k views

What is the relative code density of 8-bit microprocessors?

When RAM is at a premium, as it was in the old days, a greater code density of an instruction set can be a substantial advantage. (Click saver: Code density refers loosely to how many microprocessor ...
Leo B.'s user avatar
  • 19.4k
32 votes
6 answers
5k views

Why does the Z80 include the RLD and RRD instructions?

The Z80 has an instruction RLD, which apparently treats the lower 4 bits in the accumulator and the full 8 bits in (HL) as a twelve bit integer which it then rotates left by 4 bits. The carry flag ...
Omar and Lorraine's user avatar
31 votes
4 answers
4k views

What motivated the weird boolean instruction repertoire of the PDP-11?

The PDP-11 has seven dyadic instructions (I'm not counting the byte/word varieties separately), which take a full six bits for each of its operands. That's twelve bits to specify the operands, and ...
Omar and Lorraine's user avatar
29 votes
3 answers
4k views

Why does an instruction include the address of the next instruction on the IBM 650?

The IBM 650 seems to be a load-store machine. One advantage of a load-store machine is that the instruction can be shorter because there's less pressure to pack more information into it. But the IBM ...
Omar and Lorraine's user avatar

15 30 50 per page
1
2 3 4 5 6