252 lines
27 KiB
XML
252 lines
27 KiB
XML
<Window x:Class="SuperVM.VisualDebugger.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:SuperVM.VisualDebugger"
|
|
xmlns:avalon="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit"
|
|
mc:Ignorable="d"
|
|
WindowStartupLocation="CenterScreen"
|
|
Title="SuperVM Assembler Toolkit" Height="768" Width="1024">
|
|
<Window.DataContext>
|
|
<local:VirtualMachineModel />
|
|
</Window.DataContext>
|
|
<Window.Resources>
|
|
<BooleanToVisibilityConverter x:Key="btv" />
|
|
</Window.Resources>
|
|
<Window.InputBindings>
|
|
<KeyBinding Key="V" Modifiers="Ctrl+Shift" Command="{Binding Path=LoadFromClipboardCommand}" />
|
|
<KeyBinding Key="F5" Command="{Binding Path=StartCommand}" />
|
|
<KeyBinding Key="F5" Modifiers="Ctrl" Command="{Binding Path=StartSlowCommand}" />
|
|
<KeyBinding Key="F6" Command="{Binding Path=StopCommand}" />
|
|
<KeyBinding Key="F10" Command="{Binding Path=StepCommand}" />
|
|
<KeyBinding Key="F9" Command="{Binding Path=StopCommand}" />
|
|
</Window.InputBindings>
|
|
<DockPanel>
|
|
<Menu DockPanel.Dock="Top">
|
|
<MenuItem Header="File">
|
|
<MenuItem Header="Open" Command="{Binding Path=LoadFromFileCommand}" />
|
|
<Separator />
|
|
<MenuItem Header="Quit" Command="Close" />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="Edit">
|
|
<MenuItem Header="Select All" Command="SelectAll" />
|
|
<Separator />
|
|
<MenuItem Header="Copy" Command="Copy" />
|
|
<MenuItem Header="Cut" Command="Cut" />
|
|
<Separator />
|
|
<MenuItem Header="Paste" Command="Paste" />
|
|
<MenuItem Header="Paste Source" Command="{Binding Path=LoadFromClipboardCommand}"/>
|
|
<Separator />
|
|
</MenuItem>
|
|
|
|
<MenuItem Header="Options">
|
|
<MenuItem
|
|
Header="Append Bootstrap"
|
|
IsCheckable="True"
|
|
IsChecked="{Binding Path=AppendBootstrap}"/>
|
|
<MenuItem
|
|
Header="Enable Debug Newline"
|
|
IsCheckable="True"
|
|
IsChecked="{Binding Path=InsertDebugNewlines}" />
|
|
</MenuItem>
|
|
</Menu>
|
|
<ToolBarTray DockPanel.Dock="Top">
|
|
<ToolBarTray.Resources>
|
|
<Style TargetType="Path">
|
|
<Setter Property="Fill" Value="Black" />
|
|
<Setter Property="Width" Value="16" />
|
|
<Setter Property="Height" Value="16" />
|
|
<Setter Property="Stretch" Value="Uniform" />
|
|
</Style>
|
|
</ToolBarTray.Resources>
|
|
<ToolBar Header="Load">
|
|
<Button ToolTip="From File" Command="{Binding Path=LoadFromFileCommand}">
|
|
<Path Data="F1 M 19,50L 28,34L 63,34L 54,50L 19,50 Z M 19,28.0001L 35,28C 36,25 37.4999,24.0001 37.4999,24.0001L 48.75,24C 49.3023,24 50,24.6977 50,25.25L 50,28L 53.9999,28.0001L 53.9999,32L 27,32L 19,46.4L 19,28.0001 Z " />
|
|
</Button>
|
|
<Button ToolTip="From Clipboard" Command="{Binding Path=LoadFromClipboardCommand}" >
|
|
<Path Data="F1 M 34.0001,60C 32.3433,60 31.0001,58.6569 31.0001,57L 31.0001,54.0001L 23,54.0001C 21.3431,54.0001 20,52.6569 20,51.0001L 20,24.0001C 20,22.3432 21.3431,21.0001 23,21.0001L 26.5001,20.9999C 26.5001,20.9999 27.4999,20.8807 27.4999,19.5C 27.4999,18.1193 29.1191,17 30.4999,17L 38.4998,17.0001C 39.8798,17.0001 41.4988,18.6176 41.5,19.9979L 41.4998,19.5024C 41.5009,20.881 42.5,21 42.5,21L 46,21.0001C 47.6569,21.0001 49,22.3432 49,24.0001L 49,31L 56,38L 56.0001,57C 56.0001,58.6569 54.657,60 53.0001,60L 34.0001,60 Z M 33.9999,31.0001L 33.9999,57.0001L 53.0001,57L 53.0001,43L 42.0002,43L 42.0001,31L 33.9999,31.0001 Z M 53,40.0001L 45,32.0001L 45.0001,40L 53,40.0001 Z M 28.5,25L 40.5,25C 40.5,25 39.4998,23.8809 39.4998,22.5002C 39.4998,21.1194 38.3805,20.0002 36.9998,20.0002L 31.9998,20.0002C 30.6191,20.0002 29.4998,21.1194 29.4998,22.5002C 29.4998,23.8809 28.5,25 28.5,25 Z " />
|
|
</Button>
|
|
<ToggleButton ToolTip="Enable Bootstrap" IsChecked="{Binding Path=AppendBootstrap}">
|
|
<Path Data="F1 M 25.7639,28.0031L 20.0866,22.3258C 19.4683,21.7075 19.4683,20.705 20.0866,20.0866C 20.705,19.4683 21.7075,19.4683 22.3258,20.0867L 28.0031,25.7639C 32.3443,22.5092 38.5302,22.856 42.4783,26.8042L 26.8041,42.4784C 22.856,38.5302 22.5092,32.3443 25.7639,28.0031 Z M 49.1958,33.5217C 53.144,37.4699 53.4908,43.6557 50.2361,47.9969L 55.9133,53.6742C 56.5317,54.2925 56.5317,55.295 55.9133,55.9134C 55.295,56.5317 54.2925,56.5317 53.6742,55.9134L 47.9969,50.2361C 43.6557,53.4908 37.4698,53.1441 33.5216,49.1959L 36.8804,45.8371L 34.0814,43.0381C 33.1539,42.1107 33.1539,40.6069 34.0814,39.6794C 35.0089,38.7519 36.5127,38.7519 37.4402,39.6794L 40.2392,42.4784L 42.4783,40.2392L 39.6794,37.4402C 38.7519,36.5127 38.7519,35.009 39.6794,34.0815C 40.6069,33.154 42.1106,33.154 43.0381,34.0815L 45.8371,36.8804L 49.1958,33.5217 Z " />
|
|
</ToggleButton>
|
|
</ToolBar>
|
|
<ToolBar Header="Control">
|
|
<Button ToolTip="Assemble and Restart" Command="{Binding Path=RecompileCommand}" >
|
|
<Path Data="F1 M 38,22.1667L 58.5832,37.6043L 58.5832,38.7918L 38,53.8333L 38,22.1667 Z M 33.25,22.1667L 33.25,53.8333L 26.9167,53.8333L 26.9167,22.1667L 33.25,22.1667 Z "/>
|
|
</Button>
|
|
<Separator />
|
|
<Button ToolTip="Start" Command="{Binding Path=StartCommand}">
|
|
<Path Data="F1 M 30.0833,22.1667L 50.6665,37.6043L 50.6665,38.7918L 30.0833,53.8333L 30.0833,22.1667 Z "/>
|
|
</Button>
|
|
<Button ToolTip="Start Slow" Command="{Binding Path=StartSlowCommand}">
|
|
<Path Data="F1 M 44.3333,45.9167L 53.8333,54.625L 44.3333,63.3333L 44.3333,45.9167 Z M 52.25,39.5833C 52.25,42.2298 51.6007,44.7245 50.4528,46.917L 47.3572,44.2084C 47.762,43.2521 48.0451,42.2317 48.187,41.1667L 44.3333,41.1667L 44.3333,38L 48.187,38C 47.4819,32.7082 43.2918,28.5181 38,27.813L 38,31.6667L 34.8333,31.6667L 34.8333,27.813C 29.5415,28.5181 25.3513,32.7082 24.6463,38L 28.5,38.0001L 28.5,41.1667L 24.6463,41.1667C 25.3513,46.4585 29.5415,50.6487 34.8333,51.3537L 34.8333,47.5L 38,47.5L 38,51.3537C 39.1115,51.2056 40.5703,50.9038 41.5625,50.4702L 41.5625,54.6918C 40.063,55.1628 38.0716,55.4167 36.4167,55.4167C 27.6721,55.4167 20.5833,48.3279 20.5833,39.5833C 20.5833,31.3732 26.8322,24.6226 34.8333,23.8282L 34.8333,22.1667L 30.0833,22.1667L 30.0833,17.4167L 42.75,17.4167L 42.75,22.1667L 38,22.1667L 38,23.8282C 41.1844,24.1444 44.0913,25.404 46.4371,27.3237L 47.5796,26.1813L 45.3404,23.9421L 48.6991,20.5833L 55.4167,27.3009L 52.0579,30.6596L 49.8187,28.4204L 48.6763,29.5629C 50.9099,32.2923 52.25,35.7813 52.25,39.5833 Z M 36.4166,36.4167C 38.1655,36.4167 39.5833,37.8345 39.5833,39.5834C 39.5833,41.3323 38.1655,42.75 36.4166,42.75L 30.0833,47.5L 33.2499,39.5834C 33.2499,37.8345 34.6677,36.4167 36.4166,36.4167 Z "/>
|
|
</Button>
|
|
<Button ToolTip="Stop" Command="{Binding Path=StopCommand}">
|
|
<Path Data="F1 M 26.9167,23.75L 33.25,23.75L 33.25,52.25L 26.9167,52.25L 26.9167,23.75 Z M 42.75,23.75L 49.0833,23.75L 49.0833,52.25L 42.75,52.25L 42.75,23.75 Z "/>
|
|
</Button>
|
|
<Separator />
|
|
<Button ToolTip="Reset" Command="{Binding Path=ResetCommand}">
|
|
<Path Data="F1 M 52,24L 52,52L 47,52L 47,43C 47,38.0295 42.9706,34 38,34L 37,34L 37,30L 30.25,36.5L 37,43L 37,39L 38,39C 40.2091,39 42,40.7909 42,43L 42,52L 24,52L 24,24L 52,24 Z "/>
|
|
</Button>
|
|
<Button ToolTip="Single Step" Command="{Binding Path=StepCommand}">
|
|
<Path Data="F1 M 33,25L 59,25L 59,30L 33,30L 33,25 Z M 36,33L 59,33L 59,38L 36,38L 36,33 Z M 36,41L 59,41L 59,46L 36,46L 36,41 Z M 33,49L 59,49L 59,54L 33,54L 33,49 Z M 21,37C 21,39.2092 22.7909,41 25,41L 27,41L 27,37.0001L 33.75,43.5L 27,50L 27,46L 25,46C 20.0294,46 16,41.9705 16,37L 16,34C 16,29.0295 20.0294,25 25,25L 27,25L 27,30L 25,30C 22.7909,30 21,31.7909 21,34L 21,37 Z "/>
|
|
</Button>
|
|
</ToolBar>
|
|
<ToolBar Header="Tools" HorizontalAlignment="Right">
|
|
<ToggleButton x:Name="cpuVisible" IsChecked="True">
|
|
<Path Data="F1 M 19,19L 57,19L 57,22.063C 56.1374,22.285 55.5,23.0681 55.5,24C 55.5,24.9319 56.1374,25.715 57,25.937L 57,57L 19,57L 19,27.937C 19.8626,27.715 20.5,26.9319 20.5,26C 20.5,25.0681 19.8626,24.285 19,24.063L 19,19 Z M 21.9998,22.0005L 21.9998,24.0005L 23.9998,24.0005L 23.9998,22.0005L 21.9998,22.0005 Z M 24.9998,22.0005L 24.9998,24.0005L 26.9998,24.0005L 26.9998,22.0005L 24.9998,22.0005 Z M 27.9998,22.0005L 27.9998,24.0005L 29.9998,24.0005L 29.9998,22.0005L 27.9998,22.0005 Z M 30.9998,22.0005L 30.9998,24.0005L 32.9998,24.0005L 32.9998,22.0005L 30.9998,22.0005 Z M 33.9998,22.0005L 33.9998,24.0005L 35.9998,24.0005L 35.9998,22.0005L 33.9998,22.0005 Z M 36.9998,22.0005L 36.9998,24.0005L 38.9998,24.0005L 38.9998,22.0005L 36.9998,22.0005 Z M 39.9998,22.0005L 39.9998,24.0005L 41.9998,24.0005L 41.9998,22.0005L 39.9998,22.0005 Z M 42.9995,22.0005L 42.9995,24.0005L 44.9995,24.0005L 44.9995,22.0005L 42.9995,22.0005 Z M 45.9995,22.0005L 45.9995,24.0005L 47.9995,24.0005L 47.9995,22.0005L 45.9995,22.0005 Z M 48.9995,22.0004L 48.9995,24.0004L 50.9995,24.0004L 50.9995,22.0004L 48.9995,22.0004 Z M 51.9996,22.0004L 51.9996,24.0004L 53.9996,24.0004L 53.9996,22.0004L 51.9996,22.0004 Z M 21.9998,25.0004L 21.9998,27.0004L 23.9998,27.0004L 23.9998,25.0004L 21.9998,25.0004 Z M 24.9998,25.0004L 24.9998,27.0004L 26.9998,27.0004L 26.9998,25.0004L 24.9998,25.0004 Z M 27.9998,25.0004L 27.9998,27.0004L 29.9998,27.0004L 29.9998,25.0004L 27.9998,25.0004 Z M 30.9998,25.0004L 30.9998,27.0004L 32.9998,27.0004L 32.9998,25.0004L 30.9998,25.0004 Z M 33.9998,25.0004L 33.9998,27.0004L 35.9998,27.0004L 35.9998,25.0004L 33.9998,25.0004 Z M 36.9998,25.0004L 36.9998,27.0004L 38.9998,27.0004L 38.9998,25.0004L 36.9998,25.0004 Z M 39.9998,25.0004L 39.9998,27.0004L 41.9998,27.0004L 41.9998,25.0004L 39.9998,25.0004 Z M 42.9996,25.0004L 42.9996,27.0004L 44.9996,27.0004L 44.9996,25.0004L 42.9996,25.0004 Z M 45.9996,25.0004L 45.9996,27.0004L 47.9996,27.0004L 47.9996,25.0004L 45.9996,25.0004 Z M 48.9996,25.0004L 48.9996,27.0004L 50.9996,27.0004L 50.9996,25.0004L 48.9996,25.0004 Z M 51.9996,25.0004L 51.9996,27.0004L 53.9996,27.0004L 53.9996,25.0004L 51.9996,25.0004 Z M 21.9998,28.0004L 21.9998,30.0004L 23.9998,30.0004L 23.9998,28.0004L 21.9998,28.0004 Z M 24.9998,28.0004L 24.9998,30.0004L 26.9998,30.0004L 26.9998,28.0004L 24.9998,28.0004 Z M 27.9998,28.0004L 27.9998,30.0004L 29.9998,30.0004L 29.9998,28.0004L 27.9998,28.0004 Z M 30.9998,28.0004L 30.9998,30.0004L 32.9998,30.0004L 32.9998,28.0004L 30.9998,28.0004 Z M 33.9998,28.0004L 33.9998,30.0004L 35.9998,30.0004L 35.9998,28.0004L 33.9998,28.0004 Z M 36.9998,28.0004L 36.9998,30.0004L 38.9998,30.0004L 38.9998,28.0004L 36.9998,28.0004 Z M 39.9998,28.0004L 39.9998,30.0004L 41.9998,30.0004L 41.9998,28.0004L 39.9998,28.0004 Z M 42.9996,28.0004L 42.9996,30.0004L 44.9996,30.0004L 44.9996,28.0004L 42.9996,28.0004 Z M 45.9997,28.0004L 45.9997,30.0004L 47.9997,30.0004L 47.9997,28.0004L 45.9997,28.0004 Z M 48.9997,28.0003L 48.9997,30.0003L 50.9997,30.0003L 50.9997,28.0003L 48.9997,28.0003 Z M 51.9997,28.0003L 51.9997,30.0003L 53.9997,30.0003L 53.9997,28.0003L 51.9997,28.0003 Z M 21.9998,31.0003L 21.9998,33.0003L 23.9998,33.0003L 23.9998,31.0003L 21.9998,31.0003 Z M 24.9998,31.0003L 24.9998,33.0003L 26.9998,33.0003L 26.9998,31.0003L 24.9998,31.0003 Z M 27.9998,31.0003L 27.9998,33.0003L 29.9998,33.0003L 29.9998,31.0003L 27.9998,31.0003 Z M 45.9997,31.0003L 45.9997,33.0003L 47.9997,33.0003L 47.9997,31.0003L 45.9997,31.0003 Z M 48.9997,31.0003L 48.9997,33.0003L 50.9997,33.0003L 50.9997,31.0003L 48.9997,31.0003 Z M 51.9997,31.0003L 51.9997,33.0003L 53.9997,33.0003L 53.9997,31.0003L 51.9997,31.0003 Z M 21.9998,34.0001L 21.9998,36.0001L 23.9998,36.0001L 23.9998,34.0001L 21.9998,34.0001 Z M 24.9999,34.0001L 24.9999,36.0001L 26.9999,36.0001L 26.9999,34.0001L 24.9999,34.0001 Z M 27.9999,34.0001L 27.9999,36.0001L 29.9999,36.0001L 29.9999,34.0001L 27.9999,34.0001 Z M 45.9997,34.0001L 45.9997,36.0001L 47.9997,36.0001L 47.9997,34.0001L 45.9997,34.0001 Z M 48.9997,34.0001L 48.9997,36.0001L 50.9997,36.0001L 50.9997,34.0001L 48.9997,34.0001 Z M 51.9997,34.0001L 51.9997,36.0001L 53.9997,36.0001L 53.9997,34.0001L 51.9997,34.0001 Z M 21.9999,37.0001L 21.9999,39.0001L 23.9999,39.0001L 23.9999,37.0001L 21.9999,37.0001 Z M 24.9999,37.0001L 24.9999,39.0001L 26.9999,39.0001L 26.9999,37.0001L 24.9999,37.0001 Z M 27.9999,37.0001L 27.9999,39.0001L 29.9999,39.0001L 29.9999,37.0001L 27.9999,37.0001 Z M 45.9997,37.0001L 45.9997,39.0001L 47.9997,39.0001L 47.9997,37.0001L 45.9997,37.0001 Z M 48.9998,37.0001L 48.9998,39.0001L 50.9998,39.0001L 50.9998,37.0001L 48.9998,37.0001 Z M 51.9998,37.0001L 51.9998,39.0001L 53.9998,39.0001L 53.9998,37.0001L 51.9998,37.0001 Z M 21.9999,40.0001L 21.9999,42.0001L 23.9999,42.0001L 23.9999,40.0001L 21.9999,40.0001 Z M 24.9999,40.0001L 24.9999,42.0001L 26.9999,42.0001L 26.9999,40.0001L 24.9999,40.0001 Z M 27.9999,40.0001L 27.9999,42.0001L 29.9999,42.0001L 29.9999,40.0001L 27.9999,40.0001 Z M 45.9998,40.0001L 45.9998,42.0001L 47.9998,42.0001L 47.9998,40.0001L 45.9998,40.0001 Z M 48.9998,40.0001L 48.9998,42.0001L 50.9998,42.0001L 50.9998,40.0001L 48.9998,40.0001 Z M 51.9998,40.0001L 51.9998,42.0001L 53.9998,42.0001L 53.9998,40.0001L 51.9998,40.0001 Z M 21.9999,43.0001L 21.9999,45.0001L 23.9999,45.0001L 23.9999,43.0001L 21.9999,43.0001 Z M 24.9999,43.0001L 24.9999,45.0001L 26.9999,45.0001L 26.9999,43.0001L 24.9999,43.0001 Z M 27.9999,43.0001L 27.9999,45.0001L 29.9999,45.0001L 29.9999,43.0001L 27.9999,43.0001 Z M 45.9998,43.0001L 45.9998,45.0001L 47.9998,45.0001L 47.9998,43.0001L 45.9998,43.0001 Z M 48.9998,43.0001L 48.9998,45.0001L 50.9998,45.0001L 50.9998,43.0001L 48.9998,43.0001 Z M 51.9998,43.0001L 51.9998,45.0001L 53.9998,45.0001L 53.9998,43.0001L 51.9998,43.0001 Z M 21.9999,46.0001L 21.9999,48.0001L 23.9999,48.0001L 23.9999,46.0001L 21.9999,46.0001 Z M 24.9999,46.0001L 24.9999,48.0001L 26.9999,48.0001L 26.9999,46.0001L 24.9999,46.0001 Z M 27.9999,46.0001L 27.9999,48.0001L 29.9999,48.0001L 29.9999,46.0001L 27.9999,46.0001 Z M 30.9999,46.0001L 30.9999,48.0001L 32.9999,48.0001L 32.9999,46.0001L 30.9999,46.0001 Z M 33.9999,46.0001L 33.9999,48.0001L 35.9999,48.0001L 35.9999,46.0001L 33.9999,46.0001 Z M 36.9999,46.0001L 36.9999,48.0001L 38.9999,48.0001L 38.9999,46.0001L 36.9999,46.0001 Z M 39.9999,46.0001L 39.9999,48.0001L 41.9999,48.0001L 41.9999,46.0001L 39.9999,46.0001 Z M 42.9999,46.0001L 42.9999,48.0001L 44.9999,48.0001L 44.9999,46.0001L 42.9999,46.0001 Z M 45.9999,46.0001L 45.9999,48.0001L 47.9999,48.0001L 47.9999,46.0001L 45.9999,46.0001 Z M 48.9999,46.0001L 48.9999,48.0001L 50.9999,48.0001L 50.9999,46.0001L 48.9999,46.0001 Z M 51.9999,46.0001L 51.9999,48.0001L 53.9999,48.0001L 53.9999,46.0001L 51.9999,46.0001 Z M 21.9999,49.0001L 21.9999,51.0001L 23.9999,51.0001L 23.9999,49.0001L 21.9999,49.0001 Z M 24.9999,49.0001L 24.9999,51.0001L 26.9999,51.0001L 26.9999,49.0001L 24.9999,49.0001 Z M 27.9999,49.0001L 27.9999,51.0001L 29.9999,51.0001L 29.9999,49.0001L 27.9999,49.0001 Z M 30.9999,49.0001L 30.9999,51.0001L 33,51.0001L 33,49.0001L 30.9999,49.0001 Z M 34,49.0001L 34,51.0001L 36,51.0001L 36,49.0001L 34,49.0001 Z M 37,49.0001L 37,51.0001L 39,51.0001L 39,49.0001L 37,49.0001 Z M 40,49.0001L 40,51.0001L 42,51.0001L 42,49.0001L 40,49.0001 Z M 42.9999,49.0001L 42.9999,51.0001L 44.9999,51.0001L 44.9999,49.0001L 42.9999,49.0001 Z M 45.9999,49L 45.9999,51L 47.9999,51L 47.9999,49L 45.9999,49 Z M 48.9999,49L 48.9999,51L 50.9999,51L 50.9999,49L 48.9999,49 Z M 51.9999,49L 51.9999,51L 53.9999,51L 53.9999,49L 51.9999,49 Z M 22,52L 22,54L 24,54L 24,52L 22,52 Z M 25,52L 25,54L 27,54L 27,52L 25,52 Z M 28,52L 28,54L 30,54L 30,52L 28,52 Z M 31,52L 31,54L 33,54L 33,52L 31,52 Z M 34,52L 34,54L 36,54L 36,52L 34,52 Z M 37,52L 37,54L 39,54L 39,52L 37,52 Z M 40,52L 40,54L 42,54L 42,52L 40,52 Z M 43,52L 43,54L 45,54L 45,52L 43,52 Z M 46,52L 46,54L 48,54L 48,52L 46,52 Z M 49,52L 49,54L 51,54L 51,52L 49,52 Z M 52,52L 52,54L 54,54L 54,52L 52,52 Z M 31,31L 31,45L 45,45L 45,31L 31,31 Z M 33.6375,36.64L 33.4504,36.565L 33.3733,36.375L 33.4504,36.1829L 33.6375,36.1067L 33.8283,36.1829L 33.9067,36.375L 33.8283,36.5625L 33.6375,36.64 Z M 33.8533,40L 33.4266,40L 33.4266,37.3334L 33.8533,37.3334L 33.8533,40 Z M 36.9467,40L 36.52,40L 36.52,38.4942C 36.52,37.9336 36.3092,37.6533 35.8875,37.6533C 35.6697,37.6533 35.4896,37.7328 35.3471,37.8917C 35.2046,38.0506 35.1333,38.2514 35.1333,38.4942L 35.1333,40L 34.7066,40L 34.7066,37.3333L 35.1333,37.3333L 35.1333,37.7992L 35.1441,37.7992C 35.3486,37.4531 35.6444,37.28 36.0317,37.28C 36.3278,37.28 36.5543,37.3739 36.7112,37.5617C 36.8682,37.7495 36.9467,38.0206 36.9467,38.375L 36.9467,40 Z M 39.0267,39.9642L 38.6208,40.0533C 38.1447,40.0533 37.9067,39.7945 37.9067,39.2767L 37.9067,37.7067L 37.4267,37.7067L 37.4267,37.3333L 37.9067,37.3333L 37.9067,36.6733L 38.3333,36.5333L 38.3333,37.3333L 39.0267,37.3333L 39.0267,37.7067L 38.3333,37.7067L 38.3333,39.1892C 38.3333,39.3658 38.3647,39.4918 38.4275,39.5671C 38.4903,39.6424 38.5942,39.68 38.7392,39.68L 39.0267,39.5733L 39.0267,39.9642 Z M 41.6933,38.7733L 39.8267,38.7733C 39.8339,39.0628 39.9142,39.2863 40.0675,39.4438C 40.2208,39.6013 40.4319,39.68 40.7008,39.68C 41.003,39.68 41.2805,39.5911 41.5333,39.4133L 41.5333,39.8042C 41.3,39.9703 40.9911,40.0533 40.6067,40.0533C 40.2311,40.0533 39.9361,39.9331 39.7217,39.6925C 39.5072,39.452 39.4,39.1133 39.4,38.6767C 39.4,38.2645 39.516,37.9286 39.7479,37.6692C 39.9799,37.4097 40.268,37.28 40.6125,37.28C 40.9564,37.28 41.2225,37.3921 41.4108,37.6163C 41.5992,37.8404 41.6933,38.152 41.6933,38.5508L 41.6933,38.7733 Z M 41.2667,38.4C 41.265,38.1645 41.2058,37.9811 41.0892,37.85C 40.9725,37.7189 40.8103,37.6533 40.6025,37.6533C 40.4019,37.6533 40.2317,37.7222 40.0917,37.86C 39.9517,37.9978 39.8653,38.1778 39.8325,38.4L 41.2667,38.4 Z M 42.76,40L 42.3333,40L 42.3333,36.0533L 42.76,36.0533L 42.76,40 Z "/>
|
|
</ToggleButton>
|
|
<ToggleButton x:Name="outputVisible" IsChecked="False">
|
|
<Path Data="F1 M 17,20L 59,20L 59,56L 17,56L 17,20 Z M 20,26L 20,53L 56,53L 56,26L 20,26 Z M 23.75,31L 28.5,31L 33.25,37.5L 28.5,44L 23.75,44L 28.5,37.5L 23.75,31 Z "/>
|
|
</ToggleButton>
|
|
<ToggleButton x:Name="memoryVisible" IsChecked="False">
|
|
<Path Data="F1 M 42,21L 48,21L 48,27L 42,27L 42,21 Z M 41.9999,28.0001L 47.9998,28.0001L 47.9998,34.0001L 41.9999,34.0001L 41.9999,28.0001 Z M 48.9998,21.0002L 54.9998,21.0002L 54.9998,27.0001L 48.9998,27.0001L 48.9998,21.0002 Z M 48.9998,28.0001L 54.9998,28.0001L 54.9998,34.0001L 48.9998,34.0001L 48.9998,28.0001 Z M 27.9999,21.0002L 33.9999,21.0002L 33.9999,27.0001L 27.9999,27.0001L 27.9999,21.0002 Z M 27.9999,28.0001L 33.9999,28.0001L 33.9999,34.0001L 27.9999,34.0001L 27.9999,28.0001 Z M 34.9999,21.0001L 40.9999,21.0001L 40.9999,27.0001L 34.9999,27.0001L 34.9999,21.0001 Z M 34.9999,28.0001L 40.9999,28.0001L 40.9999,34L 34.9999,34L 34.9999,28.0001 Z M 41.9999,35.0001L 47.9999,35.0001L 47.9999,41.0001L 41.9999,41.0001L 41.9999,35.0001 Z M 28,35.0001L 34,35.0001L 34,41.0001L 28,41.0001L 28,35.0001 Z M 27.9999,42.0001L 33.9999,42.0001L 33.9999,48.0001L 27.9999,48.0001L 27.9999,42.0001 Z M 28,49.0001L 34,49.0001L 34,55L 28,55L 28,49.0001 Z M 35,35.0001L 40.9999,35.0001L 40.9999,41.0001L 35,41.0001L 35,35.0001 Z M 35,42.0001L 40.9999,42.0001L 40.9999,48.0001L 35,48.0001L 35,42.0001 Z M 21,21.0002L 26.9999,21.0002L 26.9999,27.0001L 21,27.0001L 21,21.0002 Z M 21,28.0001L 26.9999,28.0001L 26.9999,34.0001L 21,34.0001L 21,28.0001 Z M 21,35.0001L 27,35.0001L 27,41.0001L 21,41.0001L 21,35.0001 Z M 21,42.0001L 27,42.0001L 27,48.0001L 21,48.0001L 21,42.0001 Z M 21,49.0001L 27,49.0001L 27,55L 21,55L 21,49.0001 Z M 34.9999,49.0001L 40.9999,49.0001L 40.9999,55L 34.9999,55L 34.9999,49.0001 Z M 35.9999,50.0001L 35.9999,54.0001L 39.9999,54.0001L 39.9999,50.0001L 35.9999,50.0001 Z M 48.9999,35.0001L 54.9999,35.0001L 54.9999,41.0001L 48.9999,41.0001L 48.9999,35.0001 Z M 49.9999,36.0001L 49.9999,40.0001L 53.9999,40.0001L 53.9999,36.0001L 49.9999,36.0001 Z M 41.9999,42.0001L 47.9999,42.0001L 47.9999,48.0001L 41.9999,48.0001L 41.9999,42.0001 Z M 42.9999,43.0001L 42.9999,47.0001L 46.9999,47.0001L 46.9999,43.0001L 42.9999,43.0001 Z M 48.9999,42.0001L 54.9999,42.0001L 54.9999,48.0001L 48.9999,48.0001L 48.9999,42.0001 Z M 49.9999,43.0001L 49.9999,47.0001L 53.9999,47.0001L 53.9999,43.0001L 49.9999,43.0001 Z M 41.9999,49.0001L 47.9999,49.0001L 47.9999,55L 41.9999,55L 41.9999,49.0001 Z M 42.9999,50.0001L 42.9999,54.0001L 46.9999,54.0001L 46.9999,50.0001L 42.9999,50.0001 Z M 48.9999,49.0001L 54.9999,49.0001L 54.9999,55L 48.9999,55L 48.9999,49.0001 Z M 49.9999,50.0001L 49.9999,54.0001L 53.9999,54.0001L 53.9999,50.0001L 49.9999,50.0001 Z M 22,22.0001L 22,26.0001L 26,26.0001L 26,22.0001L 22,22.0001 Z M 36,29.0001L 36,33.0001L 40,33.0001L 40,29.0001L 36,29.0001 Z M 29,29.0001L 29,33.0001L 33,33.0001L 33,29.0001L 29,29.0001 Z M 22,36L 22,40L 26,40L 26,36L 22,36 Z M 22,29.0001L 22,33.0001L 26,33.0001L 26,29.0001L 22,29.0001 Z M 42.9999,29.0001L 42.9999,33.0001L 46.9999,33.0001L 46.9999,29.0001L 42.9999,29.0001 Z M 49.9999,29.0001L 49.9999,33.0001L 53.9999,33.0001L 53.9999,29.0001L 49.9999,29.0001 Z M 29,22.0001L 29,26.0001L 33,26.0001L 33,22.0001L 29,22.0001 Z M 36,22.0001L 36,26.0001L 40,26.0001L 40,22.0001L 36,22.0001 Z M 29,36L 29,40L 33,40L 33,36L 29,36 Z M 22,43L 22,47L 26,47L 26,43L 22,43 Z M 29,43L 29,47L 33,47L 33,43L 29,43 Z M 36,43L 36,47L 40,47L 40,43L 36,43 Z M 22,50L 22,54L 26,54L 26,50L 22,50 Z M 29,50L 29,54L 33,54L 33,50L 29,50 Z M 43,22L 43,26L 47,26L 47,22L 43,22 Z M 50,22L 50,26L 54,26L 54,22L 50,22 Z M 43,36L 43,40L 47,40L 47,36L 43,36 Z M 36,36L 36,40L 40,40L 40,36L 36,36 Z "/>
|
|
</ToggleButton>
|
|
</ToolBar>
|
|
</ToolBarTray>
|
|
<DockPanel>
|
|
<Border DockPanel.Dock="Right" Width="250"
|
|
BorderThickness="1,0,0,0"
|
|
BorderBrush="Black"
|
|
Visibility="{Binding ElementName=memoryVisible, Path=IsChecked, Converter={StaticResource btv}}">
|
|
<DockPanel>
|
|
<Label DockPanel.Dock="Top" Content="System Memory"/>
|
|
<DataGrid ItemsSource="{Binding Path=Memory}" AutoGenerateColumns="False">
|
|
<DataGrid.Resources>
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="FontFamily" Value="Consolas" />
|
|
</Style>
|
|
</DataGrid.Resources>
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Header="" IsReadOnly="True" >
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Margin="0" Foreground="Gray" TextAlignment="Right" Text="{Binding Path=Offset}"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Header="+0" Binding="{Binding Path=D0}" />
|
|
<DataGridTextColumn Header="+1" Binding="{Binding Path=D1}" />
|
|
<DataGridTextColumn Header="+2" Binding="{Binding Path=D2}" />
|
|
<DataGridTextColumn Header="+3" Binding="{Binding Path=D3}" />
|
|
<DataGridTextColumn Header="+4" Binding="{Binding Path=D4}" />
|
|
<DataGridTextColumn Header="+5" Binding="{Binding Path=D5}" />
|
|
<DataGridTextColumn Header="+6" Binding="{Binding Path=D6}" />
|
|
<DataGridTextColumn Header="+7" Binding="{Binding Path=D7}" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</DockPanel>
|
|
</Border>
|
|
<Border DockPanel.Dock="Right" Width="200"
|
|
BorderThickness="1,0,0,0"
|
|
BorderBrush="Black"
|
|
Visibility="{Binding ElementName=outputVisible, Path=IsChecked, Converter={StaticResource btv}}">
|
|
<DockPanel>
|
|
<Label DockPanel.Dock="Top" Content="Output"/>
|
|
<TextBox
|
|
AcceptsTab="True"
|
|
AcceptsReturn="True"
|
|
FontFamily="Consolas"
|
|
VerticalContentAlignment="Top"
|
|
Text="{Binding Path=Output, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
|
</DockPanel>
|
|
</Border>
|
|
<Border DockPanel.Dock="Right" Width="200"
|
|
BorderThickness="1,0,0,0"
|
|
BorderBrush="Black"
|
|
Visibility="{Binding ElementName=cpuVisible, Path=IsChecked, Converter={StaticResource btv}}">
|
|
<DockPanel>
|
|
<Label DockPanel.Dock="Top" Content="CPU State"/>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.Resources>
|
|
<Style TargetType="TextBox">
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Label Grid.Row="0" Grid.Column="0" Content="Stack Pointer" />
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=StackPointer, UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<Label Grid.Row="1" Grid.Column="0" Content="Base Pointer" />
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=BasePointer, UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<Label Grid.Row="2" Grid.Column="0" Content="Code Pointer" />
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Path=CodePointer, UpdateSourceTrigger=PropertyChanged}"/>
|
|
|
|
<Label Grid.Row="3" Grid.Column="0" Content="Flags" />
|
|
<Grid Grid.Row="3" Grid.Column="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox Grid.Column="0" IsChecked="{Binding Path=FlagZ}" Content="Z"/>
|
|
<CheckBox Grid.Column="1" IsChecked="{Binding Path=FlagN}" Content="N"/>
|
|
</Grid>
|
|
|
|
<Label Grid.Row="4" Grid.Column="0" Content="Stack:" />
|
|
<ScrollViewer Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2">
|
|
<ItemsControl Grid.IsSharedSizeScope="True" ItemsSource="{Binding Path=Stack}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<DataTemplate.Resources>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Margin" Value="4,2" />
|
|
</Style>
|
|
</DataTemplate.Resources>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="A" />
|
|
<ColumnDefinition Width="1" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{Binding Path=Index}" />
|
|
<Border Grid.Column="1" Background="Black" />
|
|
<TextBox Grid.Column="2" HorizontalContentAlignment="Right" Text="{Binding Path=Value, UpdateSourceTrigger=PropertyChanged}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</DockPanel>
|
|
</Border>
|
|
<TabControl>
|
|
<TabItem Header="Assembler">
|
|
<local:CodeEditor
|
|
x:Name="codeEditor"
|
|
ShowLineNumbers="True"
|
|
FontFamily="Consolas"
|
|
Background="#222"
|
|
Foreground="#DDD"
|
|
FontSize="16"
|
|
Code="{Binding Path=Source, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</TabItem>
|
|
<TabItem Header="Code">
|
|
|
|
</TabItem>
|
|
</TabControl>
|
|
</DockPanel>
|
|
</DockPanel>
|
|
</Window>
|