private long?GetRelativeValue(OpcodeParameter param) { var idx = (int)param.Value + this.RelativeBase; return(GetValue(idx)); //return long.MaxValue; }
public long?GetValue(OpcodeParameter param) { if (param.Value == null) { throw new Exception("Tried to get value of 'null' OpcodeParameter!"); } switch (param.Mode) { case ParameterMode.Immediate: return(param.Value); case ParameterMode.Position: return(GetValue((int)param.Value)); case ParameterMode.Relative: return(GetRelativeValue(param)); default: throw new Exception("Unknown Opcode ParameterMode encountered!"); } }