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

6502 CPU / Undoc opcodes



PN>: >Does any of you know about the undocumented instructions on the 6502 ?
PN>
PN>:    The 6502 does have some sort of undocumented instructions, but they
PN>: are not standardized. They can vary from one machine to the next, so
PN>
PN>That's because different chip manufacturers made their 6502's in slightly
PN>different ways, and not all Apple 6502's came from the same manufacturer.

The reason the X7 and XF instructions on the 6502 were not documented was
because they didn't always function in the same manner (it depended on the
method used to manufacture the NMOS 6502 chip).

[See my post in comp.emulators.apple2 for a discussion of "undocumented" NMOS 
6502 opcodes.]

PN>: there is no acceptible list of undocumented instructions. If you have
PN>: a 6502 (not 65C02) based machine (Apple ][, ][+, unenhanced //e), you
PN>: could by trial and error determine their behavior on your machine, but
PN>: it probably wouldn't work on any other 6502 machine.
PN>
PN>Wrong!  The 65C02 made legal some of the undocumented 6502 codes, even
PN>adding some, and standardising them.

I think that you are confusing the undocumented NMOS 6502 instructions (that 
were found/figured out by trial-and-error and the Rockwell 65C02 extensions 
(that were not implemented in other 65C02 processors).

PN>:    To make things worse, the 65C02 (used in enhanced //e, //c, //c+,
PN>: and the GS in emulation mode) has no useful undocumented instructions.
PN>: Anything unlisted acts just like a NOP ($EA), so you can put all the
PN>: undocumented instructions you want in your program, but it won't do
PN>: anything useful.

Actually, that's a plus.  Some of the undocumented opcodes of the NMOS 6502 
would result in the lock-up of computer.

PN>:    The Commodore 64 used a different processor (6510?), with
PN>: standardized undocumented opcodes; that's why programmers could
PN>: reliably use them.

The 6510 was created for Commodore [per their specs] by their (then) chip
manufacturering division MOS Technology (yes, Commodore bought up MOS 
Technology).

PN>This is not unrelated to the fact that Commodore owned a certain
PN>chip manufacturer.

Incorrect.  Commodore spec'd out the 6510 processor for their computer and
had MOS Technology build it.  It was made available for general use, but all 
other 6502-based platforms had built their system(s) around the 6502 and 
didn't want to/couldn't change their design to use the 6510.

* KingQWK 1.05 # [PK] * The majority of problems are caused by solutions.

----
+------------------------------------------------------------------------+
|Ye Olde Bailey BBS Zyxel 713-520-1569(V.32bis) USR 713-520-9566(V.34/FC)|
|   Houston,Texas             yob.com           Home of alt.cosuard      |
+------------------------------------------------------------------------+