home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
DIGIPROG.ZIP
/
FCT6_2.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-29
|
870b
|
41 lines
#include <dos.h>
#include <stdio.h>
main()
{
struct REGPACK sregs;
int y,x,numbytes,dx,bnum;
char *type[] = {"COM/XI","MC/XI ","PC/Xe ","PC/Xi ","PC/Xm ","C/X ",
"PC/2e ","MC/2e ","PC/Xem"};
union REGS regs;
printf("\nEnter DX : ");
scanf("%d",&dx); while(kbhit()) getch();
printf("\nEnter Board Number : ");
scanf("%d",&bnum); while(kbhit()) getch();
sregs.r_ax = 0x0602;
sregs.r_bx = bnum;
sregs.r_dx = dx;
intr(0x14,&sregs);
if((sregs.r_ax & 0xff00) == 0xff00)
{
printf("\nERROR");
return(0);
}
printf("\nIRQ : %02X ",(sregs.r_ax>>8)&0xff );
printf("\nBoard Type : %s",type[(sregs.r_ax&0xff)-1]);
printf("\nWindow : %04X ",sregs.r_bx);
printf("\nPORT : %04X ",sregs.r_dx);
printf("\nChannels : %04X ",sregs.r_cx);
printf("\nDX Low : %04X ",sregs.r_si);
}