moveq #-1, d0 .1 tst.b (a0)+ dbeq d0, .1 add.l d0, a0 not.l d0
move.l a0, d0 .1 tst.b (a0)+ bne .1 sub.l d0, a0 exg a0, d0 subq.l #1, d0