[A83] Re: Defined Variables


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

[A83] Re: Defined Variables




> > > ld a,7
> > > ld dat,a
> >You probaably mean:
> >  ld (dat),a
> >right...
> >
> > > dat:
> > > db. 08d
> > >
> > > Now the number that you get by lding from dat is 7 rather than 8.
> > >
> > > Hpoe it helps:
> > >
> > > -Gavin O.
> 
> No, I meant ld dat,a.  This is simplified writeback.

I don't get it...

Let's suppose "dat:" is at 9da0h (just for the sake of example...)

ld dat,a would translate to ld $9DA0,a
this would be an attempt to load the value of register "a" into a numeric 
constant ($9DA0) quite impossible. An instructioon like that isn't even
in tasm80.tab (ld *,a doesn't exist)

ld (dat),a woult translate to ld ($9DA0),a
this would load the value of register a into the memory location with 
address $9DA0 (or "dat") that's what you want to do.... so i'd definately
use ld (dat),a
       ^   ^

--Peter-Martijn






References: