[A83] Re: IX and IY Help


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

[A83] Re: IX and IY Help




> From: <tlutz@stevens-tech.edu>
>
> 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?

IX and IY can be used with byte offsets. As example lets point IX to 8000h.
Now I can load the byte at 8002h directly into the accumulator with LD
A,(IX+2).

8000h    1Fh
8001h    23h
8002h    45h

    ld    ix,8000h    ; point IX to 8000h
    ld    a,(ix+2)    ; now A is 45h

You can also use LD A,(IX-4) for instance.





References: