PCI总线与接口技术
时间:12-12
来源:互联网
点击:
- 错误的设备
- MOVAH,09H
- INT21H
- JMPEXIT
- FIND:MOVAX,0B102H;找到了PCIBIOS,再查找指定PCI设备
- MOVCX,5933H;板卡的设备的ID
- MOVDX,10E8H;板卡的供应商ID
- MOVSI,0;索引
- INT1AH
- JNCREAD
- MOVDX,OFFSETMES
- MOVAH,09H
- INT21H
- JMPEXIT
- READ:MOVBN,BH;保存总线号
- MOVDN_FN,BL;保存设备号
- CALLKENTER;回车换行
- MOVDX,OFFSETMES0
- MOVAH,09H
- INT21H
- CALLKENTER;回车换行
- MOVDX,OFFSETMES3;输出供应厂商ID
- MOVAH,09H
- INT21H
- CALLKENTER
- MOVDX,OFFSETMES4;输出设备的ID
- MOVAH,09H
- INT21H
- CALLKENTER
- MOVAX,0B109H;读命令寄存器,单字操作
- MOVBH,BN
- MOVBL,DN_FN
- MOVDI,PCICMD
- INT1AH
- JCERROR
- MOVDX,OFFSETMES5;显示PCI命令寄存器内容
- MOVAH,09H
- INT21H
- MOVAX,02H
- CALLSHOW
- CALLKENTER
- MOVAX,0B109H;读PCI状态寄存器内容,单字操作
- MOVBH,BN
- MOVBL,DN_FN
- MOVDI,PCISTS
- INT1AH
- JCERROR
- MOVDX,OFFSETMES6;显示状态寄存器内容
- MOVAH,09H
- INT21H
- MOVAX,02H
- CALLSHOW
- CALLKENTER
- MOVAX,0B108H;版本号,单字节操作
- MOVBH,BN
- MOVBL,DN_FN
- MOVDI,RID
- INT1AH
- JCERROR
- MOVDX,OFFSETMES7;显示版本号
- MOVAH,09H
- INT21H
- MOVAX,01H
- CALLSHOW
- CALLKENTER
- MOVAX,0B108H;读中断引脚信号,单字节操作
- MOVBH,BN
- MOVBL,DN_FN
- MOVDI,INTLN
- INT1AH
- JCERROR
- MOVDX,OFFSETMES20;显示中断引脚
- MOVAH,09H
- INT21H
- MOVAX,01H
- CALLSHOW
- CALLKENTER
- MOVAX,0B10AH;读配置寄存器,双字操作
- MOVBH,BN;PCI设备的总线号
- MOVBL,DN_FN;设备以及功能号,入口参数
- MOVDI,BADR0
- INT1AH
- JCERROR
- MOVDX,OFFSETMES13;基址寄存器0
- MOVAH,09H
- INT21H
- MOVAX,04H
- CALLSHOW
- CALLKENTER
- MOVAX,0B10AH;读配置寄存器,双字操作
- MOVBH,BN;PCI设备的总线号
- MOVBL,DN_FN;设备及功能号,入口参数
- MOVDI,BADR1
- INT1AH
- JCERROR
- PUSHECX
- MOVDX,OFFSETMES14;基址寄存器1
- MOVAH,09H
- INT21H
- MOVAX,04H
- POPECX
- CALLSHOW
- CALLKENTER
- MOVAX,0B10AH;读配置寄存器,双字操作
- MOVBH,BN;PCI设备的总线号
- MOVBL,DN_FN;设备及功能号,入口参数
- MOVDI,BADR2
- INT1AH
- JCERROR
- MOVDX,OFFSETMES15;基地址寄存器2
- MOVAH,09H
- INT21H
- MOVAX,04H
- CALLSHOW
- CALLKENTER
- MOVAX,0B10AH;读配置寄存器,双字操作
- MOVBH,BN;PCI设备的总线号
- MOVBL,DN_FN;设备及功能号,入口参数
- MOVDI,BADR3
- INT1AH
- JCERROR
- MOVDX,OFFSETMES16;基地址寄存器3
- MOVAH,09H
- INT21H
- MOVAX,04H
- CALLSHOW
- CALLKENTER
- MOVAX,0B10AH;读配置寄存器,双字操作
- MOVBH,BN;PCI设备的总线号
- MOVBL,DN_FN;设备及功能号,入口参数
- MOVDI,BADR4
- INT1AH
- JCERROR
- MOVDX,OFFSETMES17;基地址寄存器4
- MOVAH,09H
- INT21H
- MOVAX,04H
- CALLSHOW
- JMPEXIT
- ERROR:CALLKENTER
- MOVDX,OFFSETMES2;显示读错误信息
- MOVAH,09H
- INT21H
- EXIT:MOVAH,4CH;返回DOS
- INT21H
- KENTERPROC
- MOVDL,0AH
- MOVAH,02H
- INT21H
- MOVDL,0DH
- MOVAH,02H
- INT21H
- RET
- KENTERENDP
- SHOWPROCNEAR;显示子程序
- PUSHDX
- PUSHDI
- PUSHBX
- MOVDI,OFFSETR_VALUE
- MOV[DI],ECX;保存获取的数据
- ADDDI,AX
- DECDI
- MOVCX,AX
- C1:MOVAL,[DI]
- PUSHAX
- SHRAL,4
- ANDAL,0FH;取高4位
- CMPAL,0AH;是否是A以上的数
- JBC2
- ADDAL,07H
- C2:ADDAL,30H
- MOVBH,AL
- POPAX
- ANDAL,0FH;取低4位
- CMPAL,0AH
- JBC3
- ADDAL,07H
- C3:ADDAL,30H
- MOVBL,AL
- MOVAH,2;显示十六进制数对应的ACSII码
- MOVDL,BH
- INT21H
- MOVDL,BL
- INT21H
- DECDI
- LOOPC1
- POPBX
- POPDI
- POPDX
- RET
- SHOWENDP
- CODEENDS
- ENDSTART
PCI总线接口技 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)