/// <summary> /// Gets the memory location relevant to the parameter and IntOp, and sets it to value /// Setting parameters will never be in ParamMode.Position. /// </summary> /// <param name="i"> The parameter of the operation, [A, B, C] => [1, 2, 3]</param> /// <param name="o"> The operation for the ParamMode </param> /// <param name="value"> The value to set the _memory at the location </param> private void SetParamAt(int i, IntOp o, long value) { var p = GetMemoryAtLocation(_pointer + i); if (o.GetMode(i - 1).Equals(IntOp.ParamMode.Relative)) { p += _relativeBase; } _memory[p] = value; }
private long GetParam(int i, IntOp o) { return(GetValueAt(_pointer + i, o.GetMode(i - 1))); }