Joachim Van der Auwera makes some magical things to make me read
} > Also, if you do not mind, another (tricker ?) question:
} >
} > harpo equ $160
} > chico equ $140
} > elem_size equ $0c
} >
} >         clr.l a1     ; (just to fixe a1 to 0 for the question,
} 
} If I remember correctly, you can't do this. You either use "movel.l #0,a1"
} (which takes 6 bytes) or better (only 2 bytes) "sub.l a1,a1".

As I tried to comment it beforehand, it was only to fix the value for the
discussion (in reality, a1 is a any value just mark the beginning of a
structure in which the code want to look at the data of offset harpo first)
} 
} >         moveq.l #4,d2
} >         lea harpo(a1),a1
} > myloop:
} >         ...            ; use a1 but keep it
} >         adda.w elem_size,a1
} >         ...            ; use a1 but keep it
} >         dbra d2,myloop
} >         lea chico-4*elem_size(a1),a1
} >
} > Question: what is the value of a1 at the end ?
} 
} I think harpo+chico+elem_size, though I am not sure whether the loop is
} executed 4 or five times...

Oh.. now you make me have more doubts ;->
I will have to check dbra too, but that should be easier!
(Is-it 'Test/decrement/loop if not null' or 'decrement/test/loop...'
 hopefully it's all in the doc somewhere at home!)

I was thinking of "harpo+chico" as the ending value.

Reply via email to