Re: A86: ld de,hl


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

Re: A86: ld de,hl



In a message dated 97-09-27 23:49:32 EDT, you write:

> 
>  y doesnt ld de,hl work?  is it because they are 16 bit registers?  is
>  there another command that works w/o having to do ld d,h    ld e,l ?
>  one other question while i am at it if u write past FFFF in vidmem could
>  it give an error 15?  it happened to a program i wrote and i am working
>  on debuggin it.  thanx in advance
>  
>  Patrick
>  

ld doesn't work with any combinations of 16 bit registers.  The fastest way
to ld de,hl is ex de,hl, unless you need to keep hl intact, in which case,
you need to ld d,h\ld e,l.

If you write past $FFFF, it tries to write to $0000.  I was told by Pat that
my Chem program does that when I draw the menus, but I've never gotten an
error, so I'm guessing that it doesn't do anything at all... ?  Try the
following code to test it out:

ld (0000),hl
ret

if that gives an error, then you'll know...

~Steve