fix up simple example
[fw/sdcc] / device / examples / mcs51 / simple2 / hi.c
index 06f34004903e4ee7a02fa23e323837208d64ca93..241a6ad63a403d1d672639f710ce8c72a7a827ab 100644 (file)
@@ -30,10 +30,10 @@ data byte lbuf[12];  // this is our line buffer, chars gather here till CR seen
 |------------------------------------------------------------------------*/
 void tx_char(char c)
 {
+  SBUF = c;
   while (!TI)
     ;
   TI = 0;
-  SBUF = c;
 }
 
 /*------------------------------------------------------------------------