From ec10a4d54902329bd07987f1606d7d0eeb61c591 Mon Sep 17 00:00:00 2001 From: edmccard Date: Sun, 25 Mar 2012 04:01:08 -0400 Subject: [PATCH] HLT halts until interrupt --- src/d6502/nmosundoc.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/d6502/nmosundoc.d b/src/d6502/nmosundoc.d index db7a245..3284cb9 100644 --- a/src/d6502/nmosundoc.d +++ b/src/d6502/nmosundoc.d @@ -32,7 +32,15 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative) super(); } - final void addrHalt() {} + final void addrHalt() + { + programCounter--; + /* TODO: check with the timer how many ticks until it would + * stop me? */ + static if (cumulative) tick(totalCycles); + else tick(); + } + final void addrImplied() { peek(programCounter);