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,