unsigned char a_byte, carry;

// ...
// here we need to do something like RLC a_byte
if (a_byte & 0x80)
{
  a_byte = (a_byte << 1) | (carry ? 1 : 0);
  carry = 1;
}
else
{
  a_byte = (a_byte << 1) | (carry ? 1 : 0);
  carry = 0;
}