/// <summary> /// Returns a string representation of the instruction. /// </summary> /// <param name="virtualString">A boolean value that indicates all offsets and operands should be in virtual format.</param> /// <returns></returns> public string ToAsmString(bool virtualString) { string operand1 = this.operand1 == null ? "" : this.operand1.ToString(virtualString); string operand2 = this.operand2 == null ? "" : this.operand2.ToString(virtualString); string codeStr = code.ToString(); if (codeStr.Contains("%operand1%")) // special notations. { return(codeStr.Replace("%operand1%", operand1)); } else { return(code.ToString() + " " + operand1 + (operand2 == "" ? "" : ", " + operand2)); } }