static void Main(string[] args) { bool tf = false; AssembledProgram ap; List <string> fl = new List <string>(); foreach (string s in args) { if (s == "/t" || s == "/trace") { tf = true; } else { fl.Add(s); } } ArmAssembler arms = new ArmAssembler(fl); arms.TraceParse = tf; arms.PerformPass(); if (AssemblerErrors.ErrorReports.Count == 0) { arms.DumpInfo(); arms.PlaceCode(); ap = new AssembledProgram(arms.pcs.LoadPoint, arms.pcs.Length); arms.PerformPass(ap); } arms.DumpInfo(); }
// perform pass 2 over all the source files public void PerformPass(AssembledProgram assp) { this.ap = assp; pass = 2; ap.TextStart = pcs.TextStart; ap.DataStart = pcs.DataStart; ap.BssStart = pcs.BssStart; ap.DataEnd = pcs.DataEnd; for (int i = 0; i < fileList.Count; i++) { processFile(i); } passComplete[2] = true; //Debug.WriteLine(String.Format( // "{0} errors detected in pass 2", AssemblerErrors.ErrorReports.Count)); //ap.TextStart = pcs.TextStart; //ap.DataStart = pcs.DataStart; //ap.BssStart = pcs.BssStart; //ap.DataEnd = pcs.DataEnd; }