Re: A86: Instruction set question?


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

Re: A86: Instruction set question?



Joshua Grams writes:

> 
>  >Is this possible:
>  >
>  >ld hl,(hl)
>  
>  Not that I know of. You can load 16-bit registers from a fixed address,
but
>  as far as I know, you can't do it from a register pointer address. But I
>  could be wrong (Heck, I only got this calculator 3 days ago, and I've
never
>  owned a TI calculator before).
>  
>  >Also when I load a label to hl:
>  >
>  >ld hl,Label
>  >
>  >Label:
>  >	.db 3
>  >	.db 48,0
>  >
>  >The actual value os HL is $XXXX for some address, right?
>  >Does (HL) equal 3?
>  Yes. HL is the address of Label, and (HL) is the byte at the address in HL
>  (i.e. 3)
>  
>  >Thanks for answering my stupid questions,
>  Hey, you've got to start somewhere...
>  
>  --Joshua Grams
>  

There is no instruction to load (hl) into hl, partly because (hl) is usually
a byte, but you can use

ld e,(hl)
inc hl
ld d,(hl)
ex de,hl

~Stephen Hicks


Follow-Ups: