Код для сканирования всех PCI-устройств в системе:
loop bus from 0 to lastbus
loop devfn from 0 to 255
begin
mov bl,6
mov bh,bus
mov ch,devfn
mov cl,0 ; register address
mov eax,62
int 0x40
test ax,ax
jz next
cmp ax,0xffff
jz next
; мы нашли устройство!
; eax = (deviceID shl 16) + vendorID
next:
end