zhao
驱动牛犊
驱动牛犊
  • 注册日期2002-04-25
  • 最后登录2003-05-16
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1012回复:1

pci驱动问题!

楼主#
更多 发布于:2002-05-11 11:37
调用INT 0X1A 的B101功能,判断是否支持PCI

#include....
main()
{
asm(\"mov $0xb1,%ah\\n   //1
     mov $0x01,%al\");  //2
asm(\"int $0x1a\");      //3
}

编译通过,可是单步执行到3时报:segmentation fault!
why?
3kx!!!!!!!!!!!!!!1

最新喜欢:

BeshyBeshy
shyeagle
驱动老牛
驱动老牛
  • 注册日期2002-04-30
  • 最后登录2007-07-31
  • 粉丝1
  • 关注1
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-05-11 12:15
楼上老兄请仔细看一下我贴给你的东西,调用时除了功能号还有其它的东西。
INT 1A - PCI BIOS v2.0c+ - INSTALLATION CHECK
AX = B101h
EDI = 00000000h  ;;你忘记这里了!!!!
Return: AH = 00h if installed
   CF clear
   EDX = 20494350h (\' ICP\')
   EDI = physical address of protected-mode entry point (see #00731)
   AL = PCI hardware characteristics (see #00730)
   BH = PCI interface level major version (BCD)
   BL = PCI interface level minor version (BCD)
   CL = number of last PCI bus in system
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
 interrupts if they were disabled before making the call
some BIOSes do not change EDI, so applications looking for the
 protected-mode entry point should set EDI to 00000000h before
 calling this function
SeeAlso: AX=B181h
[url=http://www.01study.com]01空间网[/url] [url=http://www.01study.com/forum/dispbbs.asp?boardID=73&ID=193&skin=0]版主招募[/url] [img]http://shy2003.vip.sina.com/map/yjs.gif[/img]
游客

返回顶部