Fixes wrong filename beeing read.
This commit is contained in:
parent
fec40a26c3
commit
51b091fb88
2 changed files with 3 additions and 2 deletions
1
prototypes/supervm-asm/.gitignore
vendored
Normal file
1
prototypes/supervm-asm/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.bin
|
|
@ -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++)
|
||||||
|
|
Loading…
Reference in a new issue