Appendix
COM-2(PC)F54
Sample Program 10
[Data transmission and reception (COM1, COM2 mode)]
Sample program 10 uses the bios_serialcom( ) function for MS-C.
It first receives the data transmitted from COM1, and then receives
the data at COM1 transmitted from COM2. Received data is
displayed on the CRT.
1
COM1
Initialization
1
COM2
Initialization
Transmit 1-byte
Data from COM1
START
END
No
Yes
No
COM2 status check
ready to receive?
Yes
COM1
Initialization
COM2
Initialization
Transmit 1-byte
Data from COM2
No
Yes
COM1
Data Reception
No
Yes
COM2
Data Reception
Data reception A to K
from COM1 completed?
COM1 status check
ready to receive?
Data reception a to k
from COM2 completed?
Figure 6.12. Flowchart of Sample Program10