diff --git a/SourceGen/DisasmProject.cs b/SourceGen/DisasmProject.cs
index 82c645a..e902e3d 100644
--- a/SourceGen/DisasmProject.cs
+++ b/SourceGen/DisasmProject.cs
@@ -1541,8 +1541,8 @@ namespace SourceGen {
// - ascending label
ActiveDefSymbolList.Sort(delegate (DefSymbol a, DefSymbol b) {
// Put constants first.
- int ca = (a.SymbolType == Symbol.Type.Constant) ? 1 : 0;
- int cb = (b.SymbolType == Symbol.Type.Constant) ? 1 : 0;
+ int ca = (a.IsConstant) ? 1 : 0;
+ int cb = (b.IsConstant) ? 1 : 0;
if (ca != cb) {
return cb - ca;
}
diff --git a/SourceGen/FormatDescriptor.cs b/SourceGen/FormatDescriptor.cs
index c541981..07ddfaa 100644
--- a/SourceGen/FormatDescriptor.cs
+++ b/SourceGen/FormatDescriptor.cs
@@ -426,10 +426,13 @@ namespace SourceGen {
///
/// Generates a string describing the format, suitable for use in the UI.
///
- public string ToUiString() {
+ public string ToUiString(bool showBytes = true) {
// NOTE: this should be made easier to localize
- string retstr = Length + "-byte ";
+ string retstr = string.Empty;
+ if (showBytes) {
+ retstr = Length + "-byte ";
+ }
if (IsString) {
switch (FormatSubType) {
@@ -480,19 +483,19 @@ namespace SourceGen {
switch (FormatType) {
case Type.Default:
case Type.NumericLE:
- retstr += "Numeric (little-endian)";
+ retstr += "numeric (little-endian)";
break;
case Type.NumericBE:
- retstr += "Numeric (big-endian)";
+ retstr += "numeric (big-endian)";
break;
case Type.Dense:
- retstr += "Dense";
+ retstr += "dense";
break;
case Type.Fill:
- retstr += "Fill";
+ retstr += "fill";
break;
case Type.Junk:
- retstr += "Unaligned junk";
+ retstr += "unaligned junk";
break;
default:
// strings handled earlier
@@ -501,35 +504,35 @@ namespace SourceGen {
}
break;
case SubType.Hex:
- retstr += "Numeric, Hex";
+ retstr += "numeric, Hex";
break;
case SubType.Decimal:
- retstr += "Numeric, Decimal";
+ retstr += "numeric, Decimal";
break;
case SubType.Binary:
- retstr += "Numeric, Binary";
+ retstr += "numeric, Binary";
break;
case SubType.Address:
- retstr += "Address";
+ retstr += "address";
break;
case SubType.Symbol:
if (SymbolRef.IsVariable) {
- retstr += "Local var \"" + SymbolRef.Label + "\"";
+ retstr += "local var \"" + SymbolRef.Label + "\"";
} else {
- retstr += "Symbol \"" + SymbolRef.Label + "\"";
+ retstr += "symbol \"" + SymbolRef.Label + "\"";
}
break;
case SubType.Ascii:
- retstr += "Numeric, ASCII";
+ retstr += "numeric, ASCII";
break;
case SubType.HighAscii:
- retstr += "Numeric, ASCII (high)";
+ retstr += "numeric, ASCII (high)";
break;
case SubType.C64Petscii:
- retstr += "Numeric, C64 PETSCII";
+ retstr += "numeric, C64 PETSCII";
break;
case SubType.C64Screen:
- retstr += "Numeric, C64 Screen";
+ retstr += "numeric, C64 Screen";
break;
case SubType.Align2:
case SubType.Align4:
@@ -547,7 +550,7 @@ namespace SourceGen {
case SubType.Align16384:
case SubType.Align32768:
case SubType.Align65536:
- retstr += "Alignment to " + (1 << AlignmentToPower(FormatSubType));
+ retstr += "alignment to " + (1 << AlignmentToPower(FormatSubType));
break;
default:
diff --git a/SourceGen/LocalVariableTable.cs b/SourceGen/LocalVariableTable.cs
index dbec864..7ca1510 100644
--- a/SourceGen/LocalVariableTable.cs
+++ b/SourceGen/LocalVariableTable.cs
@@ -187,8 +187,7 @@ namespace SourceGen {
///
/// Symbol to add.
public void AddOrReplace(DefSymbol newSym) {
- if (newSym.SymbolType != Symbol.Type.Constant &&
- newSym.SymbolType != Symbol.Type.ExternalAddr) {
+ if (!newSym.IsConstant && newSym.SymbolType != Symbol.Type.ExternalAddr) {
Debug.Assert(false, "Unexpected symbol type " + newSym.SymbolType);
return;
}
diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs
index 1ea7349..f08c009 100644
--- a/SourceGen/MainController.cs
+++ b/SourceGen/MainController.cs
@@ -28,6 +28,7 @@ using CommonUtil;
using CommonWPF;
using SourceGen.Sandbox;
using SourceGen.WpfGui;
+using System.Windows.Media;
namespace SourceGen {
///
@@ -3421,29 +3422,19 @@ namespace SourceGen {
#region Info panel
private void UpdateInfoPanel() {
+ mMainWin.ClearInfoPanel();
if (mMainWin.CodeListView_GetSelectionCount() != 1) {
// Nothing selected, or multiple lines selected.
- mMainWin.InfoPanelContents = string.Empty;
return;
}
int lineIndex = mMainWin.CodeListView_GetFirstSelectedIndex();
LineListGen.Line line = CodeLineList[lineIndex];
- StringBuilder sb = new StringBuilder(250);
// TODO(someday): this should be made easier to localize
- string lineTypeStr;
- string extraStr = string.Empty;
+ string lineTypeStr = null;
+ bool isSimple = true;
+ DefSymbol defSym = null;
switch (line.LineType) {
- case LineListGen.Line.Type.Code:
- lineTypeStr = "code";
- break;
- case LineListGen.Line.Type.Data:
- if (mProject.GetAnattrib(line.FileOffset).IsInlineData) {
- lineTypeStr = "inline data";
- } else {
- lineTypeStr = "data";
- }
- break;
case LineListGen.Line.Type.LongComment:
lineTypeStr = "comment";
break;
@@ -3452,8 +3443,6 @@ namespace SourceGen {
break;
case LineListGen.Line.Type.Blank:
lineTypeStr = "blank line";
- //lineTypeStr = "blank line (+" +
- // mOutputFormatter.FormatOffset24(line.FileOffset) + ")";
break;
case LineListGen.Line.Type.OrgDirective:
lineTypeStr = "address directive";
@@ -3461,36 +3450,33 @@ namespace SourceGen {
case LineListGen.Line.Type.RegWidthDirective:
lineTypeStr = "register width directive";
break;
- case LineListGen.Line.Type.EquDirective: {
- lineTypeStr = "equate";
- int symIndex = LineListGen.DefSymIndexFromOffset(line.FileOffset);
- DefSymbol defSym = mProject.ActiveDefSymbolList[symIndex];
- string sourceStr;
- if (defSym.SymbolSource == Symbol.Source.Project) {
- sourceStr = "project symbol definition";
- } else if (defSym.SymbolSource == Symbol.Source.Platform) {
- sourceStr = "platform symbol file (#" + defSym.LoadOrdinal +
- ":" + defSym.FileIdentifier + ")";
- if (!string.IsNullOrEmpty(defSym.Tag)) {
- sourceStr += ", tag=" + defSym.Tag;
- }
- } else {
- sourceStr = "???";
- }
- extraStr = "Source: " + sourceStr;
- if (defSym.SymbolType == Symbol.Type.Constant) {
- extraStr += " (constant)";
- } else {
- extraStr += " (address)";
- }
+
+ case LineListGen.Line.Type.LocalVariableTable:
+ isSimple = false;
+ lineTypeStr = "variable table";
+ break;
+ case LineListGen.Line.Type.Code:
+ isSimple = false;
+ lineTypeStr = "code";
+ break;
+ case LineListGen.Line.Type.Data:
+ isSimple = false;
+ if (mProject.GetAnattrib(line.FileOffset).IsInlineData) {
+ lineTypeStr = "inline data";
+ } else {
+ lineTypeStr = "data";
}
break;
- case LineListGen.Line.Type.LocalVariableTable:
- lineTypeStr = "variable table";
- if (mProject.LvTables.TryGetValue(line.FileOffset,
- out LocalVariableTable lvt)) {
- extraStr = string.Format("{0} entries, clear-previous={1}",
- lvt.Count, lvt.ClearPrevious);
+ case LineListGen.Line.Type.EquDirective:
+ isSimple = false;
+ int defSymIndex = LineListGen.DefSymIndexFromOffset(line.FileOffset);
+ defSym = mProject.ActiveDefSymbolList[defSymIndex];
+ if (defSym.SymbolSource == Symbol.Source.Project) {
+ lineTypeStr = "project symbol equate";
+ } else if (defSym.SymbolSource == Symbol.Source.Platform) {
+ lineTypeStr = "platform symbol equate";
+ } else {
+ lineTypeStr = "???";
}
break;
default:
@@ -3498,63 +3484,137 @@ namespace SourceGen {
break;
}
- // For anything that isn't code or data, show something simple and bail.
- if (line.OffsetSpan == 0) {
- sb.AppendFormat(Res.Strings.INFO_LINE_SUM_NON_FMT,
- lineIndex, lineTypeStr);
-#if DEBUG
- sb.Append(" [offset=+" + line.FileOffset.ToString("x6") + "]");
-#endif
- if (!string.IsNullOrEmpty(extraStr)) {
- sb.Append("\r\n\r\n");
- sb.Append(extraStr);
+ if (line.IsCodeOrData) {
+ // Show number of bytes of code/data.
+ if (line.OffsetSpan == 1) {
+ mMainWin.InfoLineDescrText = string.Format(Res.Strings.INFO_LINE_SUM_SINGULAR_FMT,
+ lineIndex, line.OffsetSpan, lineTypeStr);
+ } else {
+ mMainWin.InfoLineDescrText = string.Format(Res.Strings.INFO_LINE_SUM_PLURAL_FMT,
+ lineIndex, line.OffsetSpan, lineTypeStr);
}
- mMainWin.InfoPanelContents = sb.ToString();
+ } else {
+ mMainWin.InfoLineDescrText = string.Format(Res.Strings.INFO_LINE_SUM_NON_FMT,
+ lineIndex, lineTypeStr);
+ }
+
+#if DEBUG
+ mMainWin.InfoOffsetText = ("[offset=+" + line.FileOffset.ToString("x6") + "]");
+#endif
+ if (isSimple) {
return;
}
- Debug.Assert(line.IsCodeOrData);
- Anattrib attr = mProject.GetAnattrib(line.FileOffset);
-
- // Show number of bytes of code/data.
- if (line.OffsetSpan == 1) {
- sb.AppendFormat(Res.Strings.INFO_LINE_SUM_SINGULAR_FMT,
- lineIndex, line.OffsetSpan, lineTypeStr);
- } else {
- sb.AppendFormat(Res.Strings.INFO_LINE_SUM_PLURAL_FMT,
- lineIndex, line.OffsetSpan, lineTypeStr);
+ if (line.LineType == LineListGen.Line.Type.LocalVariableTable) {
+ string str = string.Empty;
+ if (mProject.LvTables.TryGetValue(line.FileOffset,
+ out LocalVariableTable lvt)) {
+ str = lvt.Count + " entries";
+ if (lvt.ClearPrevious) {
+ str += "; clear previous";
+ }
+ }
+ mMainWin.InfoPanelDetail1 = str;
+ return;
}
- sb.Append("\r\n");
+
+ if (line.LineType == LineListGen.Line.Type.EquDirective) {
+ StringBuilder esb = new StringBuilder();
+ //esb.Append("\u25b6 ");
+ esb.Append("\u2022 ");
+ if (defSym.IsConstant) {
+ esb.Append("Constant");
+ } else {
+ esb.Append("External address");
+ if (defSym.HasWidth) {
+ esb.Append(", width=");
+ esb.Append(defSym.DataDescriptor.Length);
+ }
+ }
+ if (defSym.Direction != DefSymbol.DirectionFlags.ReadWrite) {
+ esb.Append("\r\nI/O direction: ");
+ esb.Append(defSym.Direction);
+ }
+ if (defSym.MultiMask != null) {
+ esb.Append("\r\nMulti-mask:");
+ int i = 23;
+ if ((defSym.MultiMask.AddressMask | defSym.MultiMask.CompareMask |
+ defSym.MultiMask.CompareValue) < 0x10000) {
+ i = 15;
+ }
+ for ( ; i >= 0; i--) {
+ if ((i & 3) == 3) {
+ esb.Append(' ');
+ }
+ int bit = 1 << i;
+ if ((defSym.MultiMask.AddressMask & bit) != 0) {
+ esb.Append('x');
+ } else if ((defSym.MultiMask.CompareMask & bit) != 0) {
+ if ((defSym.MultiMask.CompareValue & bit) != 0) {
+ esb.Append('1');
+ } else {
+ esb.Append('0');
+ }
+ } else {
+ esb.Append('?');
+ }
+ }
+ }
+ if (defSym.SymbolSource == Symbol.Source.Platform) {
+ esb.Append("\r\n\r\nSource file # ");
+ esb.Append(defSym.LoadOrdinal);
+ esb.Append(": ");
+ esb.Append(defSym.FileIdentifier);
+
+ if (!string.IsNullOrEmpty(defSym.Tag)) {
+ esb.Append(", tag=");
+ esb.Append(defSym.Tag);
+ }
+ }
+ mMainWin.InfoPanelDetail1 = esb.ToString();
+ return;
+ }
+
+
+ //
+ // Handle code/data items. In particular, the format descriptor.
+ //
+ Debug.Assert(line.IsCodeOrData);
+ bool isCode = (line.LineType == LineListGen.Line.Type.Code);
+
+ StringBuilder sb = new StringBuilder(250);
+ Anattrib attr = mProject.GetAnattrib(line.FileOffset);
if (!mProject.OperandFormats.TryGetValue(line.FileOffset, out FormatDescriptor dfd)) {
// No user-specified format, but there may be a generated format.
- sb.AppendFormat(Res.Strings.INFO_FD_SUM_FMT, Res.Strings.DEFAULT_VALUE);
+ mMainWin.InfoFormatBoxBrush = Brushes.Blue;
if (attr.DataDescriptor != null) {
- sb.Append(" [");
- sb.Append(attr.DataDescriptor.ToUiString());
- sb.Append("]");
+ mMainWin.InfoFormatShowSolid = true;
+ sb.Append(Res.Strings.INFO_AUTO_FORMAT);
+ sb.Append(' ');
+ sb.Append(attr.DataDescriptor.ToUiString(!isCode));
+ } else {
+ mMainWin.InfoFormatShowDashes = true;
+ sb.AppendFormat(Res.Strings.INFO_DEFAULT_FORMAT);
}
} else {
// User-specified operand format.
- // If the descriptor has a weak reference to an unknown symbol, should we
- // call that out here?
- sb.AppendFormat(Res.Strings.INFO_FD_SUM_FMT, dfd.ToUiString());
-
- // If the format descriptor for an instruction has the wrong length, it will
- // be ignored. Call that out.
- if (attr.IsInstructionStart && attr.Length != dfd.Length) {
- sb.AppendFormat(" [incorrect format length]");
- }
+ mMainWin.InfoFormatBoxBrush = Brushes.Green;
+ mMainWin.InfoFormatShowSolid = true;
+ sb.Append(Res.Strings.INFO_CUSTOM_FORMAT);
+ sb.Append(' ');
+ sb.Append(dfd.ToUiString(!isCode));
}
- sb.Append("\r\n");
+ mMainWin.InfoFormatText = sb.ToString();
+
+ sb.Clear();
// Debug only
//sb.Append("DEBUG: opAddr=" + attr.OperandAddress.ToString("x4") +
// " opOff=" + attr.OperandOffset.ToString("x4") + "\r\n");
- sb.Append("\u2022Attributes:");
if (attr.IsHinted) {
- sb.Append(" Hinted(");
+ sb.Append("\u2022 Hints: ");
for (int i = 0; i < line.OffsetSpan; i++) {
switch (mProject.TypeHints[line.FileOffset + i]) {
case CodeAnalysis.TypeHint.Code:
@@ -3574,26 +3634,12 @@ namespace SourceGen {
break;
}
}
- sb.Append(')');
+ sb.Append("\r\n");
}
- if (attr.IsEntryPoint) {
- sb.Append(" EntryPoint");
- }
- if (attr.IsBranchTarget) {
- sb.Append(" BranchTarget");
- }
- if (attr.DoesNotContinue) {
- sb.Append(" NoContinue");
- }
- if (attr.DoesNotBranch) {
- sb.Append(" NoBranch");
- }
- if (mProject.StatusFlagOverrides[line.FileOffset].AsInt != 0) {
- sb.Append(" StatusFlags");
- }
- sb.Append("\r\n\r\n");
if (attr.IsInstruction) {
+ sb.Append("\r\n");
+
Asm65.OpDef op = mProject.CpuDef.GetOpDef(mProject.FileData[line.FileOffset]);
string shortDesc = mOpDesc.GetShortDescription(op.Mnemonic);
@@ -3614,27 +3660,44 @@ namespace SourceGen {
sb.Append("\u2022Cycles: ");
int cycles = op.Cycles;
- // TODO: diff GetOpCycleMod vs. op.CycleMods to show which bits apply to
- // current CPU vs. other CPUs
- //Asm65.OpDef.CycleMod cycMods =
- // mProject.CpuDef.GetOpCycleMod(mProject.FileData[line.FileOffset]);
- Asm65.OpDef.CycleMod cycMods = op.CycleMods;
sb.Append(cycles.ToString());
- if (cycMods != 0) {
- sb.Append(" (");
- int workBits = (int)cycMods;
+
+ OpDef.CycleMod allMods = op.CycleMods;
+ OpDef.CycleMod nowMods =
+ mProject.CpuDef.GetOpCycleMod(mProject.FileData[line.FileOffset]);
+ if (allMods != 0) {
+ StringBuilder nowSb = new StringBuilder();
+ StringBuilder otherSb = new StringBuilder();
+ int workBits = (int)allMods;
while (workBits != 0) {
// Isolate rightmost bit.
int firstBit = (~workBits + 1) & workBits;
- sb.Append(mOpDesc.GetCycleModDescription((OpDef.CycleMod)firstBit));
+
+ string desc = mOpDesc.GetCycleModDescription((OpDef.CycleMod)firstBit);
+ if (((int)nowMods & firstBit) != 0) {
+ if (nowSb.Length != 0) {
+ nowSb.Append(", ");
+ }
+ nowSb.Append(desc);
+ } else {
+ if (otherSb.Length != 0) {
+ otherSb.Append(", ");
+ }
+ otherSb.Append(desc);
+ }
// Remove from set.
workBits &= ~firstBit;
- if (workBits != 0) {
- // more to come
- sb.Append(", ");
- }
}
- sb.Append(")");
+ if (nowSb.Length != 0) {
+ sb.Append(" (");
+ sb.Append(nowSb);
+ sb.Append(")");
+ }
+ if (otherSb.Length != 0) {
+ sb.Append(" [");
+ sb.Append(otherSb);
+ sb.Append("]");
+ }
}
sb.Append("\r\n");
@@ -3655,15 +3718,11 @@ namespace SourceGen {
if (!string.IsNullOrEmpty(longDesc)) {
sb.Append("\r\n");
sb.Append(longDesc);
- sb.Append("\r\n");
}
- } else {
- // do we want descriptions of the pseudo-ops?
}
-
// Publish
- mMainWin.InfoPanelContents = sb.ToString();
+ mMainWin.InfoPanelDetail1 = sb.ToString();
}
#endregion Info panel
diff --git a/SourceGen/PseudoOp.cs b/SourceGen/PseudoOp.cs
index 0c23fb8..8ee15f9 100644
--- a/SourceGen/PseudoOp.cs
+++ b/SourceGen/PseudoOp.cs
@@ -399,7 +399,7 @@ namespace SourceGen {
public static string AnnotateEquDirective(Formatter formatter, string operand,
DefSymbol defSym) {
string typeStr;
- if (defSym.SymbolType == Symbol.Type.Constant) {
+ if (defSym.IsConstant) {
if (defSym.SymbolSource == Symbol.Source.Variable) {
typeStr = Res.Strings.EQU_STACK_RELATIVE;
} else {
@@ -412,7 +412,7 @@ namespace SourceGen {
string msgStr = null;
if (defSym.HasWidth) {
msgStr = typeStr + "/" + defSym.DataDescriptor.Length;
- } else if (defSym.SymbolType == Symbol.Type.Constant) {
+ } else if (defSym.IsConstant) {
// not entirely convinced we want this, but there's currently no other way
// to tell the difference between an address and a constant from the code list
msgStr = typeStr;
diff --git a/SourceGen/Res/Strings.xaml b/SourceGen/Res/Strings.xaml
index 39ef213..e405957 100644
--- a/SourceGen/Res/Strings.xaml
+++ b/SourceGen/Res/Strings.xaml
@@ -35,7 +35,6 @@ limitations under the License.
Assembler Source
Disassembly
6502bench SourceGen v{0}
- Default
‘#’
“#”
pet:“#”
@@ -93,7 +92,9 @@ limitations under the License.
{0}-point {1}
Target assembler: {0} v{1} [{2}]
Hide
- •Operand format is {0}
+ Format (auto):
+ Format:
+ Format: default
Line {0}: {1}
Line {0}: {1} bytes of {2}
Line {0}: {1} byte of {2}
diff --git a/SourceGen/Res/Strings.xaml.cs b/SourceGen/Res/Strings.xaml.cs
index 0a24e46..b23891b 100644
--- a/SourceGen/Res/Strings.xaml.cs
+++ b/SourceGen/Res/Strings.xaml.cs
@@ -45,8 +45,6 @@ namespace SourceGen.Res {
(string)Application.Current.FindResource("str_AsmOutputNotFound");
public static string DEFAULT_HEADER_COMMENT_FMT =
(string)Application.Current.FindResource("str_DefaultHeaderCommentFmt");
- public static string DEFAULT_VALUE =
- (string)Application.Current.FindResource("str_DefaultValue");
public static string DEFAULT_ASCII_DELIM_PAT =
(string)Application.Current.FindResource("str_DefaultAsciiDelimPat");
public static string DEFAULT_HIGH_ASCII_DELIM_PAT =
@@ -167,8 +165,12 @@ namespace SourceGen.Res {
(string)Application.Current.FindResource("str_GeneratedForVersion");
public static string HIDE_COL =
(string)Application.Current.FindResource("str_HideCol");
- public static string INFO_FD_SUM_FMT =
- (string)Application.Current.FindResource("str_InfoFdSumFmt");
+ public static string INFO_AUTO_FORMAT =
+ (string)Application.Current.FindResource("str_InfoAutoFormat");
+ public static string INFO_CUSTOM_FORMAT =
+ (string)Application.Current.FindResource("str_InfoCustomFormat");
+ public static string INFO_DEFAULT_FORMAT =
+ (string)Application.Current.FindResource("str_InfoDefaultFormat");
public static string INFO_LINE_SUM_NON_FMT =
(string)Application.Current.FindResource("str_InfoLineSumNonFmt");
public static string INFO_LINE_SUM_PLURAL_FMT =
diff --git a/SourceGen/Symbol.cs b/SourceGen/Symbol.cs
index 7df4a41..8f206e4 100644
--- a/SourceGen/Symbol.cs
+++ b/SourceGen/Symbol.cs
@@ -55,18 +55,18 @@ namespace SourceGen {
/// for external addresses (including variables) and constants.
///
public bool IsInternalLabel {
- get {
- return SymbolSource == Source.User || SymbolSource == Source.Auto;
- }
+ get { return SymbolSource == Source.User || SymbolSource == Source.Auto; }
}
///
/// True if the symbol is a local variable.
///
public bool IsVariable {
- get {
- return SymbolSource == Source.Variable;
- }
+ get { return SymbolSource == Source.Variable; }
+ }
+
+ public bool IsConstant {
+ get { return SymbolType == Type.Constant; }
}
diff --git a/SourceGen/SymbolTable.cs b/SourceGen/SymbolTable.cs
index be01482..b3de631 100644
--- a/SourceGen/SymbolTable.cs
+++ b/SourceGen/SymbolTable.cs
@@ -349,7 +349,7 @@ namespace SourceGen {
///
/// Symbol to add.
private void AddAddressTableEntry(Symbol sym) {
- if (sym.SymbolType == Symbol.Type.Constant) {
+ if (sym.IsConstant) {
return;
}
if (sym.SymbolSource == Symbol.Source.Variable) {
@@ -461,7 +461,7 @@ namespace SourceGen {
private void RemoveAddressTableEntry(Symbol sym) {
// Easiest thing to do is just regenerate the table. Since we don't track
// constants or variables, we can just ignore those.
- if (sym.SymbolType == Symbol.Type.Constant) {
+ if (sym.IsConstant) {
return;
}
if (sym.SymbolSource == Symbol.Source.Variable) {
diff --git a/SourceGen/WpfGui/EditDefSymbol.xaml.cs b/SourceGen/WpfGui/EditDefSymbol.xaml.cs
index d0b2008..dea60d3 100644
--- a/SourceGen/WpfGui/EditDefSymbol.xaml.cs
+++ b/SourceGen/WpfGui/EditDefSymbol.xaml.cs
@@ -216,7 +216,7 @@ namespace SourceGen.WpfGui {
}
Comment = mOldSym.Comment;
- if (mOldSym.SymbolType == Symbol.Type.Constant) {
+ if (mOldSym.IsConstant) {
IsConstant = true;
} else {
IsAddress = true;
diff --git a/SourceGen/WpfGui/EditInstructionOperand.xaml.cs b/SourceGen/WpfGui/EditInstructionOperand.xaml.cs
index 29c5ed9..8f5e96d 100644
--- a/SourceGen/WpfGui/EditInstructionOperand.xaml.cs
+++ b/SourceGen/WpfGui/EditInstructionOperand.xaml.cs
@@ -879,8 +879,7 @@ namespace SourceGen.WpfGui {
Symbol firstPlatform = null;
Symbol firstProject = null;
foreach (Symbol sym in mProject.SymbolTable) {
- if (sym.Value == attr.OperandAddress &&
- sym.SymbolType != Symbol.Type.Constant) {
+ if (sym.Value == attr.OperandAddress && !sym.IsConstant) {
if (firstPlatform == null && sym.SymbolSource == Symbol.Source.Platform) {
firstPlatform = sym;
} else if (firstProject == null &&
diff --git a/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs b/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs
index 20a0549..8166189 100644
--- a/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs
+++ b/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs
@@ -168,7 +168,7 @@ namespace SourceGen.WpfGui {
///
private FormattedSymbol CreateFormattedSymbol(DefSymbol defSym) {
string typeStr;
- if (defSym.SymbolType == Symbol.Type.Constant) {
+ if (defSym.IsConstant) {
typeStr = Res.Strings.ABBREV_STACK_RELATIVE;
} else {
typeStr = Res.Strings.ABBREV_ADDRESS;
diff --git a/SourceGen/WpfGui/EditProjectProperties.xaml.cs b/SourceGen/WpfGui/EditProjectProperties.xaml.cs
index e906464..efb64d0 100644
--- a/SourceGen/WpfGui/EditProjectProperties.xaml.cs
+++ b/SourceGen/WpfGui/EditProjectProperties.xaml.cs
@@ -462,7 +462,7 @@ namespace SourceGen.WpfGui {
private FormattedSymbol CreateFormattedSymbol(DefSymbol defSym) {
string typeStr;
- if (defSym.SymbolType == Symbol.Type.Constant) {
+ if (defSym.IsConstant) {
typeStr = Res.Strings.ABBREV_CONSTANT;
} else {
typeStr = Res.Strings.ABBREV_ADDRESS;
diff --git a/SourceGen/WpfGui/MainWindow.xaml b/SourceGen/WpfGui/MainWindow.xaml
index 7bd456b..eba596b 100644
--- a/SourceGen/WpfGui/MainWindow.xaml
+++ b/SourceGen/WpfGui/MainWindow.xaml
@@ -450,11 +450,11 @@ limitations under the License.
DockPanel, so that LastChildFill will expand this to fill all available space. -->
-
+
-
+
@@ -584,7 +584,7 @@ limitations under the License.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- /// Text to display in the Info panel. This is a simple TextBox.
+ /// Text for the line number / description section.
///
- public string InfoPanelContents {
- get {
- return mInfoBoxContents;
- }
- set {
- mInfoBoxContents = value;
- OnPropertyChanged();
- }
+ public string InfoLineDescrText {
+ get { return mInfoLineDescrText; }
+ set { mInfoLineDescrText = value; OnPropertyChanged(); }
+ }
+ private string mInfoLineDescrText;
+
+ ///
+ /// Text for the offset, shown only in debug builds.
+ ///
+ public string InfoOffsetText {
+ get { return mInfoOffsetText; }
+ set { mInfoOffsetText = value; OnPropertyChanged(); }
+ }
+ private string mInfoOffsetText;
+
+ public SolidColorBrush InfoFormatBoxBrush {
+ get { return mInfoFormatBoxBrush; }
+ set { mInfoFormatBoxBrush = value; OnPropertyChanged(); }
+ }
+ private SolidColorBrush mInfoFormatBoxBrush = Brushes.Green;
+
+ public bool InfoFormatShowDashes {
+ get { return mInfoFormatShowDashes; }
+ set { mInfoFormatShowDashes = value; OnPropertyChanged(); }
+ }
+ private bool mInfoFormatShowDashes;
+
+ public bool InfoFormatShowSolid {
+ get { return mInfoFormatShowSolid; }
+ set { mInfoFormatShowSolid = value; OnPropertyChanged(); }
+ }
+ private bool mInfoFormatShowSolid;
+
+ public string InfoFormatText {
+ get { return mInfoFormatText; }
+ set { mInfoFormatText = value; OnPropertyChanged(); }
+ }
+ private string mInfoFormatText;
+
+ public string InfoPanelDetail1 {
+ get { return mInfoPanelDetail1; }
+ set { mInfoPanelDetail1 = value; OnPropertyChanged(); }
+ }
+ private string mInfoPanelDetail1;
+
+ //public string InfoPanelMonoContents {
+ // get { return mInfoPanelMonoContents; }
+ // set { mInfoPanelMonoContents = value; OnPropertyChanged(); }
+ //}
+ //private string mInfoPanelMonoContents;
+
+
+ public void ClearInfoPanel() {
+ InfoLineDescrText = InfoOffsetText = InfoFormatText = InfoPanelDetail1 = string.Empty;
+ InfoFormatShowDashes = InfoFormatShowSolid = false;
}
- private string mInfoBoxContents;
#endregion Info panel