Re: A82: TEXT_MEM vars


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

Re: A82: TEXT_MEM vars



At 10:52 1997-11-23 -0800, you wrote:
>I am trying to use TEXT_MEM to make variables
>  EX:
>    myvar= TEXT_MEM
>    myothervar= TEXT_MEM + 1
>TASM seems to have a problem when I do this
>   ld (myvar),b
>   ld (myothervar),c
>but it has no problem with this
>   ld (myvar),a
>
>Can these variables only be loaded from certain registers?

To move data to a fixed location you have to use A as source:
	LD (nn), A

To move data from another register the location must be in HL
	LD (HL), r

There are a few other possibilities, consult a Z80 instruction list.


Regards,
                     -/- David Eriksson -/-

2 G o o D   P r o d u c t i o n s  ->  http://www.2goodsoft.com/


References: