![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-01 21:54 |
48,037 topics / 350,122 posts / today 2 new / 48,250 members |
| DOS开发编程 & 发展交流 (开发室) » How to write a program in C language under DOS to control PCI read and write? |
| Printable Version 1,554 / 2 |
| Floor1 jirow | Posted 2006-10-13 01:49 |
| 新手上路 Posts 1 Credits 4 | |
|
How to write a program in C language under DOS to control PCI reading and writing? I hope all experts can give a reference program, thank you!
|
|
| Floor2 howardxuhh | Posted 2006-11-09 02:36 |
| 新手上路 Posts 3 Credits 10 From zj | |
|
All are operated through address mapping. The original ISA bus all operate in an address-data manner. PCI is similar, mapping the base address of the PCI device to the 1M memory range (the memory area accessible by the C compiler). By reading and writing the base address and its offset, the internal resources of the PCI device can be accessed.
|
|
| Floor3 dsysps | Posted 2006-11-09 22:11 |
| 初级用户 Posts 34 Credits 98 | |
|
PCI BIOS can be used. The interrupt number of PCI BIOS is 1Ah, where AH is B1 and AL is the function number. Its function list is:
01h: INSTALLATION CHECK 02h: FIND PCI DEVICE 03h: FIND PCI CLASS CODE 06h: PCI BUS-SPECIFIC OPERATIONS 08h: READ CONFIGURATION BYTE 09h: READ CONFIGURATION WORD 0Ah: READ CONFIGURATION DWORD 0Bh: WRITE CONFIGURATION BYTE 0Ch: WRITE CONFIGURATION WORD 0Dh: WRITE CONFIGURATION DWORD 0Eh: GET IRQ ROUTING INFORMATION 0Fh: SET PCI IRQ 81h: INSTALLATION CHECK (32-bit) 82h: FIND PCI DEVICE (32-bit) 83h: FIND PCI CLASS CODE (32-bit) 86h: PCI BUS-SPECIFIC OPERATIONS (32-bit) 88h: READ CONFIGURATION BYTE (32-bit) 89h: READ CONFIGURATION WORD (32-bit) 8Ah: READ CONFIGURATION DWORD (32-bit) 8Bh: WRITE CONFIGURATION BYTE (32-bit) 8Ch: WRITE CONFIGURATION WORD (32-bit) 8Dh: WRITE CONFIGURATION DWORD (32-bit) 8Eh: GET IRQ ROUTING INFORMATION (32-bit) 8Fh: SET PCI IRQ (32-bit) In addition, it can also be implemented by accessing ports CF8h and CFCh |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |