diff --git a/src/cpu.rs b/src/cpu.rs index 8ae2231..77d307b 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -441,13 +441,13 @@ impl Display for Flags { impl From for u8 { fn from(flags: Flags) -> Self { - flags.0 + flags.0 & 0xF0 } } impl From for Flags { fn from(byte: u8) -> Self { - Self(byte) + Self(byte & 0xF0) } }