public override void ExitMemoryCmpFunction(sim6502Parser.MemoryCmpFunctionContext context) { var source = GetIntValue(context.sourceAddress()); var target = GetIntValue(context.targetAddress()); var size = GetIntValue(context.memorySize()); var mc = new MemoryCompare(Proc); var cmp = mc.MemoryCmp(source, target, size); if (!cmp.ComparisonPassed) { FailAssertion(cmp.FailureMessage); } SetBoolValue(context, cmp.ComparisonPassed); }
public override void ExitMemoryChkFunction(sim6502Parser.MemoryChkFunctionContext context) { var source = GetIntValue(context.sourceAddress()); var size = GetIntValue(context.memorySize()); var value = GetIntValue(context.memoryValue()); var mc = new MemoryCompare(Proc); var chk = mc.MemoryChk(source, size, value); if (!chk.ComparisonPassed) { FailAssertion(chk.FailureMessage); } SetBoolValue(context, chk.ComparisonPassed); }