6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 9:41 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Jun 23, 2013 5:05 pm 
Offline

Joined: Sat May 11, 2013 2:58 am
Posts: 12
How does the 6502 increment and decrement the X and Y registers? I orginally thought that the registers were loaded into the alu A input register and the carry was set to one, but I am not so sure anymore after I heard that the 6502 had a increment/decrement circuit seperate of the alu. Is the alu used or is the special increment/decrement circuit used? If the alu is used, how does it only add carry and not the B input register too? Is the B input register loaded with zero? Also, how does the 6502 generate the 1 for the high byte of the address when using the stack pointer? How does it generate 0 when accessing zero page and FF when access the interupt vectors?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 23, 2013 7:43 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Many questions!

There's a dedicated conditional 16-bit incrementer for the PC.

Otherwise, it's all done by the ALU.

We can probably answer all your questions with reference to Hanson's block diagram and visual6502.

For example: http://visual6502.org/JSSim/expert.html ... l&steps=20
You'll note that the datapath control signal dpc29_0ADH17 zeroes out the top 7 bits of the high address bus for stack accesses.

OK... we can answer the questions, but it might take a little digging!

Cheers
Ed


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

All times are UTC


Who is online

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