Hi Octocontrabass, you were right i had some bugs in my code when bit shifting the function number into the register before using the out command and it resulted in reading function 0 with a masked offset:
faulty code:
; ecx is the device count --- ebx is the bus count --- edi is the offset --- edx is the function number _PCIRead: xor eax,eax
or edi,0x80000000 and edi,0x800000FC or al,bl shl eax,8 shl ecx,3 or al,cl shr ecx,3 shl eax,5 or al,dl ; this line is supposed to exchange positions with the line above it and then i can merge the two shl commands to shl eax,8 shl eax,3 or eax,edi mov dx,0xCF8 out dx,eax mov dx,0xCFC in eax,dx ret
I should have tested more thoroughly, I'm sorry. This is my first topic. Do i close the topic or do the moderators?
|