From ade88faa0b093629b635e7641cee1a5a6a6f0253 Mon Sep 17 00:00:00 2001 From: Persson-dev Date: Tue, 10 Dec 2024 18:06:23 +0100 Subject: [PATCH] fix load and store --- src/Assembleur.cpp | 10 +++++----- src/Assembleur.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Assembleur.cpp b/src/Assembleur.cpp index 728b09c..61c3a8a 100644 --- a/src/Assembleur.cpp +++ b/src/Assembleur.cpp @@ -91,8 +91,8 @@ std::uint32_t Assembleur::ParseJump(Instruction a_Instruction) { return IToInt(a_Instruction); } -std::uint32_t Assembleur::ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2, std::uint32_t a_R3) { - return IToInt(a_Instruction) | a_R1 << 23 | a_R2 << 20 | a_R3 << 17; +std::uint32_t Assembleur::ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2) { + return IToInt(a_Instruction) | a_R1 << 23 | a_R2 << 20; } @@ -146,9 +146,9 @@ std::uint32_t Assembleur::ParseInstruction(const std::string& a_Str, std::uint32 } case Memoire: { - std::string R1, R2, R3; - ss >> R1 >> R2 >> R3; - return ParseIO(instruction, ParseRegistry(R1), ParseRegistry(R2), ParseRegistry(R3)); + std::string R1, R2; + ss >> R1 >> R2; + return ParseIO(instruction, ParseRegistry(R1), ParseRegistry(R2)); } case SautControle: { diff --git a/src/Assembleur.h b/src/Assembleur.h index bcff02f..4685005 100644 --- a/src/Assembleur.h +++ b/src/Assembleur.h @@ -39,5 +39,5 @@ class Assembleur { std::uint32_t ParseJump(Instruction a_Instruction); - std::uint32_t ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2, std::uint32_t a_R3); + std::uint32_t ParseIO(Instruction a_Instruction, std::uint32_t a_R1, std::uint32_t a_R2); }; \ No newline at end of file