Fixes wrong filename beeing read.

This commit is contained in:
Felix Queißner 2016-05-21 12:45:47 +02:00
parent fec40a26c3
commit 51b091fb88
2 changed files with 3 additions and 2 deletions

1
prototypes/supervm-asm/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.bin

View file

@ -14,12 +14,12 @@ namespace supervm_asm
static void Main(string[] args) static void Main(string[] args)
{ {
// MnemonicParser.GenerateFromDocumentation(@"D:\felix\projects\DasOS\prototypes\supervm\instructions.md"); // MnemonicParser.GenerateFromDocumentation(@"../supervm/instructions.md");
foreach(var file in args.Where(a => !a.StartsWith("-") && Path.GetExtension(a) == ".asm")) foreach(var file in args.Where(a => !a.StartsWith("-") && Path.GetExtension(a) == ".asm"))
{ {
var output = Path.ChangeExtension(file, ".bin"); var output = Path.ChangeExtension(file, ".bin");
var code = Assembler.Assemble(File.ReadAllText("testcode.asm")); var code = Assembler.Assemble(File.ReadAllText(file));
Console.WriteLine("{0}:", output); Console.WriteLine("{0}:", output);
for (int i = 0; i < code.Length; i++) for (int i = 0; i < code.Length; i++)