fn fetch(&mut self) {
		// fetch two bytes from PC
		let byte_1 = self.mem[(self.ip+0) as usize];
		let byte_2 = self.mem[(self.ip+1) as usize];

		self.ir  = ((byte_1 as u16) << 8) | (byte_2 as u16); // load byets into IR
		self.ip += 2;                                      // increment instruction pointer

		debug!("IR set to 0x{:04X} ({:02X},{:02X})", self.ir, byte_1, byte_2)
	}
/// Load the instruction at `IP` and advance the pointer by two bytes.
/// The instruction is packed into a single `u16` and stored in the instruction register.
Load the instruction at `IP` and advance the pointer by two bytes.
The instruction is packed into a single `u16` and stored in the instruction register.
Load the instruction at ` IP ` and advance the pointer by two bytes . The instruction is packed into a single ` u16 ` and stored in the instruction register .
fn fetch(&mut self) {
		// fetch two bytes from PC
		let byte_1 = self.mem[(self.ip+0) as usize];
		let byte_2 = self.mem[(self.ip+1) as usize];
		self.ir  = ((byte_1 as u16) << 8) | (byte_2 as u16); // load byets into IR
		self.ip += 2;                                      // increment instruction pointer
		debug!("IR set to 0x{:04X} ({:02X},{:02X})", self.ir, byte_1, byte_2)
	}
fn fetch ( & mut self ) { // fetch two bytes from PC let byte_1 = self . mem [ ( self . ip + 0 ) as usize ] ; let byte_2 = self . mem [ ( self . ip + 1 ) as usize ] ; self . ir = ( ( byte_1 as u16 ) << 8 ) | ( byte_2 as u16 ) ; // load byets into IR self . ip += 2 ; // increment instruction pointer debug ! ( " " self ir byte_1 byte_2 ) }
Load the instruction at `IP` and advance the pointer by two bytes.
Load the instruction at ` IP ` and advance the pointer by two bytes .
&mut self