kolibrios-fun/programs/ac97wav/trunk/pci.inc
Andrey Halyavin (halyavin) 065b8d32b2 programs sources added
git-svn-id: svn://kolibrios.org@31 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-01-03 09:43:31 +00:00

46 lines
807 B
PHP

PCI_CMD_REG = 04h ; reg 04, command reg
IO_ENA = 0x00000001 ; i/o decode enable
MEM_ENA = 0x00000002 ; memory decode enable
BM_ENA = 0x00000004 ; bus master enable
pciRegRead8: ; register in CL!
mov bl, 4
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret
pciRegRead16:
mov bl, 5
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret
pciRegRead32:
mov bl, 6
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret
pciRegWrite8: ; value in DL!
mov bl, 8
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret
pciRegWrite16:
mov bl, 9
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret
pciRegWrite32:
mov bl, 10
mov bh, [bus]
mov ch, [devfn]
mcall MF_PCI
ret