Z
zhangzaimin
Unregistered / Unconfirmed
GUEST, unregistred user!
我在主板的ISA口上插了块数据采集卡,想从中获取数据,其用C语言写的采集程序如下:
那位大哥帮我个忙,怎么在WIN2000下译成DELPHI程序,急着用啊先行谢过了!!!!!
int ad75()
{
int wh,qh,bw,sw,sw;
int ad,fh;
inp(0X240);
delay(3);
inp(0X241);
do
{
wh=inp(0X244);
}while((wh&0X08)==0X08);
delay(300);
sw=wh&0X01;
qh=inp(0X243);gw=inp(0X242);fh=wh&0X02;
if ((wh&0X04)==0X04)
{
if (fh==0X00) return(-19999);
else return(19999);
}
ad=sw*10000+qh/16*1000+(qh-qh/16*16)*100+gw/16*10+gw-gw/16*16;
return(ad);
}
那位大哥帮我个忙,怎么在WIN2000下译成DELPHI程序,急着用啊先行谢过了!!!!!
int ad75()
{
int wh,qh,bw,sw,sw;
int ad,fh;
inp(0X240);
delay(3);
inp(0X241);
do
{
wh=inp(0X244);
}while((wh&0X08)==0X08);
delay(300);
sw=wh&0X01;
qh=inp(0X243);gw=inp(0X242);fh=wh&0X02;
if ((wh&0X04)==0X04)
{
if (fh==0X00) return(-19999);
else return(19999);
}
ad=sw*10000+qh/16*1000+(qh-qh/16*16)*100+gw/16*10+gw-gw/16*16;
return(ad);
}