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

Re: 6502 illegal opcodes questions



Linards Ticmanis <ticmanis@gmx.de> wrote:

> David Empson wrote:
> 
> > Yes, according to information in the data sheets (which I don't have
> > handy and can't verify).
> 
> BTW the 65C02 data sheet is available from WDC as I just found out:

I thought as much. I couldn't be bothered looking, and all my Apple II
books are packed away in the basement now (and unlikely to be accessed
again for a while).

> > http://www.westerndesigncenter.com/wdc/datasheets/w65c02s.pdf
> 
> Though AFAIK the old 65C02 in the Apple lacked the WAI, STP, BBSx and
> BBRx instructions, right? Since they're not emulated by the old Applewin
> code.

Not sure about WAI or STP (I seem to recall them being new opcodes on
the 65802/65816). The main ones I recall being added were TSB, TRB, STZ
and BRA plus a few more addressing modes on existing instructions, such
as LDA (etc.) indirect and JSR pre-indexed absolute indirect.

The BBSx, BBRx, SMBx and RMBx instructions are not standard 65C02
opcodes. They were added by Rockwell in their R65C02 and apparently were
also included in some of their earlier R6500 series as well.

A standard 65C02 based on the original specification from WDC does not
have any of these instructions: all of the x3, x7, xB and xF opcodes are
NOPs. These opcodes are used on the 65802/65816 for new addressing modes
and other miscellaneous instructions.

Apple only used the WDC 65C02 or second sources with identical
instruction sets: GTE was most common in my observations; apparently
they also used a Rockwell 65C02 without the extra R65C02 instructions. I
have seen an R65C02 in some IIe clones.

-- 
David Empson
dempson@actrix.gen.nz