Re: A89: Re: storing from d1 to a0


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

Re: A89: Re: storing from d1 to a0




>I tried it that way but for some reason it's not working for me.  The
>following code should equal the same thing, shouldn't it?
>
>  move.l #t_stat,a0
>  move.w d0,(a0)
>
>and
>
>  move.l #s1stat,a0
>  move.w d0,(a0)
>
>s1stat dc.w    0
>t_stat dc.l   s1stat,s2stat,etc.
>
>but in my program when I try the second one, it works, but if I try the
>first one, it doesn't.

OK, now it's clear:

  move.l  #t_stat,a0    ;moves address of t_stat to a0
  move.l  (a0),a0       ;gets address from table
  move.w  d0,(a0)       ;stores value

Hope this helps

Michael

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com