Chapter 9 Communication
ASDA-A2R Series
9-14
Revision December, 2014
<8,O,1>
=
0BH
*/
for( I = 0; I<=16; I++ ) {
while( !(inportb(PORT+LSR) & 0x20) ); /* wait until THR empty */
outportb(PORT+THR,tdat[I]);
/* send data to THR */
}
I = 0;
while( !kbhit() ) {
if( inportb(PORT+LSR)&0x01 ) { /* b0==1, read data ready */
rdat[I++] = inportb(PORT+RDR); /* read data from RDR */
}
}
}