/// <summary> /// Initializes a new instance of the <see cref="AssemblyLine"/> class. /// </summary> private AssemblyLine(AssemblyLineType type, string value, string[] parameters, int number) { Type = type; Value = value ?? throw new ArgumentNullException(nameof(value)); Parameters = parameters ?? throw new ArgumentNullException(nameof(parameters)); Number = number; }
public AssemblyLine(string readLine, int line, int asm_type) { this.text = readLine; this.lineNumber = line; type = GetAsmType(text, asm_type); if (type == AssemblyLineType.Code) { if (asm_type == 0) { string addr_string = text.Substring(0, 4); directive = text.Substring(7); addr = int.Parse(addr_string, System.Globalization.NumberStyles.HexNumber); } else { string addr_string = text.Substring(2, 4); directive = text.Substring(19); try { addr = int.Parse(addr_string, System.Globalization.NumberStyles.HexNumber); } catch { } } } }