Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / ports / mcs51-common / support.c
blobcb78a72cda5fec95c0123d6addc6bc9ececdc004
1 /* define UART sfr only */
2 __sbit __at(0x98+1) TI;
3 __sfr __at(0x99) SBUF;
5 /* assume P1 for bankswitching address lines */
6 __sfr __at(0x90) PSBANK;
8 unsigned char
9 __sdcc_external_startup (void) __nonbanked
11 /* serial port mode 0 is default */
12 /* enable transmission of first byte */
13 TI = 1;
14 return 0;
17 void
18 _putchar (char c)
20 (* (volatile char __xdata *) 0x7654)= 'p';
21 (* (volatile char __xdata *) 0x7654)= c;
22 return;
23 while (!TI)
25 TI = 0;
26 SBUF = c;
29 void
30 _initEmu (void)
34 void
35 _exitEmu (void)
37 //while (!TI) /* wait for the last character to be transmitted */
38 // ; /* before hitting the breakpoint */
39 * (char __idata *) 0 = * (char __xdata *) 0x7654;
40 (* (volatile char __xdata *) 0x7654)= 's';