NESDev and Strangulation Records messageboards
Forum Index | FAQ | New User | Login | Search

Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode


SubjectIndirect indexed addressing  
Posted byRans
Posted on10/2/03 00:09 AM
From IP24.203.71.173  



Hello,

I need you guys understanding indirect indexed addressing. In the following suppose that "backg" is the label of where some name table data is included.

lda #low(backg)
sta $10
lda #high(backg)
sta $11

ldx #4
ldy #0
loop:
lda [$10],y
sta $2007
iny
bne loop
inc $11 ; This is what i don't understand
dex
bne loop

I understand that this is loading 4 chunks of 256 bytes. But the instruction i don't get is the inc $11. I know that this increments the high byte address of the data to the next 256 bytes chunk. But let's say that the address of "backg" is $82C5. When incrementing the high byte of the address, does it becomes $82C6? If yes then it's not a step of 256 bytes! If no then, what is the address after it's incremented?




SubjectRe: Indirect indexed addressing new  
Posted byMemblers
Posted on10/2/03 00:17 AM
From IP68.58.99.218  



It is incrementing the high byte, but remember that the on the 6502 the low byte is first.

So $10 is the low byte (no need to change it since Y covers that area), and $11 is the high byte, and when it's incremented the next address would be $83C5.




SubjectRe: Indirect indexed addressing new  
Posted byRans
Posted on10/2/03 00:35 AM
From IP24.203.71.173  



Which makes the step of 256 bytes. I'm still confused about something though.

The low byte of $82C5 is $82, and the high byte is $C5, right? So why when incrementing $C5, it affects $82 so that it becomes $83C5? Does it means that i should increment the low byte to get $82C6?

It's doing like the opposite i thought.




SubjectRe: Indirect indexed addressing new  
Posted byDisch
Posted on10/2/03 00:44 AM
From IP66.127.105.177  



> The low byte of $82C5 is $82, and the high byte is $C5, right

Other way around. The "high" byte is the most significant byte

$XXxx

XX = high byte
xx = low byte




SubjectRe: Indirect indexed addressing new  
Posted byRans
Posted on10/2/03 00:48 AM
From IP24.203.71.173  



Ohhhh, suddently everything is clear. Thanks!




Previous ThreadView All ThreadsNext Thread*Show in Threaded Mode
Jump to

Memblers' homepage             Contact Me

Forums powered by WWWThreads Demo