  /*SUB SBB SBI SUI*/
//if(byh == 9 || by == 0xd6 || by == 0xde)  {

 int sub_b_i(int by, int byl, int byh, float *lap)
 {
  int twos_compliment, borrow = 0;
  *lap = (byl == 6 || byl == 0xe) ? 7.0 / 3.0 : 4.0 / 3.0;
  if(byh == 9) {
	if(byl > 7) {
		byl -= 8;
		borrow = rf[7] ? 0xff : 0;
	}
	if(byl == 6)
		reg[6] = mhlr();
  }
  else {
	reg[byl = 6] = memr(++rpc);
	if(by == 0xde)
		borrow = rf[7] ? 0xff : 0;
  }

  twos_compliment = (( ~(reg[byl] | 0xff00) ) + 1) & 0xff;
  rf[3] = ( ((reg[7] & 0xf) + (borrow & 0xf) + (twos_compliment & 0xf)) > 0xf);

  reg[7] += borrow + twos_compliment;
  rf[7] = (reg[7] > 0xff);
  reg[7] &= 0xff;
  setrf(reg[7]);
  return(0);
 }

