⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 com2test.c

📁 HT系列掌机部分功能测试程序(含源码)
💻 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 + -