diff --git a/Processor.cs b/Processor.cs index 189c745..e6d23b4 100644 --- a/Processor.cs +++ b/Processor.cs @@ -454,7 +454,7 @@ public bool Execute(bool runUntilHalt, Stream? stdoutOverride = null) Registers[(int)Register.rsf] &= ~(ulong)StatusFlags.Overflow; - if (result < initial) + if (result < initial && mathend != 0) { Registers[(int)Register.rsf] |= (ulong)StatusFlags.Carry; }