int16 n,i,t;
int t0,p;
const int pasos[4]={0b00000100,0b00001000,0b00010000,0b00100000};
void Derecha(n)
{
for (i=0;i!=n;i++)
{
OUTPUT_B(pasos[p]);
Delay_ms(t);
OUTPUT_B(0);
Delay_us(t0);
p++;
if(p>3)
{
p=0;
}
}
}inline void writePortBPins(int newValue , int mask)
{
output_b(((input_b() ^ newValue) & mask) ^ newValue);
}