[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Decimal Flag Question
"Bryan Parkoff" <spam> writes:
> I reviewed NMOS 6502 and CMOS 65C02 Datasheet Reference. I only receive
> CMOS 65C02 from Western Design Center.
> I show that decimal must be added one extra cycle if it is in BCD mode
> on 65C02 Datasheet, but it does not show on 6502. Is it normal that 6502
> does not have one extra cycle?
Yes.
> Why do 65C02 need one extra cycle?
Because the 65C02 produces "correct" flag values for some flags in BCD
add subtract that the NMOS part does not.
> It does
> not make sense that 65816 does not have one extra cycle for BCD mode.
> Please explain.
It's a different design, it probably works differently internally.
> CMOS 65C02 shows that Direct Page Indexed X and Direct Page Indexed Y
> must have one extra cycle if it acrosses page boundaries. In fact is that
> it is not supposed to add one extra cycle because it can only access from
> $00 to $FF as first page.
It's possible that their state machine requires the extra state even though
they don't add in the carry. Or it could be an error. Write a simple
test program that runs the instruction ten million times, and measure
the run time.
> Only Absolute Indexed X and Absolute Indexed Y
> can add one extra cycle. Do you think that CMOS 65C02 Datasheet Reference
> may contain errors from WDC? Please advise.
I would never claim that any data sheet had no errors, even if I'd written
it myself.
The best way to find out what the parts really do is to try it.