From a132327a8bf5c2c31aa30728451c0ca0784e60f5 Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Fri, 26 Feb 2016 21:45:55 +1000 Subject: [PATCH] a7out: I had the spa logic wrong. Now fixed. --- tools/a7out | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/a7out b/tools/a7out index bdd64db..80fc3c7 100755 --- a/tools/a7out +++ b/tools/a7out @@ -228,7 +228,8 @@ sub special { } if ( $instruction == 0741100 ) { # spa: skip on positive AC printf( STDERR "PC %06o: spa AC %06o\n", $PC, $AC ) if ($debug); - $PC += ( $AC >= 0 ) ? 2 : 1; + # Because we are dealing with 18 bits, compare the range + $PC += ( ($AC >= 0) && ($AC < 0400000) ) ? 2 : 1; return; } if ( $instruction == 0741200 ) { # sna: skip on non-zero AC