导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→一个小通讯程序,DX帮忙看一下!

* 36703: 一个小通讯程序,DX帮忙看一下!

   ymtdh 
ymtdh发表的帖子 

 一个小通讯程序,DX帮忙看一下!
include  <stdio.h>  
#include  <dos.h>  
#include  <dir.h>  
#include  <string.h>  
#include  <conio.h>  
#include  <alloc.h>  
#include  <time.h>  
#include  <ctype.h>  
 void main()
{ time_t t1,t2;
 unsigned char st,st1,head;
outportb(0x2fb,0x80);
outportb(0x2f8,0x0c);
outportb(0x2f9,0x00);
outportb(0x2fb,0x03);

t1=time(NULL);
while(1)
{t2=time(NULL);
if(difftime(t2,t1)>  =2.00)
{printf("over time in jieshou()");
exit(0);
}
st1=inportb(0x2fd);
if((st1&0x01)!=0)
{
head=inportb(0x2f8);
break;
}
printf("the receive byte is %s\n",head);
}
}

发表时间:2003年7月10日19:54:00

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:怎么会连不上?可以呀。
[下一篇帖子]:is monitor 51 .