From 441fe12b0acee6cf053c2a10df578be10723c52a Mon Sep 17 00:00:00 2001 From: Warren Toomey Date: Thu, 24 Mar 2016 08:57:51 +1000 Subject: [PATCH] Fall into single-step mode if we see a low memory write. --- tools/a7out | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/a7out b/tools/a7out index 54ddec4..246e817 100755 --- a/tools/a7out +++ b/tools/a7out @@ -354,7 +354,13 @@ sub lac { sub dac { my ( $instruction, $addr, $indaddr ) = @_; dprintf( "dac AC (value %06o) into %s\n", $AC, addr($indaddr) ); - dprintf("(****WRITE TO LOW MEMORY****)\n") if ($indaddr < 010000 && !($indaddr >= 010 && $indaddr <= 020) ) ; + + # Catch writes below the process' memory range + if ($indaddr < 010000 && !($indaddr >= 010 && $indaddr <= 020) ) { + $singlestep = 1; + dprintf("(****WRITE TO LOW MEMORY****)\n"); + dprintf( "break at PC %s\n", addr($PC) ); + } $Mem[$indaddr] = $AC; $PC++; }