findv3.asm

来自「用来将电脑连接到电视荧幕, 并以15Khz输出的源码, 请只用在支援15Khz的」· 汇编 代码 · 共 103 行

ASM
103
字号
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 + =
减小字号Ctrl + -
显示快捷键?