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

Re: Across Page Boundaries Question



"Bryan Parkoff" <BParkoff@satx.rr.com> writes:
>     Does "Across Page Boundaries" mean if branch goes beyond $FFFF that
> wraps back to $0000?

Across page boundaries refers to 256-byte ($100 hex) pages.  The principal
significance of page boundaries is that branches and indexed addressing
that cross a page boundary take an extra clock cycle to execute.

Note that some operations on the 6502 *cannot* cross page boundaries:

On the NMOS 6502, if you do something like JMP ($12FF), instead of
fetching the target address from $12FF and $1300, it fetches $12FF and
$1200.  WDC fixed this in their CMOS 6502 core design, which was used by
almost all vendors including Rockwell, GTE, and others.  Commodore
apparently designed their own CMOS 6502 core rather than using the WDC
design, so I'm not sure how theirs works, but I've also never seen a
single machine containing the part.

On all 6502s (NMOS and CMOS), if you use indexed indirect or indirect
indexed addressing with the zero page address $00FF, e.g. "LDA ($FF),Y",
the indirect address will be fetched from $00FF and $0000.