From 9d97bc3cb3aecd3416fb7c4be3ca2f436665b696 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Sun, 20 Jul 1997 12:16:17 +0200 Subject: Import Dev86src-0.12.4.tar.gz --- as/Makefile | 3 ++- as/as86_encap.sh | 4 +++- as/as86_to_data | 1 + as/pops.c | 4 +++- as/typeconv.c | 4 ++++ 5 files changed, 13 insertions(+), 3 deletions(-) (limited to 'as') diff --git a/as/Makefile b/as/Makefile index 04a0d98..647d977 100644 --- a/as/Makefile +++ b/as/Makefile @@ -15,7 +15,8 @@ as86: $(OBJS) $(CC) $(LDFLAGS) $(OBJS) -o as86 as86_encap: as86_encap.sh - sed "s:%%LIBDIR%%:$(LIBDIR):" < as86_encap.sh > tmp + sed -e "s:%%LIBDIR%%:$(LIBDIR):" -e "s:%%BINDIR%%:$(BINDIR):" \ + < as86_encap.sh > tmp @mv -f tmp as86_encap chmod +x as86_encap diff --git a/as/as86_encap.sh b/as/as86_encap.sh index 5dea514..e5cf9e7 100644 --- a/as/as86_encap.sh +++ b/as/as86_encap.sh @@ -19,9 +19,11 @@ trap "rm -f _$$.* ; exit 99" 1 2 3 15 LIBDIR='%%LIBDIR%%' # Set by make install +BINDIR='%%BINDIR%%' # Set by make install # If the one set by install fails then try a couple of others. [ -x "$LIBDIR/as86" ] || LIBDIR="`dirname $0`" +[ -x "$LIBDIR/as86" ] || LIBDIR="$BINDIR" [ -x "$LIBDIR/as86" ] || LIBDIR="`dirname $0`/../lib" [ -x "$LIBDIR/as86" ] || LIBDIR=/usr/bin @@ -81,7 +83,7 @@ $LIBDIR/as86 "$@" "$IFILE" -b _$$.bin -s _$$.sym || RV=$? if(NF == 0) next; printf " "; for(i=2;i<=NF;i++) { - if( $i >= 32 && $i <= 127 && $i != 39 && $i != 92 ) + if( $i >= 32 && $i < 127 && $i != 39 && $i != 92 ) printf("\047%c\047,", $i); else printf("%3d,", $i); diff --git a/as/as86_to_data b/as/as86_to_data index ded1f0e..d53e500 100644 --- a/as/as86_to_data +++ b/as/as86_to_data @@ -22,6 +22,7 @@ trap "rm -f _$$.* ; exit 99" 1 2 3 15 LIBDIR='%%LIBDIR%%' # Set by make install +[ -d "$LIBDIR" ] || LIBDIR='%%BINDIR%%' [ -d "$LIBDIR" ] || LIBDIR=/usr/bin IFILE="$1" diff --git a/as/pops.c b/as/pops.c index a2670c8..e239892 100644 --- a/as/pops.c +++ b/as/pops.c @@ -1006,7 +1006,9 @@ PUBLIC void puse16() absexpres(); if (lastexp.data & UNDBIT) return; - if( lastexp.offset > 15 ) + if( lastexp.offset > 8000 ) + setcpu((int) lastexp.offset / 100 % 10); + else if( lastexp.offset > 15 ) setcpu((int) lastexp.offset / 100); else setcpu((int) lastexp.offset); diff --git a/as/typeconv.c b/as/typeconv.c index 6cc4a20..708d92b 100644 --- a/as/typeconv.c +++ b/as/typeconv.c @@ -156,6 +156,8 @@ unsigned count; { switch (count) { + case 0: + return 0; case 1: return buf[0] & 0xFF; case 2: @@ -174,6 +176,8 @@ unsigned count; { switch (count) { + case 0: + return 0; case 1: return buf[0] & 0xFF; case 2: -- cgit v1.2.1