[A83] Re: xor (hl)


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

[A83] Re: xor (hl)




At 18:35 2001-10-15, you wrote:
>Yes, but the part what I meant was that hl can contain 2 Bytes, so my real
>question is how does a xor 2 bytes ??? (only L?, h with a and l with a??)

You don't understand.  It doesn't do anything with the contents of HL.
(hl) does not mean what is stored in register hl, it means, what is stored 
at the adress (in memory) that is stored in hl.
(called "indirect adressing" in asm-talk)
so, xor (hl) first checks what adress is stored in hl (could be maybe a 
label in your program) then looks up this _byte_ stored at this 
adress/label, and xors this value with a. the contents of HL is never changed.
everything clear now?

///Olle





References: