[A83] IX and IY Help


[Prev][Next][Index][Thread]

[A83] IX and IY Help




To my understanding, the following routines

ld a,8
ld (hl),a
ld (de),a

will load the value 8 into the byte at location hl and de....

I have heard that IX and IY can use offsets. I have no clue how to use them 
yet. Maybe someone could help me out a little bit. Can IX read a byte but not 
inside a byte boundary?? And write to it too?

First Byte  Second Byte
00110101    11101011

ld IX,(memory address of first byte + 2 bit offset)
ld a,(IX)

Now the accumulator should contain 11010111b??

and 00001111b
ld (IX),a

Is this what the two bytes look like now?

First Byte   Second Byte
00000001     11101011

I realize the syntax is incorrect probably....

Thanks in advance for your help!

-Tom Lutz




Follow-Ups: