External and internal data width

Building your first 6502-based project? We'll help you get started here.
Post Reply
jeffythedragonslayer
Posts: 114
Joined: 03 Oct 2021

External and internal data width

Post by jeffythedragonslayer »

The Wikipedia page about the 65816 has an infobox containing this:
Quote:
Data width
8 (external)
16 (internal)
External and internal to what? Is it trying to say that memory is fetched from RAM in 8 bit chunks but registers inside the 65816 are 16 bit?
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: External and internal data width

Post by drogon »

jeffythedragonslayer wrote:
The Wikipedia page about the 65816 has an infobox containing this:
Quote:
Data width
8 (external)
16 (internal)
External and internal to what? Is it trying to say that memory is fetched from RAM in 8 bit chunks but registers inside the 65816 are 16 bit?
Essentially yes.

There are flags to run on/off the 8/16 bit access/transfer mechanisms, so it can all by 8-bit or all 16-bit or some 8 and some 16 but when reading or writing a 16-bit value from RAM, then 2 RAM accesses are needed.

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: External and internal data width

Post by GARTHWILSON »

jeffythedragonslayer, yes; in native mode, you can set the accumulator to 8 or 16 bits, and you can set the index registers to 8 or 16 bits. So if you have the accumulator set to 16 bits wide for example, and you do an LDA foobar, it will put the byte at foobar in the low 8 bits of the accumulator, and in the next cycle grab the content of foobar+1 and put that in the high 8 bits of the accumulator. INC foobar will do a 16-bit (two-byte) increment of the variable at foobar. See my article about the common misunderstandings surrounding, and the attractions of, the 65816.
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?
Post Reply