6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 14, 2024 8:53 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Branch Timing
PostPosted: Thu Apr 03, 2003 2:07 am 
Offline

Joined: Sat Aug 31, 2002 12:33 pm
Posts: 64
Location: USA
Hi Everyone,

I noticed in the data-sheet for the 65C02 that the # of cycles for a branch
is 2 (taken or not taken).

How can this be? If the branch is taken, wouldn't it need a third
cycle to add the displacement to the program counter. Remember, during the second cycle the displacement was only being fetched.


Thanks,
Bye,

Paul


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Apr 03, 2003 2:42 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8540
Location: Southern California
The base count is 2 clocks. There should be a foot note saying to add 1 clock if the branch is taken, and one more (totaling 4) if a page boundary is crossed when the branch is taken. The majority of branches will be within the same page however. BRA will usually take 3, but 4 if you cross a page boundary. JMP absolute always takes 3.

Garth


Top
 Profile  
Reply with quote  
 Post subject: Branch Timing
PostPosted: Thu Apr 03, 2003 2:48 am 
Offline

Joined: Sat Aug 31, 2002 12:33 pm
Posts: 64
Location: USA
Hi Garth,

Thanks much for clarification. This will allow me to get
some sleep tonight. Gosh, though, you would think
that the latest data-sheet from WD would show the correct
number.

Thanks again.

Bye,

Paul


Top
 Profile  
Reply with quote  
 Post subject: Branch Timing
PostPosted: Thu Apr 03, 2003 5:52 pm 
Offline

Joined: Sat Aug 31, 2002 12:33 pm
Posts: 64
Location: USA
Hi Everyone,

Correction!

Table 3-2 does have foot-note
that says add a cycle for the
branch taken case. Table 5-4
is also complete.

Sorry for the inaccurate previous post.

Bye,

Paul


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

All times are UTC


Who is online

Users browsing this forum: barnacle and 5 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: