Network Card User Manual

Initializing
3-3
Initializing and Resetting
WORD PciFindDevice(
WORD DeviceID,
WORD VendorID,
WORD Index,
WORD *pDev)
{
union REGS r;
r.h.ah = PCI_FUNCTION_ID;
r.h.al = FIND_PCI_DEVICE;
r.x.cx = DeviceID;
r.x.dx = VendorID;
r.x.si = Index;
int86(PCI_INT, &r, &r);
*pDev = (WORD)r.x.bx;
return (int)r.h.ah;
}
When the BIOS call is finished, the value returned is 0 if successful or an error
code if not successful. Once the BIOS board is found, references to it and prop-
erties assigned to it by the O/S are indirectly referenced by the value returned
to nic.devid. The structure nic is a collection of properties belonging to the NIC.
As the sample code learns more about the environment with respect to the
NIC, other information in this structure is filled in.