From 00b0d140ea90681709638073b296ccee60ee159d Mon Sep 17 00:00:00 2001
From: AnonymusRaccoon
Date: Thu, 13 Feb 2020 18:59:53 +0100
Subject: [PATCH] Solving a bug with the union
---
sources/CPU/CPU.hpp | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/sources/CPU/CPU.hpp b/sources/CPU/CPU.hpp
index f416468..cdbc757 100644
--- a/sources/CPU/CPU.hpp
+++ b/sources/CPU/CPU.hpp
@@ -76,22 +76,22 @@ namespace ComSquare::CPU
//! @brief The Processor status register;
union {
struct {
- //! @brief The Negative flag
- bool n : 1;
- //! @brief The oVerflow flag
- bool v : 1;
- //! @brief The accumulator and Memory width flag (in native mode only)
- bool m : 1;
- //! @brief The indeX register width flag (in native mode only) OR the Break flag (in emulation mode only)
- bool x_b : 1;
- //! @brief The Decimal mode flag
- bool d : 1;
- //! @brief The Interrupt request disable flag
- bool i : 1;
- //! @brief The Zero flag
- bool z : 1;
//! @brief The Carry flag
bool c : 1;
+ //! @brief The Zero flag
+ bool z : 1;
+ //! @brief The Interrupt request disable flag
+ bool i : 1;
+ //! @brief The Decimal mode flag
+ bool d : 1;
+ //! @brief The indeX register width flag (in native mode only) OR the Break flag (in emulation mode only)
+ bool x_b : 1;
+ //! @brief The accumulator and Memory width flag (in native mode only)
+ bool m : 1;
+ //! @brief The oVerflow flag
+ bool v : 1;
+ //! @brief The Negative flag
+ bool n : 1;
};
uint8_t flags;
} p;