1 2 3 4 5 6 7 8 9 10 11 12 13 14
pub struct Core { pc: u16, } impl Core { pub fn new() -> Self { Core { pc: 0 } } pub fn step(&mut self) -> u16 { self.pc += 1; self.pc } }