lea (4,sp,d0), a0 ! address of bottom block
lea (4,sp), a1 ! address of top block
asr.l #2, d0
- sub.l #1, d0
1:
move.l (a1), d1
move.l (a0), (a1)+
move.l d1, (a0)+
- dbf d0, 1b
+ sub.l #1, d0
+ bne 1b
rts
.align 2
add.l d0, a1 ! address of 4n byte element
add.l d1, a1 ! because of predecrement
asr.l #2, d1
- sub.l #1, d1
move.l (sp)+,a0
1:
move.l -(a1), -(sp)
- dbf d1, 1b
+ sub.l #1, d1
+ bne 1b
jmp (a0)
.align 2
2:
add.l d0, a0 !>=4 bytes
asr.l #2, d0
- sub.l #1, d0
4: move.l -(a0), -(sp)
- dbf d0, 4b
+ sub.l #1, d0
+ bne 4b
3:
jmp (a1)
.align 2
muls.l d1, d0
add.l d0, a1 ! address of 4n byte element
asr.l #2, d1
- sub.l #1, d1
move.l (sp)+,a0
1:
move.l (sp)+, (a1)+
- dbf d1, 1b
+ sub.l #1, d1
+ bne 1b
jmp (a0)
.align 2
move.l d2, a1
move.l d1, d2
asr.l #2, d2
- sub.l #1, d2
1:
clr.l -(sp)
- dbf d2, 1b
+ sub.l #1, d2
+ bne 1b
move.l d0, d2
asr.l #3, d2 ! offset from sp in bytes
bra 4f
2:
asr.l #2, d0
- sub.l #1, d0
3:
move.l (sp)+, (a0)+
- dbf d0, 3b
+ sub.l #1, d0
+ bne 3b
4:
jmp (a1) ! return
.align 2