6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Jun 08, 2024 11:16 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Jun 14, 2009 4:17 am 
Offline

Joined: Tue Dec 25, 2007 4:57 am
Posts: 109
I reviewed 65816 programming manual. It does say both program counter bank register and 16-bit program counter register can be stored in effective address. Sixteen bit program counter register is always wrapped back to $0000 from $FFFF, but it cannot increment program counter bank register. Only long JMP and JSR are used if you want your code to cross between bank boundaries. Correct?

What about data bank register and absolute address to be stored in effective address? If $00/FFFF is incremented, then $FFFF on absolute address is wrapped back to $0000 ***AND*** data bank register is incremented once.

For example:

00/2000: LDA $FFFF // 16-bit mode is turned on

Low byte of accumulator will be loaded from $00/FFFF and high byte of accumulator will be loaded from $01/0000. It does the same with absolute indexed X/Y address when it can be indexed across bank boundary. (I do not talk about long absolute address and long absolute indexed X/Y address.)


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 15, 2009 1:58 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8201
Location: Midwestern USA
Bryan Parkoff wrote:
I reviewed 65816 programming manual. It does say both program counter bank register and 16-bit program counter register can be stored in effective address. Sixteen bit program counter register is always wrapped back to $0000 from $FFFF, but it cannot increment program counter bank register. Only long JMP and JSR are used if you want your code to cross between bank boundaries. Correct?

That's correct.
Bryan Parkoff wrote:
What about data bank register and absolute address to be stored in effective address? If $00/FFFF is incremented, then $FFFF on absolute address is wrapped back to $0000 ***AND*** data bank register is incremented once.

For example:

00/2000: LDA $FFFF // 16-bit mode is turned on

Low byte of accumulator will be loaded from $00/FFFF and high byte of accumulator will be loaded from $01/0000. It does the same with absolute indexed X/Y address when it can be indexed across bank boundary. (I do not talk about long absolute address and long absolute indexed X/Y address.)

You're not making any sense, to me at any rate. :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jun 15, 2009 10:34 pm 
Offline

Joined: Tue Dec 25, 2007 4:57 am
Posts: 109
You said not making sense about data bank. Please test yourself. You will see the data and understand what I meant.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jun 16, 2009 7:03 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10822
Location: England
Hi Bryan
I'm struggling to understand your English, so sorry if I misunderstand.

I think you're saying that accesses which use the program bank will never cross bank boundaries, but accesses which use the data bank can cross bank boundaries, in some addressing modes. Is that what you're saying?

Are you only seeking confirmation of that, or do you have an additional comment or question?

Reading the most recent datasheet, I see there's a tabulation of bus activity in each cycle for several cases - I hadn't noticed that before. It's a good idea to use the most up to date datasheet.

Cheers
Ed


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: Google [Bot] and 19 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: