中国DOS联盟论坛

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-10-31 11:24
47,815 topics / 349,930 posts / today 0 new / 48,290 members
DOS开发编程 & 发展交流 (开发室) » [Help] Use TC2 program to read the network card address!
Printable Version  1,889 / 6
Floor1 sbyywf Posted 2008-09-22 15:47
新手上路 Posts 6 Credits 17
Under the DOS environment (Pure DOS 6.22), for a file that uses the network card's address as the file name identifier, and wanting to design it with TC2, but not knowing how to read the network card address, to ask the master, from which part of the computer to read the network card address. If you can give a segment of program, then thank you first!
Floor2 ghostme Posted 2008-09-26 11:54
初级用户 Posts 6 Credits 21
Access the PCI configuration space through BUS/DEVICE/FUNCTION, obtain the data in the PCI configuration space, then analyze the data in the configuration space to see whether the BIOS gives you a memory space or an IO address, then decode the memory space/IO address, and then get what you want in the memory space/IO address. You can study the PCI SPEC2.3. Otherwise, use DSock, but you need to load the network card driver under DOS when entering DOS. This is simpler, it has special functions, but the network card driver is not easy to find.
Floor3 sbyywf Posted 2008-09-26 14:45
新手上路 Posts 6 Credits 17
Thanks to the upstairs for paying attention to the problem. What you said I only understand vaguely. I want to use the TC2 programming to design an application program to read, I wonder if it is possible? I don't know how to read, just like using the dos's msd command to read.
Floor4 henry000 Posted 2008-12-29 17:15
初级用户 Posts 9 Credits 20
I have also been troubled by the same problem before, and it still hasn't been solved. How to "see whether what BIOS gives you is memory space or IO address, then decode the memory space/IO address, and then get the things you want from the memory space/IO address"
Floor5 netwinxp Posted 2009-01-02 11:45
高级用户 Posts 366 Credits 741
According to the physical memory address mapped by the network card (all are very far behind the 4G memory space, so it is not convenient for TC to implement direct access to 4G memory. It is recommended to use assembly directly). The 00~05 bytes from the starting address are the MAC. If reading in I/O mode, first put 00H in the index port and then read data from the data port, and access up to 05H in sequence. As for the index port and data port addresses, they should be read from PCICFG.

[ Last edited by netwinxp on 2009-1-2 at 11:46 ]
Floor6 zhaochunpro Posted 2009-01-06 15:41
新手上路 Posts 2 Credits 4
Nice
Floor7 liudos Posted 2009-01-22 12:28
新手上路 Posts 1 Credits 2
PCI network cards are somewhat different from ISA network cards. We have the source code of TC/BC. Please contact:
0311-87024917 13803113171
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023