Re: A86: ASM: Explaining HL
[Prev][Next][Index][Thread]
Re: A86: ASM: Explaining HL
Radojcsics@aol.com wrote:
>
> I know you have probably had a million and 1 of these, but for the life of me
> i cant quite grasp the concept of how HL works. I know its a flag and all,
> but could anyone explain it to me in regards to BASIC, instead of memory?(An
> example always helps)
hl isnt a flag, its a 16-bit register pair used in operations
ex:
you can load a 16 bit number into it
ld hl,$2342
or a string
ld hl,(string)
string:
.db "string",0
you can also use h and l alone
ld h,$23
ld l,$45
this way hl would be a 16 bit number when used together, but an 8bit
number when used alone
References: