pub(crate) fn rnd_vx_byte(&mut self, optcode: u16) {
        debug!("RNDVxByte => {:#X} - done", optcode);
        let rnd: u8 = rand::thread_rng().gen_range(0, 255).into();
        let (_vx, _byte) = vx_byte!(optcode);
        self.v[_vx] = rnd & _byte;
        self.pc += 2;
        //self.quit = true;
    }
/// Cxkk - RND Vx, byte
/// Set Vx = random byte AND kk.
/// The interpreter generates a random number from 0 to 255, which is then ANDed with the value kk.
/// The results are stored in Vx. See instruction 8xy2 for more information on AND.
RND Vx, byte
Set Vx = random byte AND kk.
The interpreter generates a random number from 0 to 255, which is then ANDed with the value kk.
The results are stored in Vx. See instruction 8xy2 for more information on AND.
RND Vx byte Set Vx = random byte AND kk . The interpreter generates a random number from 0 to 255 which is then ANDed with the value kk . The results are stored in Vx . See instruction 8xy2 for more information on AND .
pub(crate) fn rnd_vx_byte(&mut self, optcode: u16) {
        debug!("RNDVxByte => {:#X} - done", optcode);
        let rnd: u8 = rand::thread_rng().gen_range(0, 255).into();
        let (_vx, _byte) = vx_byte!(optcode);
        self.v[_vx] = rnd & _byte;
        self.pc += 2;
        //self.quit = true;
    }
pub ( crate ) fn rnd_vx_byte ( & mut self , optcode : u16 ) { debug ! ( " " optcode ) ; let rnd : u8 = rand :: thread_rng ( ) . gen_range ( 0 , 255 ) . into ( ) ; let ( _vx , _byte ) = vx_byte ! ( optcode ) ; self . v [ _vx ] = rnd & _byte ; self . pc += 2 ; //self.quit = true; }
Cxkk - RND Vx, byte
Set Vx = random byte AND kk.
Cxkk - RND Vx byte Set Vx = random byte AND kk .
&mut self
optcode
u16
&mut self
optcode
u16