From 80c49a6ea758642f9d8a76c965da4ad25a3f4e47 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 19 Apr 1991 13:09:30 +0000 Subject: [PATCH] Added LOS 4 and STS 4 --- mach/m68k2/libem/los.s | 18 +++++++++++++++--- mach/m68k2/libem/sts.s | 13 ++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/mach/m68k2/libem/los.s b/mach/m68k2/libem/los.s index 84b683282..934eb0568 100644 --- a/mach/m68k2/libem/los.s +++ b/mach/m68k2/libem/los.s @@ -1,4 +1,5 @@ .define .los +.define .los4 .sect .text .sect .rom .sect .data @@ -10,6 +11,8 @@ .los: move.l (sp)+,a1 move.w (sp)+,d0 + ext.l d0 +9: move.l (sp)+,a0 cmp #1,d0 bne 1f @@ -18,11 +21,20 @@ move.w d0,-(sp) bra 3f 1: - add d0,a0 - asr #1,d0 + add.l d0,a0 + asr.l #1,d0 2: move -(a0),-(sp) - sub #1,d0 + sub.l #1,d0 bgt 2b 3: jmp (a1) + + ! d0 : # bytes + ! a0 : source address + .sect .text +.los4: + move.l (sp)+,a1 + move.l (sp)+,d0 + bra 9b +.align 2 diff --git a/mach/m68k2/libem/sts.s b/mach/m68k2/libem/sts.s index 3c1bf9176..d9223904b 100644 --- a/mach/m68k2/libem/sts.s +++ b/mach/m68k2/libem/sts.s @@ -1,4 +1,5 @@ .define .sts +.define .sts4 .sect .text .sect .rom .sect .data @@ -10,17 +11,23 @@ .sts: move.l (sp)+,a1 move.w (sp)+,d0 + ext.l d0 +9: move.l (sp)+,a0 - cmp #1,d0 + cmp.l #1,d0 bne 1f move.w (sp)+,d0 move.b d0,(a0) bra 3f 1: - asr #1,d0 + asr.l #1,d0 2: move.w (sp)+,(a0)+ - sub #1,d0 + sub.l #1,d0 bgt 2b 3: jmp (a1) +.sts4: + move.l (sp)+,a1 + move.l (sp)+,d0 + bra 9b -- 2.34.1