fn sub(&mut self, reg1: u8, reg2: u8) 
	{
		let v1 = self.v[reg1 as usize];
		let v2 = self.v[reg2 as usize];

		self.v[0xF] = if v1 > v2 { 1 } else { 0 }; // !borrow flag to VF
		self.v[reg1 as usize] = v1.wrapping_sub(v2);		
	}
/// Set Vreg1 = Vreg1 - Vreg2, set VF = NOT borrow.
/// If Vreg1 > Vreg2, then VF is set to 1, otherwise 0. Then Vreg2 is subtracted from Vreg1, and the results stored in Vreg1.
Set Vreg1 = Vreg1 - Vreg2, set VF = NOT borrow.
If Vreg1 > Vreg2, then VF is set to 1, otherwise 0. Then Vreg2 is subtracted from Vreg1, and the results stored in Vreg1.
Set Vreg1 = Vreg1 - Vreg2 set VF = NOT borrow . If Vreg1 > Vreg2 then VF is set to 1 otherwise 0 . Then Vreg2 is subtracted from Vreg1 and the results stored in Vreg1 .
fn sub(&mut self, reg1: u8, reg2: u8) 
	{
		let v1 = self.v[reg1 as usize];
		let v2 = self.v[reg2 as usize];
		self.v[0xF] = if v1 > v2 { 1 } else { 0 }; // !borrow flag to VF
		self.v[reg1 as usize] = v1.wrapping_sub(v2);		
	}
fn sub ( & mut self , reg1 : u8 , reg2 : u8 ) { let v1 = self . v [ reg1 as usize ] ; let v2 = self . v [ reg2 as usize ] ; self . v [ 0xF ] = if v1 > v2 { 1 } else { 0 } ; // !borrow flag to VF self . v [ reg1 as usize ] = v1 . wrapping_sub ( v2 ) ; }
Set Vreg1 = Vreg1 - Vreg2, set VF = NOT borrow.
Set Vreg1 = Vreg1 - Vreg2 set VF = NOT borrow .
&mut self
reg1
u8
reg2
u8