[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



mdj wrote:
tjentzsch@yahoo.de wrote:

Just stay away from those which are marked as unreliable (e.g. see
http://oxyron.de/html/opcodes02.html)

Which is all of them;

No? Only two are completely unstable and 6 are "unstable in certain aspects" but you can use them if you avoid the unstable conditions.

the 65C02 and 65816 treat all unused opcodes as
NOP. If you're writing code for the Apple II it's not even worth
considering.

Some illegals are quite useful, like SHX/SHY which in some cases can be used as STX absolute,Y / STY absolute,X if you use the right. Also you can do a CPU test and use different code on different CPUs. The demo "Oneder/Oxyron" does this. It works on 6502 with illegal opcodes, and on 65816 it uses a slower but illegal-free code.