Re:A wild bug: 1970s Intel 8271 disc chip ate my data
by joezydeco on Wednesday June 24, 2020 @12:04PM
(#23629596)
The 6800's HCF (Halt and Catch Fire) opcode is another famous example.
https://x86.fr/investigating-the-halt-and-catch-fire-instruc...
Re:A wild bug: 1970s Intel 8271 disc chip ate my data
by hyperman1 on Wednesday June 24, 2020 @07:25AM
(#23626630)
x86 had a few undocumented opcodes. AAD and AAM have a second byte that should always be 10, but turns out to be an argument for base10 . There was salc.
A CPU, when it encounters bytes in its instruction stream, has to do something, whatever. If there is no interrupt for invalid instruction, it has to do something else. Common behaviour is shadowing legal insn's , but completely new behaviour is always possible
Re:A wild bug: 1970s Intel 8271 disc chip ate my data
by rbanffy on Wednesday June 24, 2020 @10:21AM
(#23628165)
Actually doing something useful on invalid opcodes is cool, but a bad long-term idea - you'll end up having to support all the accidental behavior that ends up being used forever, or risk breaking backwards compatibility.
This is similar to the "undocumented instructions" on many CPUs of the time. The Z-80 was famous for reacting to invalid opcodes in somewhat useful ways. The 6502 also reacted in weird ways to invalid opcodes, but I don't remember any useful behavior. When the 65C02 came out (//c and //e enhanced) all invalid opcodes mapped to NOPs.