From 2c01d45a498d48346a25818d6f542094dd1be1a8 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 17 Mar 1988 09:24:01 +0000 Subject: [PATCH] fix in csb: must be able to handle 0 cases --- mach/ns/libem/csb.s | 2 ++ mach/ns/libem/putchar.s | 2 +- mach/ns/libem/trp.s | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mach/ns/libem/csb.s b/mach/ns/libem/csb.s index 56ed67558..881fa03f1 100644 --- a/mach/ns/libem/csb.s +++ b/mach/ns/libem/csb.s @@ -12,6 +12,8 @@ .csb: save[r2,r3] movd 4(r1), r2 !number of entries + cmpqd 0, r2 + beq 3f movd r1, r3 1: addd 8, r3 !find addres of next index diff --git a/mach/ns/libem/putchar.s b/mach/ns/libem/putchar.s index 26fa7f337..2d985de2e 100644 --- a/mach/ns/libem/putchar.s +++ b/mach/ns/libem/putchar.s @@ -15,6 +15,6 @@ addr 8(fp),tos movqd 1,tos bsr _write - asjspb -12 + adjspb -12 exit [] ret 0 diff --git a/mach/ns/libem/trp.s b/mach/ns/libem/trp.s index 7eebda5cf..b958aa428 100644 --- a/mach/ns/libem/trp.s +++ b/mach/ns/libem/trp.s @@ -22,7 +22,7 @@ movqd 0, @.trpreg jsr r1 3: - adjspd $-4 + adjspd -4 restore [r0, r1] ret 4 2: