On older ancestors of 8086, many instructions were only available with the accumulator as an implicit destination. See https://en.wikipedia.org/wiki/Accumulator_(computing).
The name "accumulator" for 8086's AL/AX register is mostly historical, and related to 8086's design to make asm source translation from 8080 code possible mechanically. (Why are first four x86 GPRs named in such unintuitive order? and also The start of x86: Intel 8080 vs Intel 8086?)
There are special short-form encodings of many instructions using AL/AX/EAX (like add al, 2
is 2 bytes, but add cl, 2
is 3 bytes). 8086 (and later extensions in 186/386) made the registers more orthogonal than 8080 so you can add dx, cx
without having to use the accumulator for all ALU instructions.
8086 has a (mostly) 2-operand instruction set, not an Accumulator Machine, in terms of instruction format. You can save code-size by using the accumulator register, but it's not required for most things especially with later extensions to the x86 ISA. Compare the x87 FPU instructions: everything has to use st0
as one of the operands. (In theoretical CS a Register Machine refers to the main memory as "registers", as opposed to a Turing machine with a tape. Real CPUs have registers separate from memory, unlike that idealized model. x86 instructions can have at most 1 explicit memory operand; the other(s) have to be registers. https://www.realworldtech.com/architecture-basics/2/ shows a taxonomy of real-world accumulator vs. register designs, with CISC x86 being load-store plus the ability for one or the other operand to be memory.)
On many older CPUs, you might have had to do the equivalent of mov ax,dx
/ add ax, cx
. For example, 8080 / Z80 had instructions like LDA
(load into accumulator) and ORA
(OR into accumulator) where the accumulator destination was baked into the mnemonic and opcode. (This is where the inefficient and obsolete or ax,ax
instead of test ax,ax
idiom comes from.)
This 8080 opcode map http://pastraiser.com/cpu/i8080/i8080_opcodes.html show many instructions like SUB D
and SUB C
, where the implicit first operand is the accumulator, A.
But 8086 is a register machine, not an accumulator machine. There are several instructions that require using AX, such as mul
/ div
, and cdq
, but other than DIV and widening-multiply you can use whatever registers you want with movsx
on 386 and later, and imul edx, edi
.
Note that many 8-bit micros that only have ALU instructions using the accumulator aren't always pure accumulator machines as far as theory-of-computation. They typically have other registers they can use for addressing modes. But they are typically 1-operand instruction sets.