
HCF - halt and catch fire) while others had strange but occasionally useful behaviour. Any self-respecting programmer would make use of these to squeeze out the last few cycles of performance.The effect of undocumented opcodes would vary between different versions of some processors, no doubt leading to the classic excuse “it worked on my machine”. Here are a few examples I've found useful.
Intel's 8088 was used in the original IBM PC and has spawned an entire family of processors.
Secrets of the Z80
Zilog's Z80 was used in a number of popular 8 bit computers including the Sinclair Spectrum, Amstrad CPC, TRS-80 and MSX. There are a number of undocumented opcodes with the CB, DD, ED and FD prefix.
- CB30-CB37 -
SLL regshifts a register left, setting bit 0. - DD - when used as a prefix to instructions which use H or L, either the high or low 8 bits of IX are used.
- FD - as DD, but the high or low 8 bits of IY will be used.
- ED70 -
IN (C)reads from i/o port C, setting the flags and discarding the result. - ED71 -
OUT (C),0outputs a zero to port C.
Secrets of the 8086/8088
Intel's 8088 was used in the original IBM PC and has spawned an entire family of processors.
- D6 -
SALCsets the AL register to either 00 or FF depending on the carry flag.SALCwas finally documented with the introduction of the Pentium Pro 27 years later. - 0F -
POP CSpops the CS register from the stack. Only works on 8086 processors. - 0F05 -
LOADALLloads all registers from memory location 0800. Only works on 80286 processors.
Which processors have you programmed and did you find any undocumented opcodes useful?
#songsincode are small pseudo-programs which display a song title or part of the lyrics. The more refined examples use conditional code and control stuctures to define the song.
Silas developed RobotWar for the PLATO computer system and later ported it to the Apple II for release by MUSE. The game is set at a time in the distant future when war has been declared hazardous to human health. Wars still rage, but the combatants are robots programmed to battle to the death.
In The Recursive Universe, William Poundstone uses Conway's Life as a vehicle to explore complexity theory and modern physics. Poundstone demonstrates how simple rules can produce complex results when applied recursively and suspects our own universe was created in a similar manner.

