📄 findv3.asm
字号:
IDEAL
P386
SMART
MODEL COMPACT,C
GLOBAL C find3dfx:NEAR
GLOBAL C get_pm_table_offset:NEAR
GLOBAL C get_pm_table_segment:NEAR
GLOBAL C get_pm_table_length:NEAR
GLOBAL C own_pm_interface_supported:NEAR
CODESEG
; Detect for a Voodoo Banshee/3 on the PCI bus, returns IO port if found
; or zero for nothing
PROC find3dfx NEAR
mov eax,0b101h
mov edi,0
int 01ah
cmp edx,20494350h
jne notfound
mov eax,0b102h
mov ecx,9 ; Voodoo 5 5500
mov edx,121ah
mov esi,0
int 01ah
or ah,ah
jz found_voodoo
mov eax,0b102h
mov ecx,5
mov edx,121ah
mov esi,0
int 01ah
or ah,ah
jz found_voodoo ; Vooodoo 3 Rev 2
mov eax,0b102h
mov ecx,4
mov edx,121ah
mov esi,0
int 01ah
or ah,ah
jz found_voodoo ; Vooodoo 3 Rev 1
mov eax,0b102h
mov ecx,3
mov edx,121ah
mov esi,0
int 01ah
or ah,ah
jz found_voodoo ; Banshee
jmp notfound
found_voodoo:
mov eax,0b10ah
mov edi,18h
int 1ah
or ah,ah
jnz notfound
mov eax,ecx
and eax,0FFFFFF00h
ret
notfound: ; Voodoo not found or error
xor ax,ax
ret
ENDP
PROC own_pm_interface_supported NEAR
mov ax, 0
ret
ENDP
PROC get_pm_table_offset NEAR
mov ax, 0
ret
ENDP
PROC get_pm_table_segment NEAR
mov ax, 0
ret
ENDP
PROC get_pm_table_length NEAR
mov ax, 0
ret
ENDP
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -