From 729774d6f85b99e9f4310e82a5a9bea2cf56e6e6 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 22 Jul 1986 14:49:46 +0000 Subject: [PATCH] *** empty log message *** --- mach/m68k4/libem/ara.s | 37 ++++++++++++++++++------------------- mach/m68k4/libem/printf.s | 7 +++++-- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/mach/m68k4/libem/ara.s b/mach/m68k4/libem/ara.s index 2f391a2a2..bc90ea2a1 100644 --- a/mach/m68k4/libem/ara.s +++ b/mach/m68k4/libem/ara.s @@ -12,26 +12,25 @@ ! a1 : base address .sect .text .aar: - move.l (sp)+,d2 ! return address - move.l (sp)+,a0 ! descriptor address - move.l (sp)+,d0 ! index - move.l (sp)+,a1 ! base address + move.l 4(sp),a0 ! descriptor address + move.l 8(sp),d0 ! index + move.l 12(sp),a1 ! base address sub.l (a0),d0 ! index - lower bound : relative index move.l 8(a0),-(sp) ! # bytes / element move.l d0,-(sp) jsr .mlu add.l d1,a1 ! address of element + move.l (sp)+,a0 ! return address + add.l #12,sp ! pop arguments move.l a1,-(sp) ! returned on stack - move.l d2,-(sp) - rts + jmp (a0) .lar: ! register usage: like .aar - move.l (sp)+,d2 ! return address - move.l (sp)+,a0 - move.l (sp)+,d0 - move.l (sp)+,a1 + move.l 4(sp),a0 + move.l 8(sp),d0 + move.l 12(sp),a1 sub.l (a0),d0 move.l d0,-(sp) move.l 8(a0),d0 @@ -39,6 +38,8 @@ jsr .mlu add.l d1,a1 ! address of element add.l 8(a0),a1 ! a1++ because of predecrement + move.l (sp)+,a0 ! return address + add.l #12,sp ! pop parameters clr.l d1 !?nodig? asr #1,d0 bne 3f @@ -57,23 +58,22 @@ move.l -(a1),-(sp) ! 4n byte element (n = 1,2,...) dbf d0,1b 5: - move.l d2,-(sp) - rts - + jmp (a0) .sar: !register usage: same as lar - move.l (sp)+,d2 - move.l (sp)+,a0 - move.l (sp)+,d0 - move.l (sp)+,a1 + move.l 4(sp),a0 + move.l 8(sp),d0 + move.l 12(sp),a1 sub.l (a0),d0 move.l d0,-(sp) move.l 8(a0),d0 ! # bytes / element move.l d0,-(sp) jsr .mlu add.l d1,a1 + move.l (sp)+,a0 ! return address + add.l #12,sp ! pop parameters clr.l d1 !?nodig? asr #1,d0 bne 3f @@ -92,7 +92,6 @@ move.l (sp)+,(a1)+ ! 4n byte element (n = 1,2,...) dbf d0,1b 4: - move.l d2,-(sp) - rts + jmp (a0) .align 2 diff --git a/mach/m68k4/libem/printf.s b/mach/m68k4/libem/printf.s index 9de6290ad..16826c040 100644 --- a/mach/m68k4/libem/printf.s +++ b/mach/m68k4/libem/printf.s @@ -1,11 +1,14 @@ -.sect .text;.sect .rom;.sect .data;.sect .bss .define _printn .define _printf .extern _printf +.sect .text;.sect .rom;.sect .data;.sect .bss .sect .text _putchar: move.l #1,-(sp) -pea 9(sp) +lea 8(sp),a0 +move.l 8(sp),d0 +move.b d0,(a0) +move.l a0,-(sp) move.l #1,-(sp) jsr _write add.l #12,sp -- 2.34.1