阅读:4101回复:8
pci show
display 256 registers of pci device
input bus number,device number,function number see the following program develop environment visual c++ 6 |
|
|
沙发#
发布于:2002-03-20 12:38
我认为原创区应该公开源代码才对,象这样贴个exe文件也叫总结、原创吗???????
:( :( :( :( :( :( :( :( :P :P :P :P |
|
板凳#
发布于:2002-03-20 17:15
9494!
而且公布了原代码的可以多给分,ZN是么! |
|
|
地板#
发布于:2002-03-21 18:32
Now I Open the source code
if you have anything,contact with me email fchwfchw@sina.com void CPCIDlg::OnButton1() { CListCtrl *pListCtrl=(CListCtrl *)GetDlgItem(IDC_LIST1); CString str; int temp; UpdateData(true);//get bus,dev,fun for(int i=0;i<16;i++) { for(int j=1;j<=16;j++) { temp=GetResult(m_bus,m_dev,m_fun,i*16+j-1); if(temp<16) str.Format(\"0%X\",temp); else str.Format(\"%X\",temp); pListCtrl->SetItemText(i,j,str); } } } int CPCIDlg::GetResult(int bus, int dev, int fun, int reg) { int i,j,temp; i=reg/4; j=reg-i*4; j=j*8; _asm{ pushad mov eax,80h sal eax,8 or eax,bus sal eax,5 or eax,dev sal eax,3 or eax,fun sal eax,6 or eax,i sal eax,2 mov dx,0cf8h out dx,eax mov dx,0cfch in eax,dx mov ecx,j and ecx,000000ffh sar eax,cl and eax,000000ffh mov temp,eax popad } return temp; } |
|
|
地下室#
发布于:2002-03-21 18:34
additional add the following code on function BOOL CPCIDlg::OnInitDialog()
CString str; CListCtrl *pListCtrl=(CListCtrl *)GetDlgItem(IDC_LIST1); pListCtrl->InsertColumn(0,\" \",LVCFMT_LEFT,30,0); for(int i=1;i<17;i++) { str.Format(\"%X\",i-1); pListCtrl->InsertColumn(i,str,LVCFMT_LEFT,30,i); pListCtrl->InsertItem(i-1,str); } |
|
|
5楼#
发布于:2002-03-28 08:20
out 指令,没有特权是无法执行的,程序执行到out 的时候肯定会异常的,你是怎麽处理的?要发表,就发表真东西,别遮遮掩掩的。
|
|
6楼#
发布于:2002-05-13 08:58
9494.
|
|
|
7楼#
发布于:2004-04-06 15:11
9494. |
|
8楼#
发布于:2004-05-10 09:29
94!
|
|
|