[A83] Re: (hl) and hl


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

[A83] Re: (hl) and hl



I still do not think they explained it well.

HL is a two byte register.  The calculator is made up of thousands of bytes, 
all pointed to by a two-byte address.  If you point HL to an address, then 
(hl) will contain the value at that address.

For example, when displaying text you will do something like:
ld hl,helloworld
call _Puts
helloworld:
.db "hello, world!",0

the ld hl,helloworld points _Puts where the text is.  however if you do the 
load again,

ld hl,helloworld

and then check the (hl), it will have 'h' in it!  [well, the number value for 
it anyway]
I hope that was a little clearer, if not, pop another email in my box.

-Joel





Follow-Ups: