summaryrefslogtreecommitdiff
path: root/as
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>1997-07-20 12:16:17 +0200
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:39:55 +0200
commit9d97bc3cb3aecd3416fb7c4be3ca2f436665b696 (patch)
treeb1e5b67ef9e065efb6a4c9977ecfac8dedbad39b /as
parente63c244cb22bf48ca1d2695784a072269d19ea96 (diff)
downloaddev86-9d97bc3cb3aecd3416fb7c4be3ca2f436665b696.tar.gz
Import Dev86src-0.12.4.tar.gzv0.12.4
Diffstat (limited to 'as')
-rw-r--r--as/Makefile3
-rw-r--r--as/as86_encap.sh4
-rw-r--r--as/as86_to_data1
-rw-r--r--as/pops.c4
-rw-r--r--as/typeconv.c4
5 files changed, 13 insertions, 3 deletions
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: