public void NOP() { ResultInfo op_result = _opService.NOP(); Assert.AreEqual(1, op_result.Cycles); Assert.AreEqual(1, op_result.PCIncrement); }
private void WriteToMemory(ResultInfo result) { if (result.JumpAddress != null) { _operationHelpers.SetJumpAddress((int)result.JumpAddress); } if (result.ClearISR) { _memory.IsISR = false; } if (result.OverflowInfo != null && result.OperationResults.Count == 1) { result.OperationResults[0].Value = _operationHelpers.Check_DC_C(result.OverflowInfo, result.OperationResults[0].Value); } if (result.CheckZ && result.OperationResults.Count == 1) { //Result is never null in this case _operationHelpers.CheckZ((int)result.OperationResults[0].Value); } if (result.Cycles != null) { _operationHelpers.UpdateCycles((int)result.Cycles); } if (result.OperationResults != null) { _operationHelpers.WriteOperationResults(result.OperationResults); } if (result.PCIncrement != null) { _operationHelpers.ChangePC_Fetch((int)result.PCIncrement); } if (result.BeginLoop) { BeginLoop(); _srcModel[_memory.RAM.PCWithoutClear].IsExecuted = false; WriteToMemory(_byteOperations.NOP()); } }