pub fn fetch(&mut self) -> u16 {
        match (self.memory.get(self.pc as usize), self.memory.get((self.pc + 1) as usize)) {
            (Some(&b1), Some(&b2)) => {
                self.pc += 2; // Increment pc
                ((b1 as u16) << 8) | b2 as u16 // Return the two fetched bytes
            },
            (_, _) => panic!("Couldn't fetch two bytes at program counter !")
        }
    }
/// Fetch the two succeeding bytes at pc
Fetch the two succeeding bytes at pc
Fetch the two succeeding bytes at pc
pub fn fetch(&mut self) -> u16 {
        match (self.memory.get(self.pc as usize), self.memory.get((self.pc + 1) as usize)) {
            (Some(&b1), Some(&b2)) => {
                self.pc += 2; // Increment pc
                ((b1 as u16) << 8) | b2 as u16 // Return the two fetched bytes
            },
            (_, _) => panic!("Couldn't fetch two bytes at program counter !")
        }
    }
pub fn fetch ( & mut self ) -> u16 { match ( self . memory . get ( self . pc as usize ) , self . memory . get ( ( self . pc + 1 ) as usize ) ) { ( Some ( & b1 ) , Some ( & b2 ) ) => { self . pc += 2 ; // Increment pc ( ( b1 as u16 ) << 8 ) | b2 as u16 // Return the two fetched bytes } , ( _ , _ ) => panic ! ( " " ) } }
Fetch the two succeeding bytes at pc
Fetch the two succeeding bytes at pc
&mut self
&mut self