From bcb2cb0f15c66d16b8bb72a6eb7b597ccbc97530 Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Wed, 2 Mar 2016 17:59:34 +1000 Subject: [PATCH] local changes. --- tools/as7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/as7 b/tools/as7 index 537c2f1..057e3be 100755 --- a/tools/as7 +++ b/tools/as7 @@ -50,7 +50,7 @@ usage() if ( @ARGV < 1 ); # start with the location counter at zero # predefine syscall and opcodes as variables %Var = ( - '.' => 0, + '.' => 020, '..' => 4096, # output base addr? # as.s does not have an initial symbol table @@ -183,7 +183,7 @@ foreach my $file (@ARGV) { } # Now do it all again, pass two -$Var{'.'} = 0; +$Var{'.'} = 020; $stage = 2; print("PASS 2\n") if ($debug); foreach my $file (@ARGV) { @@ -464,7 +464,7 @@ sub find_relative_label { } else { # Search backwards for first location smaller than the current one - foreach my $reflocation ( sort( { $b <=> $b } @{$locarray} ) ) { + foreach my $reflocation ( sort( { $b <=> $a } @{$locarray} ) ) { printf("backward %#o %#o\n", $reflocation, $curlocation) if ($debug); return ($reflocation) if ( $reflocation < $curlocation ); }