• Demo Program
/************************************************/
/* This program is developed by Turbo C 2.0 */
/***********************************************/
/* Demo 2: One P8R8 card demo. */
/***********************************************/
#include "P16R16.H"
int main()
{
int i,j;
WORD nVal;
float fVal;
WORD wBoards,wRetVal,wVal;
WORD wInData;
WORD wTypeID;
WORD wAddress0,wAddress1,wAddress2;
WORD wAddress3,wAddress4,wAddress5;
WORD P16R16_BaseAddress,P8R8_BaseAddress;
WORD wP16R16No,wP8R8No;
clrscr();
/* initiaing PCI-P16R16 card and detect how many P16R16/P8R8 card in PC */
wRetVal=PCI_DriverInit(&wBoards);
printf("Threr are %d P180X Cards in this PC\n",wBoards);
if( wBoards==0 )
{
putch(0x07); putch(0x07); putch(0x07);
printf("There are no P16R16/P8R8 card in this PC !!!\n");
exit(0);
}
/* dump every P16R16/P8R8 card's configuration address space */
for(i=0; i<wBoards; i++)
{
wRetVal=PCI_GetConfigAddressSpace(i,&wTypeID,
&wAddress0,&wAddress1,&wAddress2,
PCI-P8R8/P16R16/P16C16/P16POR16 User’s Manual (Ver.2.2, 2005/5/5) …46