rewrite, its now a vm for a shitty subset of assembly
This commit is contained in:
+19
-9
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Core;
|
||||
@@ -10,19 +11,28 @@ namespace MathApp
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Operations ops = new Operations();
|
||||
Console.WriteLine("[MathLogger] System started!");
|
||||
while (true)
|
||||
string contents;
|
||||
if (args.Length > 0)
|
||||
{
|
||||
Console.WriteLine("[Input] Enter an equation, using the QuikMath format: ");
|
||||
string ipt = Console.ReadLine();
|
||||
if (ipt != "")
|
||||
contents = File.ReadAllText(args[1]);
|
||||
DebugDumper.GenerateDumpFile(contents, args[1] + "dump");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists("main.asm"))
|
||||
{
|
||||
float ot;
|
||||
ot = ops.EquParserLoop(ipt);
|
||||
Console.WriteLine($"[ValueOutBuffer] Result: {ot.ToString()}");
|
||||
contents = File.ReadAllText("main.asm");
|
||||
DebugDumper.GenerateDumpFile(contents, "main.asmdump");
|
||||
}
|
||||
else
|
||||
{
|
||||
contents = "";
|
||||
}
|
||||
}
|
||||
Operations ops = new Operations(409600);
|
||||
Console.WriteLine("[ASM] System started!");
|
||||
ops.EquParserLoop(contents);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user