private void GetPCode() { Address.Clear(); Programs.Clear(); for (int i = 0; i < CodeSeg.Count; ++i) { Translate(CodeSeg[i], i); } foreach (var i in Programs) { if (i.INS == PCode.JMP || i.INS == PCode.JPC) { try { i.Arg = CodeSeg[i.Arg].Start; } catch (Exception) { } } } Programs[Programs.Count - 1] = new PNode(PCode.HALT); }
private void Add(PNode node) { Programs.Add(node); }