1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-30 14:31:13 +00:00

Minor updates

Add a link to the web site in the About box.

Add an up-link to the HTML export template.

Escape '<', '>', and '&' in the Applesoft to HTML converter.
This commit is contained in:
Andy McFadden 2019-10-25 18:16:09 -07:00
parent 8505a5cdd4
commit 00612097f6
4 changed files with 18 additions and 4 deletions

View File

@ -13,6 +13,7 @@
</head> </head>
<body> <body>
<p><a href="./">back to project page</a></p>
<h1>$ProjectName$ Disassembly</h1> <h1>$ProjectName$ Disassembly</h1>
<div id="code-lines"> <div id="code-lines">

View File

@ -45,18 +45,22 @@ namespace SourceGen.Tools {
* All values are little-endian. Numbers are stored as characters. * All values are little-endian. Numbers are stored as characters.
*/ */
/// <summary>
/// List of Applesoft BASIC tokens. '&lt;', '&gt;', and '&amp;' have been replaced
/// with their HTML-escape strings.
/// </summary>
private static readonly string[] TOKENS = new string[128] { private static readonly string[] TOKENS = new string[128] {
"END", "FOR", "NEXT", "DATA", "INPUT", "DEL", "DIM", "READ", "END", "FOR", "NEXT", "DATA", "INPUT", "DEL", "DIM", "READ",
"GR", "TEXT", "PR#", "IN#", "CALL", "PLOT", "HLIN", "VLIN", "GR", "TEXT", "PR#", "IN#", "CALL", "PLOT", "HLIN", "VLIN",
"HGR2", "HGR", "HCOLOR=", "HPLOT", "DRAW", "XDRAW", "HTAB", "HOME", "HGR2", "HGR", "HCOLOR=", "HPLOT", "DRAW", "XDRAW", "HTAB", "HOME",
"ROT=", "SCALE=", "SHLOAD", "TRACE", "NOTRACE", "NORMAL", "INVERSE", "FLASH", "ROT=", "SCALE=", "SHLOAD", "TRACE", "NOTRACE", "NORMAL", "INVERSE", "FLASH",
"COLOR=", "POP", "VTAB", "HIMEM:", "LOMEM:", "ONERR", "RESUME", "RECALL", "COLOR=", "POP", "VTAB", "HIMEM:", "LOMEM:", "ONERR", "RESUME", "RECALL",
"STORE", "SPEED=", "LET", "GOTO", "RUN", "IF", "RESTORE", "&", "STORE", "SPEED=", "LET", "GOTO", "RUN", "IF", "RESTORE", "&amp;",
"GOSUB", "RETURN", "REM", "STOP", "ON", "WAIT", "LOAD", "SAVE", "GOSUB", "RETURN", "REM", "STOP", "ON", "WAIT", "LOAD", "SAVE",
"DEF", "POKE", "PRINT", "CONT", "LIST", "CLEAR", "GET", "NEW", "DEF", "POKE", "PRINT", "CONT", "LIST", "CLEAR", "GET", "NEW",
"TAB(", "TO", "FN", "SPC(", "THEN", "AT", "NOT", "STEP", "TAB(", "TO", "FN", "SPC(", "THEN", "AT", "NOT", "STEP",
"+", "-", "*", "/", "^", "AND", "OR", ">", "+", "-", "*", "/", "^", "AND", "OR", "&gt;",
"=", "<", "SGN", "INT", "ABS", "USR", "FRE", "SCRN(", "=", "&lt;", "SGN", "INT", "ABS", "USR", "FRE", "SCRN(",
"PDL", "POS", "SQR", "RND", "LOG", "EXP", "COS", "SIN", "PDL", "POS", "SQR", "RND", "LOG", "EXP", "COS", "SIN",
"TAN", "ATN", "PEEK", "LEN", "STR$", "VAL", "ASC", "CHR$", "TAN", "ATN", "PEEK", "LEN", "STR$", "VAL", "ASC", "CHR$",
"LEFT$", "RIGHT$", "MID$", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "LEFT$", "RIGHT$", "MID$", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR",
@ -65,6 +69,7 @@ namespace SourceGen.Tools {
}; };
private const int TOK_REM = 0xb2; private const int TOK_REM = 0xb2;
// Text colors. Subtlety is a goal.
private Color mDefaultColor = Color.FromArgb(0xff, 0x40, 0x40, 0x40); // Dark Grey private Color mDefaultColor = Color.FromArgb(0xff, 0x40, 0x40, 0x40); // Dark Grey
private Color mLineNumColor = Color.FromArgb(0xff, 0x40, 0x40, 0x40); // Dark Grey private Color mLineNumColor = Color.FromArgb(0xff, 0x40, 0x40, 0x40); // Dark Grey
private Color mKeywordColor = Color.FromArgb(0xff, 0x00, 0x00, 0x00); // Black private Color mKeywordColor = Color.FromArgb(0xff, 0x00, 0x00, 0x00); // Black

View File

@ -45,7 +45,11 @@ limitations under the License.
<TextBlock FontSize="24" <TextBlock FontSize="24"
Text="{Binding ProgramVersionString, StringFormat={}Version {0}, Text="{Binding ProgramVersionString, StringFormat={}Version {0},
FallbackValue=Version X.Y.Z-alpha1}"/> FallbackValue=Version X.Y.Z-alpha1}"/>
<TextBlock Text="Copyright 2019 faddenSoft" Margin="0,30,0,0"/> <Button Content="https://6502bench.com/" Margin="0,30,0,0"
BorderThickness="0" HorizontalAlignment="Left"
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"
Click="WebSiteButton_Click"/>
<TextBlock Text="Copyright 2019 faddenSoft" Margin="0,0,0,0"/>
<TextBlock Text="Created by Andy McFadden"/> <TextBlock Text="Created by Andy McFadden"/>
</StackPanel> </StackPanel>

View File

@ -70,5 +70,9 @@ namespace SourceGen.WpfGui {
legalStuffTextBox.Text = text; legalStuffTextBox.Text = text;
} }
private void WebSiteButton_Click(object sender, RoutedEventArgs e) {
CommonUtil.ShellCommand.OpenUrl("https://6502bench.com/");
}
} }
} }