--- In AVR-Chat@yahoogroups.com, Dave VanHorn <dvanhorn@d...> wrote: > I was there. Using 6 MHz Z-80 systems and designing 4 MHz Z-80 systems. > But, the undocumented opcodes were then, and still are, a gamble. > You have no idea if the next rev will do anything similar, or even > anything at all. Back 'in the day' when Apple II's, Commodore 64's, etc. were the PCs most mere mortals could afford, undocumented CPU op-codes were not uncommonly used by copy protection routines in software, the idea being that it would take that much more effort by someone trying to bypass the protection if they didn't even know what the instructions were! Of course, eventually the undocumented op-codes operation became pretty well known, and there were even assemblers and disassemblers that would accept them directly. I suppose that 'undocumented' is something of a misnomer -- it was really just op-codes that weren't specifically 'designed' into place, so what they ended up doing was considered a 'don't care,' although -- as others have pointed out -- sometimes they did something vaguely useful. The vast majority of the time, though, they just did something 'weird' that wasn't particularly handy. Apple II's and Commodore 64's eventually came out with accelerators and newer models that used fancier, faster processors such as the 65C02 and the 65816 (in 6502 compatibility mode) -- this did, indeed, break any code that relied on these op-codes. (In particular, the 65C02 took the chance to add a bunch of new op-codes that were oft-requested by users.) It's interesting to me that many of these old processors never die, they just tend to now end up as part of some embedded system. The newer low-end HP calcultors (e.g., HP 33s) use a 6502-compatible CPU (ostensibly because it's dirt cheap in quantity), the Z-80 lives on in those Rabbit Semiconductor CPUs, the 68k is now quite popular in PDAs, etc. ---Joel Kolstad
Message
Re: Bogus op-codes
2005-07-26 by Joel Kolstad
Attachments
- No local attachments were found for this message.