Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. An illegal
opcode, also called an undocumented instruction, is an instruction to a
CPU that is not mentioned in any official documentation released by the
CPU's designer or manufacturer, which nevertheless has an effect.
Illegal opcodes were common on older CPUs designed during the 1970s,
such as the MOS Technology 6502, Intel 8086, and the Zilog Z80. They
exist as a side effect of the wiring of transistors in the CPU, and
usually combine functions of the CPU that were not intended to be
combined. While most illegal instructions have useless or even highly
undesirable effects, a few might by accident do something that can be
useful in certain situations. Such instructions were sometimes exploited
in computer games of the 1970s and 1980s to speed up certain
time-critical sections.