diff --git a/Trs80.Level1Basic.Command/Commands/ShutdownConsoleCommand.cs b/Trs80.Level1Basic.Command/Commands/ShutdownTrs80Command.cs
similarity index 100%
rename from Trs80.Level1Basic.Command/Commands/ShutdownConsoleCommand.cs
rename to Trs80.Level1Basic.Command/Commands/ShutdownTrs80Command.cs
diff --git a/Trs80.Level1Basic.CommandModels/ITrs80DataModel.cs b/Trs80.Level1Basic.CommandModels/ITrs80DataModel.cs
new file mode 100644
index 0000000..e09ae11
--- /dev/null
+++ b/Trs80.Level1Basic.CommandModels/ITrs80DataModel.cs
@@ -0,0 +1,8 @@
+using Trs80.Level1Basic.HostMachine;
+
+namespace Trs80.Level1Basic.CommandModels;
+
+public interface ITrs80DataModel
+{
+ HostFont OriginalHostFont { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.CommandModels/Trs80DataModel.cs b/Trs80.Level1Basic.CommandModels/Trs80DataModel.cs
index 585d8d2..f1c67fa 100644
--- a/Trs80.Level1Basic.CommandModels/Trs80DataModel.cs
+++ b/Trs80.Level1Basic.CommandModels/Trs80DataModel.cs
@@ -2,11 +2,6 @@
namespace Trs80.Level1Basic.CommandModels;
-public interface ITrs80DataModel
-{
- HostFont OriginalHostFont { get; set; }
-}
-
public class Trs80DataModel : ITrs80DataModel
{
public HostFont OriginalHostFont { get; set; } = new();
diff --git a/Trs80.Level1Basic.Common/AppSettings.cs b/Trs80.Level1Basic.Common/AppSettings.cs
index 17a3e0c..56cd6d5 100644
--- a/Trs80.Level1Basic.Common/AppSettings.cs
+++ b/Trs80.Level1Basic.Common/AppSettings.cs
@@ -1,12 +1,6 @@
namespace Trs80.Level1Basic.Common;
-public interface IAppSettings
-{
- string FontName { get; set; }
- short FontSize { get; set; }
-}
-
public sealed class AppSettings : IAppSettings
{
public string FontName { get; set; }
diff --git a/Trs80.Level1Basic.Common/IAppSettings.cs b/Trs80.Level1Basic.Common/IAppSettings.cs
new file mode 100644
index 0000000..798a885
--- /dev/null
+++ b/Trs80.Level1Basic.Common/IAppSettings.cs
@@ -0,0 +1,7 @@
+namespace Trs80.Level1Basic.Common;
+
+public interface IAppSettings
+{
+ string FontName { get; set; }
+ short FontSize { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test.csproj b/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test.csproj
deleted file mode 100644
index f72bee8..0000000
--- a/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- net6.0
- enable
-
- false
-
-
-
-
-
-
-
-
-
-
diff --git a/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/UnitTest1.cs b/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/UnitTest1.cs
deleted file mode 100644
index b296978..0000000
--- a/Trs80.Level1Basic.Environment.Test/Trs80.Lewel1Basic.Environment.Test/UnitTest1.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Trs80.Level1Basic.Environment.Test
-{
- [TestClass]
- public class UnitTest1
- {
- [TestMethod]
- public void TestMethod1()
- {
- }
- }
-}
diff --git a/Trs80.Level1Basic.HostMachine/FontInfo.cs b/Trs80.Level1Basic.HostMachine/FontInfo.cs
new file mode 100644
index 0000000..c9f3722
--- /dev/null
+++ b/Trs80.Level1Basic.HostMachine/FontInfo.cs
@@ -0,0 +1,16 @@
+using System.Runtime.InteropServices;
+
+namespace Trs80.Level1Basic.HostMachine;
+
+[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
+public struct FontInfo
+{
+ public int cbSize;
+ public int FontIndex;
+ public short FontWidth;
+ public short FontSize;
+ public int FontFamily;
+ public int FontWeight;
+ [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
+ public string FontName;
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.HostMachine/Host.cs b/Trs80.Level1Basic.HostMachine/Host.cs
index 8343167..18d4661 100644
--- a/Trs80.Level1Basic.HostMachine/Host.cs
+++ b/Trs80.Level1Basic.HostMachine/Host.cs
@@ -10,30 +10,6 @@
namespace Trs80.Level1Basic.HostMachine;
-[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
-public struct FontInfo
-{
- public int cbSize;
- public int FontIndex;
- public short FontWidth;
- public short FontSize;
- public int FontFamily;
- public int FontWeight;
- [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
- public string FontName;
-}
-
-[StructLayout(LayoutKind.Sequential)]
-public struct Rect
-{
- public int Left; // x position of upper-left corner
- public int Top; // y position of upper-left corner
- public int Right; // x position of lower-right corner
- public int Bottom; // y position of lower-right corner
-}
-
-
-
public class Host : IHost, IDisposable
{
// https://www.pinvoke.net/default.aspx/user32/FindWindow.html
diff --git a/Trs80.Level1Basic.HostMachine/Rect.cs b/Trs80.Level1Basic.HostMachine/Rect.cs
new file mode 100644
index 0000000..22a53e9
--- /dev/null
+++ b/Trs80.Level1Basic.HostMachine/Rect.cs
@@ -0,0 +1,12 @@
+using System.Runtime.InteropServices;
+
+namespace Trs80.Level1Basic.HostMachine;
+
+[StructLayout(LayoutKind.Sequential)]
+public struct Rect
+{
+ public int Left; // x position of upper-left corner
+ public int Top; // y position of upper-left corner
+ public int Right; // x position of lower-right corner
+ public int Bottom; // y position of lower-right corner
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Interpreter.Test/FlowConrolTest.cs b/Trs80.Level1Basic.Interpreter.Test/FlowControlTest.cs
similarity index 100%
rename from Trs80.Level1Basic.Interpreter.Test/FlowConrolTest.cs
rename to Trs80.Level1Basic.Interpreter.Test/FlowControlTest.cs
diff --git a/Trs80.Level1Basic.VirtualMachine/Interpreter/Interpreter.cs b/Trs80.Level1Basic.VirtualMachine/Interpreter/Interpreter.cs
index e814a0a..4921d2a 100644
--- a/Trs80.Level1Basic.VirtualMachine/Interpreter/Interpreter.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Interpreter/Interpreter.cs
@@ -650,7 +650,8 @@ private void ExecuteGosub(IStatement jumpToStatement, IStatement resumeStatement
public Void VisitPrintStatement(Print statement)
{
- if (statement.AtPosition != null) PrintAt(statement.AtPosition);
+ if (statement.AtPosition != null)
+ PrintAt(statement.AtPosition);
if (statement.Expressions is { Count: > 0 })
foreach (Expression expression in statement.Expressions)
@@ -661,6 +662,7 @@ public Void VisitPrintStatement(Print statement)
_trs80.WriteLine();
_machine.CursorX = 0;
_machine.CursorY++;
+
return null!;
}
diff --git a/Trs80.Level1Basic.VirtualMachine/Machine/Callable.cs b/Trs80.Level1Basic.VirtualMachine/Machine/Callable.cs
index 417cc30..cf08083 100644
--- a/Trs80.Level1Basic.VirtualMachine/Machine/Callable.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Machine/Callable.cs
@@ -3,12 +3,6 @@
namespace Trs80.Level1Basic.VirtualMachine.Machine;
-public interface ICallable
-{
- int Arity { get; set; }
- Func, dynamic> Call { get; set; }
-}
-
public class Callable : ICallable
{
public int Arity { get; set; }
diff --git a/Trs80.Level1Basic.VirtualMachine/Machine/ICallable.cs b/Trs80.Level1Basic.VirtualMachine/Machine/ICallable.cs
new file mode 100644
index 0000000..d658d2d
--- /dev/null
+++ b/Trs80.Level1Basic.VirtualMachine/Machine/ICallable.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+
+namespace Trs80.Level1Basic.VirtualMachine.Machine;
+
+public interface ICallable
+{
+ int Arity { get; set; }
+ Func, dynamic> Call { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.VirtualMachine/Machine/INativeFunctions.cs b/Trs80.Level1Basic.VirtualMachine/Machine/INativeFunctions.cs
new file mode 100644
index 0000000..1afc943
--- /dev/null
+++ b/Trs80.Level1Basic.VirtualMachine/Machine/INativeFunctions.cs
@@ -0,0 +1,8 @@
+using System.Collections.Generic;
+
+namespace Trs80.Level1Basic.VirtualMachine.Machine;
+
+public interface INativeFunctions
+{
+ List Get(string name);
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.VirtualMachine/Machine/NativeFunctions.cs b/Trs80.Level1Basic.VirtualMachine/Machine/NativeFunctions.cs
index 211f6e7..b920ed6 100644
--- a/Trs80.Level1Basic.VirtualMachine/Machine/NativeFunctions.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Machine/NativeFunctions.cs
@@ -3,11 +3,6 @@
namespace Trs80.Level1Basic.VirtualMachine.Machine;
-public interface INativeFunctions
-{
- List Get(string name);
-}
-
[SuppressMessage("ReSharper", "UnusedParameter.Local")]
public class NativeFunctions : INativeFunctions
{
diff --git a/Trs80.Level1Basic.VirtualMachine/Parser/IParser.cs b/Trs80.Level1Basic.VirtualMachine/Parser/IParser.cs
new file mode 100644
index 0000000..c9956cc
--- /dev/null
+++ b/Trs80.Level1Basic.VirtualMachine/Parser/IParser.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using Trs80.Level1Basic.VirtualMachine.Parser.Statements;
+using Trs80.Level1Basic.VirtualMachine.Scanner;
+
+namespace Trs80.Level1Basic.VirtualMachine.Parser;
+
+public interface IParser
+{
+ IStatement Parse(List tokens);
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.VirtualMachine/Parser/Parser.cs b/Trs80.Level1Basic.VirtualMachine/Parser/Parser.cs
index 0e6c38e..15c2437 100644
--- a/Trs80.Level1Basic.VirtualMachine/Parser/Parser.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Parser/Parser.cs
@@ -12,11 +12,6 @@
namespace Trs80.Level1Basic.VirtualMachine.Parser;
-public interface IParser
-{
- IStatement Parse(List tokens);
-}
-
public class Parser : IParser
{
private List _tokens;
diff --git a/Trs80.Level1Basic.VirtualMachine/Parser/Statements/IListStatementDecorator.cs b/Trs80.Level1Basic.VirtualMachine/Parser/Statements/IListStatementDecorator.cs
new file mode 100644
index 0000000..5bf5e4c
--- /dev/null
+++ b/Trs80.Level1Basic.VirtualMachine/Parser/Statements/IListStatementDecorator.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace Trs80.Level1Basic.VirtualMachine.Parser.Statements;
+
+public interface IListStatementDecorator : IStatement
+{
+ public Type BaseType();
+ public IStatement UnDecorate();
+
+ IStatement Enclosing { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.VirtualMachine/Parser/Statements/ListStatementDecorator.cs b/Trs80.Level1Basic.VirtualMachine/Parser/Statements/ListStatementDecorator.cs
index c2a8141..7f55460 100644
--- a/Trs80.Level1Basic.VirtualMachine/Parser/Statements/ListStatementDecorator.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Parser/Statements/ListStatementDecorator.cs
@@ -2,14 +2,6 @@
namespace Trs80.Level1Basic.VirtualMachine.Parser.Statements;
-public interface IListStatementDecorator : IStatement
-{
- public Type BaseType();
- public IStatement UnDecorate();
-
- IStatement Enclosing { get; set; }
-}
-
public class ListStatementDecorator : IListStatementDecorator
{
private readonly IStatement _statement;
diff --git a/Trs80.Level1Basic.VirtualMachine/Scanner/IScanner.cs b/Trs80.Level1Basic.VirtualMachine/Scanner/IScanner.cs
new file mode 100644
index 0000000..23b9494
--- /dev/null
+++ b/Trs80.Level1Basic.VirtualMachine/Scanner/IScanner.cs
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+using Trs80.Level1Basic.Common;
+
+namespace Trs80.Level1Basic.VirtualMachine.Scanner;
+
+public interface IScanner
+{
+ List ScanTokens(SourceLine source);
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.VirtualMachine/Scanner/Scanner.cs b/Trs80.Level1Basic.VirtualMachine/Scanner/Scanner.cs
index 598608b..8d67cae 100644
--- a/Trs80.Level1Basic.VirtualMachine/Scanner/Scanner.cs
+++ b/Trs80.Level1Basic.VirtualMachine/Scanner/Scanner.cs
@@ -6,11 +6,6 @@
namespace Trs80.Level1Basic.VirtualMachine.Scanner;
-public interface IScanner
-{
- List ScanTokens(SourceLine source);
-}
-
public class Scanner : IScanner
{
private string _source;
diff --git a/Trs80.Level1Basic.Workflow/IInputStep.cs b/Trs80.Level1Basic.Workflow/IInputStep.cs
new file mode 100644
index 0000000..ba7e9ae
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/IInputStep.cs
@@ -0,0 +1,11 @@
+using Trs80.Level1Basic.Common;
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface IInputStep : IStepBody
+{
+ bool WritePrompt { get; set; }
+ bool Done { get; set; }
+ SourceLine SourceLine { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/IInterpretStep.cs b/Trs80.Level1Basic.Workflow/IInterpretStep.cs
new file mode 100644
index 0000000..5f91a9c
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/IInterpretStep.cs
@@ -0,0 +1,9 @@
+using Trs80.Level1Basic.VirtualMachine.Parser.Statements;
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface IInterpretStep : IStepBody
+{
+ Statement Statement { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/IParseStep.cs b/Trs80.Level1Basic.Workflow/IParseStep.cs
new file mode 100644
index 0000000..e806c06
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/IParseStep.cs
@@ -0,0 +1,11 @@
+using Trs80.Level1Basic.VirtualMachine.Parser.Statements;
+using Trs80.Level1Basic.VirtualMachine.Scanner;
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface IParseStep : IStepBody
+{
+ List Tokens { get; set; }
+ IStatement Statement { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/IScanStep.cs b/Trs80.Level1Basic.Workflow/IScanStep.cs
new file mode 100644
index 0000000..1e4085c
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/IScanStep.cs
@@ -0,0 +1,11 @@
+using Trs80.Level1Basic.Common;
+using Trs80.Level1Basic.VirtualMachine.Scanner;
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface IScanStep : IStepBody
+{
+ SourceLine SourceLine { get; set; }
+ List Tokens { get; set; }
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/ISetupConsoleStep.cs b/Trs80.Level1Basic.Workflow/ISetupConsoleStep.cs
new file mode 100644
index 0000000..354a01d
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/ISetupConsoleStep.cs
@@ -0,0 +1,7 @@
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface ISetupConsoleStep : IStepBody
+{
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/IShutdownConsoleStep.cs b/Trs80.Level1Basic.Workflow/IShutdownConsoleStep.cs
new file mode 100644
index 0000000..c3cd854
--- /dev/null
+++ b/Trs80.Level1Basic.Workflow/IShutdownConsoleStep.cs
@@ -0,0 +1,7 @@
+using WorkflowCore.Interface;
+
+namespace Trs80.Level1Basic.Workflow;
+
+public interface IShutdownConsoleStep : IStepBody
+{
+}
\ No newline at end of file
diff --git a/Trs80.Level1Basic.Workflow/InputStep.cs b/Trs80.Level1Basic.Workflow/InputStep.cs
index 698963a..7c64c70 100644
--- a/Trs80.Level1Basic.Workflow/InputStep.cs
+++ b/Trs80.Level1Basic.Workflow/InputStep.cs
@@ -6,13 +6,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface IInputStep : IStepBody
-{
- bool WritePrompt { get; set; }
- bool Done { get; set; }
- SourceLine SourceLine { get; set; }
-}
-
public class InputStep : StepBody, IInputStep
{
private readonly ICommand _command;
diff --git a/Trs80.Level1Basic.Workflow/InterpretStep.cs b/Trs80.Level1Basic.Workflow/InterpretStep.cs
index 82edb58..eff9da4 100644
--- a/Trs80.Level1Basic.Workflow/InterpretStep.cs
+++ b/Trs80.Level1Basic.Workflow/InterpretStep.cs
@@ -6,11 +6,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface IInterpretStep : IStepBody
-{
- Statement Statement { get; set; }
-}
-
public class InterpretStep : StepBody, IInterpretStep
{
private readonly ICommand _command;
diff --git a/Trs80.Level1Basic.Workflow/ParseStep.cs b/Trs80.Level1Basic.Workflow/ParseStep.cs
index b8fc96e..cca8079 100644
--- a/Trs80.Level1Basic.Workflow/ParseStep.cs
+++ b/Trs80.Level1Basic.Workflow/ParseStep.cs
@@ -8,12 +8,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface IParseStep : IStepBody
-{
- List Tokens { get; set; }
- IStatement Statement { get; set; }
-}
-
public class ParseStep : StepBody, IParseStep
{
private readonly ICommand _command;
diff --git a/Trs80.Level1Basic.Workflow/ScanStep.cs b/Trs80.Level1Basic.Workflow/ScanStep.cs
index 6b30a81..6e5bbcb 100644
--- a/Trs80.Level1Basic.Workflow/ScanStep.cs
+++ b/Trs80.Level1Basic.Workflow/ScanStep.cs
@@ -7,12 +7,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface IScanStep : IStepBody
-{
- SourceLine SourceLine { get; set; }
- List Tokens { get; set; }
-}
-
public class ScanStep : StepBody, IScanStep
{
private readonly ICommand _command;
diff --git a/Trs80.Level1Basic.Workflow/SetupConsoleStep.cs b/Trs80.Level1Basic.Workflow/SetupConsoleStep.cs
index a793d62..0ad3c8a 100644
--- a/Trs80.Level1Basic.Workflow/SetupConsoleStep.cs
+++ b/Trs80.Level1Basic.Workflow/SetupConsoleStep.cs
@@ -6,10 +6,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface ISetupConsoleStep : IStepBody
-{
-}
-
public class SetupConsoleStep : StepBody, ISetupConsoleStep
{
private readonly ICommand _command;
diff --git a/Trs80.Level1Basic.Workflow/ShutdownConsoleStep.cs b/Trs80.Level1Basic.Workflow/ShutdownConsoleStep.cs
index 55bcdfb..8794335 100644
--- a/Trs80.Level1Basic.Workflow/ShutdownConsoleStep.cs
+++ b/Trs80.Level1Basic.Workflow/ShutdownConsoleStep.cs
@@ -6,10 +6,6 @@
namespace Trs80.Level1Basic.Workflow;
-public interface IShutdownConsoleStep : IStepBody
-{
-}
-
public class ShutdownConsoleStep : StepBody, IShutdownConsoleStep
{
private readonly ICommand _command;