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

Re: Page Boundary Question



Through the magic of ADC.

 CLC
 LDA #$02
 ADC #$EC
 BCC NO CYCLE

 CLC
 LDA #$82
 ADC #$7F
 BCS ADD CYCLE

"Bryan Parkoff" <spam> wrote in message
qjydnTqraqY0xXCjXTWcqA@texas.net">news:qjydnTqraqY0xXCjXTWcqA@texas.net...
>     I understand that 6502 can only add one extra cycle if it is across
page
> boundaries.
>
>     For example,
>
> 2000: A9 00    LDA #00
> 2002: F0 EC    BEQ 1FF0
>
>     If BEQ is true, it will branch to $1FF0.  Extra cycle is supposed to
be
> added, but it didn't.
>
> 2080: A9 00    LDA #00
> 2082: F0 7F    BEQ 2103
>
>     If BEQ is true, it will branch to $2103.  Extra cycle will be added.
> ($20)$82 + $7F will always show carry flag that will let cycle to know
> before it is added.  How can 6502 know that ($20)$04 + $EC will not always
> show carry flag?  Please explain.  It is what 6502 Reference Manual says
> that branch can only add one extra cycle if carry flag is present.
>
> Bryan Parkoff
>
>