> 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".

>         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...

Joachim

Reply via email to