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

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

  
楼 主:ymtdh 2003年7月10日19:54
 一个小通讯程序,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);
}
}


>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:连不上ftp,老古帮忙看一下怎么回事?

[下一篇主题]:小问题:什么是I/O得开漏