It is currently Wed Dec 13, 2017 9:58 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 6502 boundary question
PostPosted: Tue Jun 21, 2005 11:44 pm 
Offline
User avatar

Joined: Tue Dec 21, 2004 8:35 pm
Posts: 600
Location: Argentina
Im little confused about what it means "page boundary crossed" when doing an Instruction that for example reads from memory, like ADC addresing mode ABSOLUTE_X, the reference says (as almost all do) "add 1 cycle if the "page boundary is crossed". Is it the fact that the base address is given by the pc + 1 and pc + 2 and added to x? i mean if we do:

lda $01FF, x

is in that situation that we cross the page boundary to $02XX, assuming that x > 0 of course.

Is that well?

_________________
ANes


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 22, 2005 3:44 am 
Offline

Joined: Sat Nov 13, 2004 6:25 am
Posts: 96
Yup, you got it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 22, 2005 9:46 am 
Offline
User avatar

Joined: Mon Sep 27, 2004 8:33 am
Posts: 3715
Location: Central Texas, USA
My understanding of the reason for this extra cycle is that the 6502 has a single general-purpose 8-bit adder that it reuses for various tasks, including indexed absolute addressing mode. On the first cycle it adds X to the low byte of the target address. If a carry is generated, it needs to take an extra cycle to add one to the high byte. This also explains why the low byte of addresses is stored first.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group