
volatile xdata char uip _at_ 10; // Are you sure that shouldn't be 0x10 ?

while( uip & 0x80 );