A89: storing from d1 to a0


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

A89: storing from d1 to a0



I was wondering if it was possible to store something from d1to an address pointed to by a0.  I tried doing this:
 
move.w    d1(a0)
 
after having pointed a0 to a variable earlier in the program, but it didn't work.  The reason I need this is because I am using lookup tables, and I need to store a variable located in d1 to the address pointed to by a0, as in the following:
 
 move.w scounter,d0
 rol.w #2,d0
 add.l #(t_stat),d0
 move.l d0,a0
 
 move.w d1,(a0)
 
where:
 
t_stat dc.l    stat1,stat2,stat3,etc.
 
so that if scounter equaled 0 then stat1 would equal what is in d1.  Any help would be appreciated.  Thanks.

Follow-Ups: