1985-02-07 22:06:32 +00:00
|
|
|
.define .exg
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
|
|
|
.sect .rom
|
|
|
|
.sect .data
|
|
|
|
.sect .bss
|
1985-02-07 22:06:32 +00:00
|
|
|
|
|
|
|
! d0 : exchange size in bytes
|
1986-07-22 13:37:16 +00:00
|
|
|
.sect .text
|
1985-02-07 22:06:32 +00:00
|
|
|
.exg:
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l (sp)+,d2
|
1985-02-07 22:06:32 +00:00
|
|
|
move.l sp,a1
|
|
|
|
sub.l d0,sp
|
|
|
|
move.l sp,a2
|
|
|
|
asr #1,d0
|
|
|
|
move.l d0,d1
|
|
|
|
1:
|
|
|
|
move.l (a1)+,(a2)+
|
|
|
|
sub #1,d0
|
|
|
|
bgt 1b
|
|
|
|
move.l sp,a1
|
|
|
|
asr #1,d1
|
|
|
|
1:
|
|
|
|
move.l (a1)+,(a2)+
|
|
|
|
sub #1,d1
|
|
|
|
bgt 1b
|
|
|
|
move.l a1,sp
|
1986-07-22 13:37:16 +00:00
|
|
|
move.l d2,-(sp)
|
1985-02-07 22:06:32 +00:00
|
|
|
rts
|