com2test.c
来自「HT系列掌机部分功能测试程序(含源码)」· C语言 代码 · 共 45 行
C
45 行
/*===================================================================
!!! 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 + =
减小字号Ctrl + -
显示快捷键?