예제 #1
0
 //************************************************************************
 //***  FUNCTION PrintFile
 //*** ********************************************************************
 //***  DESCRIPTION  :  prints the current contents of the symbol table
 //***  INPUT ARGS   :  N/A
 //***  OUTPUT ARGS :  N/A
 //***  IN/OUT ARGS   :  N/A
 //***  RETURN :  N/A
 //************************************************************************
 public void PrintFile(StreamWriter streamWriter, Chronicler.OutputOptions outputOptions = Chronicler.OutputOptions.IGNORE)
 {
     streamWriter.WriteLine("Symbol\tRFlag\tValue \tMFlag \tIFlag", outputOptions);
     streamWriter.WriteLine("=====================================", outputOptions);
     foreach (KeyValuePair <string, Globals.Symbol> keyValuePair in SymbolTableBST)
     {
         keyValuePair.Value.Print(outputOptions, streamWriter);
     }
 }
예제 #2
0
 //************************************************************************
 //***  FUNCTION Print
 //*** ********************************************************************
 //***  DESCRIPTION  :  prints the current contents of the symbol
 //***  INPUT ARGS   :  N/A
 //***  OUTPUT ARGS :  N/A
 //***  IN/OUT ARGS   :  N/A
 //***  RETURN :  N/A
 //************************************************************************
 public void Print(Chronicler.OutputOptions outputOptions, StreamWriter streamWriter = null)
 {
     if (streamWriter == null)
     {
         Chronicler.WriteLine(label + "\t" + RFlag + "\t" + value.ToString("X6") + "\t" + MFlag + "\t" + IFlag, outputOptions);
     }
     else
     {
         streamWriter.WriteLine(label + "\t" + RFlag + "\t" + value.ToString("X6") + "\t" + MFlag + "\t" + IFlag, outputOptions);
     }
 }
예제 #3
0
        //************************************************************************
        //***  FUNCTION PrintTable
        //*** ********************************************************************
        //***  DESCRIPTION  :  prints the current contents of the literal table
        //***  INPUT ARGS   :  N/A
        //***  OUTPUT ARGS :  N/A
        //***  IN/OUT ARGS   :  N/A
        //***  RETURN :  N/A
        //************************************************************************
        public void PrintTable(Chronicler.OutputOptions outputOptions = Chronicler.OutputOptions.IGNORE)
        {
            Chronicler.WriteLine("NAME\t\tVALUE\t\tLENGTH\tADDRESS", outputOptions);
            Chronicler.WriteLine("===============================================", outputOptions);
            StringBuilder sb = new StringBuilder("");

            foreach (LiteralValue lv in literalTable)
            {
                sb.Clear();
                for (int x = 0; x < (16 - lv.label.Length); x++)
                {
                    sb.Append(" ");
                }
                Chronicler.Write(lv.label + sb.ToString(), outputOptions);
                sb.Clear();
                for (int x = 0; x < (16 - lv.hexValue.Length); x++)
                {
                    sb.Append(" ");
                }
                Chronicler.Write(lv.hexValue + sb.ToString(), outputOptions);
                Chronicler.Write(lv.Length.ToString(), outputOptions);
                Chronicler.WriteLine("\t" + lv.address.ToString("X6"), outputOptions);
            }
        }