You know what's sad? I actually don't know how to get an 8 or 16 bit accumulator with an 8 bit x and y, because I've never done it before. How do you do it?

Moderator: Moderators
I guess I'm not as clever as I thought I was...Nicole wrote:If you've ever heard people talk about how the 6502 and 65816 are better suited for structs of arrays rather than arrays of structs, this is what they were referring to.
As I understand it: WDC 65816 and Intel 8088 have a penalty for loads and stores of 16-bit registers, as do Zilog Z80 and Sharp "GBZ80" if you consider BC, DE, and HL as 16-bit registers. Motorola 68000 has a penalty for 32-bit ALU operations. 68000, Intel 80386SX, and some ARM7TDMI configurations have a penalty for 32-bit loads and stores.Espozo wrote:penalty for larger register sizes
Code: Select all
LD H, ArrayAddress >> 8
LD L, *index*
LD A, [HL]
Code: Select all
LD HL, ArrayAddress
LD A, *index*
ADD L
LD L, A
JR NC, .nc
INC H
.nc:
LD A, [HL]