I talk about 65816 microprocessor. ASL, LSR, ROL, ROR, INC, and DEC do not have long absolute addressing. Can you please provide me an example of your code how they can use 24 bits address bus instead of 16 bits address bus. The only alternative option is to load data bank value into accumulator before accumulator is pushed into stack and then pull it out of stack into data bank register. This will add more code length taking more memory space than four bytes on long absolute addressing.
Bryan
Use all 24 bits address bus on shifts and rotate?
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Use all 24 bits address bus on shifts and rotate?
I've only used the '802 version, so I can't speak from experience there; but I think the need to do those things would mostly be in the current data bank, not all over the map requiring constantly changing the data bank register. For the others, you can do for example LDA_long, INA, STA_long, and since they're not needed that often, the penalty isn't much. As kc5tja used to say, you have to make the banking work for you, not against you. He's a forum member but no longer active. He was extremely knowledgeable in programming, and worked as a software engineer at one of the social-media sites (but not facebook, if I understood correctly).
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Use all 24 bits address bus on shifts and rotate?
Bryan Parkoff wrote:
I talk about 65816 microprocessor. ASL, LSR, ROL, ROR, INC, and DEC do not have long absolute addressing. Can you please provide me an example of your code how they can use 24 bits address bus instead of 16 bits address bus. The only alternative option is to load data bank value into accumulator before accumulator is pushed into stack and then pull it out of stack into data bank register. This will add more code length taking more memory space than four bytes on long absolute addressing.
Bryan
Bryan
Would this work for you?
Code: Select all
lda [dp] ;7 cycles, 2 bytes
asl a ;2 cycles, 1 byte
sta [dp] ;7 cycles, 2 bytes
Outside of that, your choice is probably limited to pushing/pulling a new data bank (as you suggest), but performing shifts/rotates on data in memory is really cycle/memory-intensive, regardless of where or how it's done. An ASL absolute will consume 8 cycles and 3 bytes all by itself, and that's in the same bank, so it's easy to see the advantage of using the accumulator for these types of things.