char getChar static unsigned char const charAvail 0x01 volatile unsign

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
char getChar()
{
static unsigned char const charAvail = 0x01 ;
volatile unsigned char* pStatus = (unsigned char*)0x1234 ;
volatile char* pData = (char*)0x1230 ;
while ( (*pStatus & charAvail) == 0 ) {
}
return *pData ;
}