private bool Matches(ProcessorState state) { for (int i = 0; i < RegisterValues.Length; ++i) { Constant v = state.GetRegister(RegisterValues[i].Register); if (v == null || v == Constant.Invalid) { return(false); } if (v.ToUInt32() != RegisterValues[i].Value) { return(false); } } if (StackValues != null && StackValues.Length > 0) { for (int i = 0; i < StackValues.Length; ++i) { var c = state.GetStackValue(StackValues[i].Offset) as Constant; if (c == null || c == Constant.Invalid) { return(false); } if (c.ToUInt32() != StackValues[i].Value) { return(false); } } } return(true); }
public bool Matches(ProcessorState state) { if (state == null && ((RegisterValues != null && RegisterValues.Length > 0) || (StackValues != null && StackValues.Length > 0))) { return false; } for (int i = 0; i < RegisterValues.Length; ++i) { Constant v = state.GetRegister(RegisterValues[i].Register); if (v == null || v == Constant.Invalid) return false; if (v.ToUInt32() != RegisterValues[i].Value) return false; } if (StackValues != null && StackValues.Length > 0) { for (int i = 0; i < StackValues.Length; ++i) { var c = state.GetStackValue(StackValues[i].Offset) as Constant; if (c == null || c == Constant.Invalid) return false; if (c.ToUInt32() != StackValues[i].Value) return false; } } return true; }
private bool Matches(ProcessorState state) { for (int i = 0; i < RegisterValues.Length; ++i) { Constant v = state.GetRegister(RegisterValues[i].Register); if (v == null || v == Constant.Invalid) return false; if (v.ToUInt32() != RegisterValues[i].Value) return false; } return true; }
protected Address ReadSegmentedCodeAddress(int byteSize, ImageReader rdr, ProcessorState state) { if (byteSize == PrimitiveType.Word16.Size) { return Address.SegPtr(state.GetRegister(Registers.cs).ToUInt16(), rdr.ReadLeUInt16()); } else { ushort off = rdr.ReadLeUInt16(); ushort seg = rdr.ReadLeUInt16(); return Address.SegPtr(seg, off); } }
private bool Matches(ProcessorState state) { for (int i = 0; i < RegisterValues.Length; ++i) { Constant v = state.GetRegister(RegisterValues[i].Register); if (v == null || v == Constant.Invalid) { return(false); } if (v.ToUInt32() != RegisterValues[i].Value) { return(false); } } return(true); }