From 0c62364b80b5e0a13eebae369bd227b77b8645e2 Mon Sep 17 00:00:00 2001 From: darcy Date: Thu, 19 Dec 2024 09:07:07 +1100 Subject: [PATCH] feat: set cc to `Z` by default --- src/runtime.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime.rs b/src/runtime.rs index 02ef184..fa4ade6 100644 --- a/src/runtime.rs +++ b/src/runtime.rs @@ -49,12 +49,12 @@ pub(super) struct RunState { _psr: u16, } -#[derive(Clone, Copy)] +#[derive(Clone, Copy, Default)] pub(super) enum RunFlag { N = 0b100, + #[default] Z = 0b010, P = 0b001, - Uninit = 0b000, } impl RunEnvironment { @@ -118,7 +118,7 @@ impl RunEnvironment { mem: Box::new(mem), pc: orig as u16, reg: [0, 0, 0, 0, 0, 0, 0, 0xFDFF], - flag: RunFlag::Uninit, + flag: RunFlag::default(), _psr: 0, }, debugger: None,