From b810ce5843e110d2f3e67bf4ce07759ce3a77db0 Mon Sep 17 00:00:00 2001 From: GalaxyShad Date: Mon, 13 May 2024 00:15:25 +0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20print=20errors=20to=20stderr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SomeAsmTranslator/Program.cs | 4 ++-- SomeAsmTranslator/Source/Assembler.cs | 4 ++-- SomeAsmTranslator/TestData/1.asm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SomeAsmTranslator/Program.cs b/SomeAsmTranslator/Program.cs index 174d58d..bcb0ea8 100644 --- a/SomeAsmTranslator/Program.cs +++ b/SomeAsmTranslator/Program.cs @@ -9,7 +9,7 @@ namespace I8080Translator; partial class Program { - static private readonly ListingGenerator _listingGenerator = new(); + private static readonly ListingGenerator _listingGenerator = new(); static void Main(string[] args) { @@ -59,7 +59,7 @@ static void RunOptions(ArgumentsOptions opts) } catch (Exception ex) { - Console.WriteLine(ex.Message); + Console.Error.WriteLine(ex.Message); } #endif } diff --git a/SomeAsmTranslator/Source/Assembler.cs b/SomeAsmTranslator/Source/Assembler.cs index b6de1ea..7c19ead 100644 --- a/SomeAsmTranslator/Source/Assembler.cs +++ b/SomeAsmTranslator/Source/Assembler.cs @@ -298,9 +298,9 @@ private AssembledAssemblyStatement CompileInstruction(AssemblyStatement statemen } var instructionArgs = new List(); - foreach (var (CompilerFunction, Operand) in instructionParamInfo.Zip(statement.OperandList.Operands)) + foreach (var (compilerFunction, operand) in instructionParamInfo.Zip(statement.OperandList.Operands)) { - ConvertOperandsToInstructionData(assembled, instructionArgs, CompilerFunction, Operand); + ConvertOperandsToInstructionData(assembled, instructionArgs, compilerFunction, operand); } uint code = (uint)instruction.Invoke(_instructionTranslator, instructionArgs.ToArray())!; diff --git a/SomeAsmTranslator/TestData/1.asm b/SomeAsmTranslator/TestData/1.asm index b0f88a5..b4be8a9 100644 --- a/SomeAsmTranslator/TestData/1.asm +++ b/SomeAsmTranslator/TestData/1.asm @@ -1 +1 @@ -DW 1234H \ No newline at end of file +DW 1234Hs \ No newline at end of file