📄 com2test.c
字号:
/*===================================================================
!!! TEST the Bicommpulus capability of COM2 !!!
!!! The project must include COMMPLUS.C and CPLIB.LIB
=====================================================================*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <math.h>
#include <commplus.h>
#include <htlcd.h>
#include <time.h>
unsigned char m;
main(argc, argv)
int argc;
char *argv[];
{
unsigned char *b, *sts, byte;
char kch;
SetCommMode(_AUX_MODE+_mod_8D1P+_par_ODD, 1, 9600);\
EnableRx(0);
SelectPort(1);
do
{
mm: if (kbhit())
{
kch = getch();
goto ll;
}
else
goto mm;
ll: PutAuxByte(kch);
printf("have incom =%x\r\n ", kch);
} while (1);
/*
SelectPort(1);
DisableRx;
exit(0);
*/
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -