Re: A83: Parenthesis
[Prev][Next][Index][Thread]
Re: A83: Parenthesis
Why would you want to store the location of the label into hl??
Nat Sith
smithrh@esper.com
>
>if you have a label, like this:
>
>label: .db 42h,47h
>
>then just "label" will mean the memoryposition of the label label:
>and "(label)" mean the information stored at label:
>
>so "ld a,(label)" loads 42h into a and "ld hl,label" loads the adress of
>label
>into hl. if you do "ld hl,(label) then you will load the _word_ stored at
>label, in this case hl will contain 4742h, because the z80 uses the reverse
>byte
>order on words..
>
>works somewhat the sam with hl reg.. just "hl" is the information in hl, and
>"(hl)" is the information stored at the memorypostion, pointet to by hl..
>
>//Olle
>
>Smiths wrote:
>>
>> Hello asm friends!
>> Something has been bugging me for a while. Why do people sometimes put
>> paranthesis around things in programs like (Highscore), but sometimes they
>> don't. In James Mathew's tutorials he said in a tutorial that he was going
>> to explain it later (I believe), but I couldn't find anything on it.
>> Can anyone help?
>>
>> Nat Sith (can anyone guess my last name???)
>> smithrh@esper.com
Follow-Ups:
References: