6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Mar 28, 2024 3:16 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: help!A question
PostPosted: Thu Jul 30, 2009 4:54 am 
Offline

Joined: Thu Jul 30, 2009 4:46 am
Posts: 4
i dont understand,like "AND Absolute,X" instruction that spend cycles is write "4 (+1 if page crossed)",what's mean "+1 if page crossed"?

who man can tell me,thank you very much


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jul 30, 2009 6:45 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8412
Location: Southern California
Welcome.

Perhaps an example would be best: Let's say X contains $56. AND $1000,X will AND the value in the accumulator with what is contained at address $1056. It is still in page $10, so the indexing does not cause a crossing of page boundaries. But if you do AND $10E0,X, now $10E0+$56=$1136, so you are no longer getting a value from page $10, but rather page $11. The page boundary was crossed by the indexing, and an extra cycle was required.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jul 30, 2009 7:06 am 
Offline

Joined: Thu Jul 30, 2009 4:46 am
Posts: 4
thank u.i have understand.

but if "INC Absolute,X" is "INC $10E0,$56",then the page was crossed,so it will be spend an extra cycle.why the "INC Absolute,X" instruction dont take "(+1 if page crossed)"?

INC instruction reference:http://www.obelisk.demon.co.uk/6502/reference.html#INC


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jul 30, 2009 7:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8412
Location: Southern California
Quote:
why the "INC Absolute,X" instruction dont take "(+1 if page crossed)"?

INC instruction reference:http://www.obelisk.demon.co.uk/6502/reference.html#INC

The 65c02 does do it, according to the programming manual put out by the manufacturer, WDC, available at http://www.westerndesigncenter.com/wdc/ ... manual.pdf . It takes 6 clocks without crossing, 7 if it does cross. According to my old Synertek book, the NMOS always took 7.

The page you linked only has the NMOS 6502 instructions. Unless you are trying to use vintage equipment like the Commodore 64, I recommend going to the CMOS 6502 (65c02) as it has more instructions and addressing modes, all the bugs fixed, onboard clock oscillator, lower power (obviously), and other enhancements.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jul 30, 2009 8:59 am 
Offline

Joined: Thu Jul 30, 2009 4:46 am
Posts: 4
thank you very much!!thank u solve my question,thank u again!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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: