|
sbyywf
新手上路

积分 17
发帖 6
注册 2008-9-22
状态 离线
|
『楼 主』:
[求助]用TC2程序来读取网卡地址!
使用 LLM 解释/回答一下
在DOS环境下(纯DOS6.22),要用网卡的地址来做文件名标识的文件,想用TC2来设计,但不知如何来读取网卡地址,来请教大师,应该从计算机什么地方来读取网卡地址。如能给段程序,那就先谢谢啦!<img src="images/smilies/face-wink.png" align="absmiddle" border="0"><img src="images/smilies/face-wink.png" align="absmiddle" border="0">
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! ;);)
|
|
2008-9-22 15:47 |
|
|
ghostme
初级用户
 
积分 21
发帖 6
注册 2006-6-28
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
通过BUS/DEVICE/FUNCTION去访问PCI配置区,获取到PCI配置区的数据后,再去分析配置区里的数据,看BIOS给你的是内存空间还是IO地址,然后解码内存空间/IO地址,之后在内存空间/IO地址里拿到你想要的东东
可以去研究一下PCI的SPEC2.3
要不然就用DSock,不过在进DOS时需要加载DOS下网卡驱动
这个简单点,它有专门的函数的,就是网卡驱动不太好找
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.
|
|
2008-9-26 11:54 |
|
|
sbyywf
新手上路

积分 17
发帖 6
注册 2008-9-22
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
谢谢楼上对问题的关注,你说的我是一知半解,我想用TC2程序设计一个应用程序来读取,不知能行不?不知如何去读取,就象用dos的msd命令来读取那样。
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.
|
|
2008-9-26 14:45 |
|
|
henry000
初级用户
 
积分 20
发帖 9
注册 2008-9-25
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
曾经也为同样的问题烦恼过,还是没有解决,如何“看BIOS给你的是内存空间还是IO地址,然后解码内存空间/IO地址,之后在内存空间/IO地址里拿到你想要的东东”
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"
|
|
2008-12-29 17:15 |
|
|
netwinxp
高级用户
   
积分 741
发帖 366
注册 2007-7-25
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
根据网卡映射的物理内存地址(都在4G内存空间的很后面,所以要实现直接访问4G内存,TC处理起来不方便,建议直接用汇编),其中开始地址算起00~05字节为MAC。如果用I/O方式读取,先往索引口放00H然后从数据口读数据,依次访问到05H为止,至于索引口和数据口地址要从PCICFG读取。
Last edited by netwinxp on 2009-1-2 at 11:46 ]
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 ]
|
|
2009-1-2 11:45 |
|
|
zhaochunpro
新手上路

积分 4
发帖 2
注册 2008-12-27
状态 离线
|
|
2009-1-6 15:41 |
|
|
liudos
新手上路

积分 2
发帖 1
注册 2009-1-21
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
PCI网卡和ISA网卡不太一样,我们有TC/BC的源代码,请联系。
0311-87024917 13803113171
PCI network cards are somewhat different from ISA network cards. We have the source code of TC/BC. Please contact:
0311-87024917 13803113171
|
|
2009-1-22 12:28 |
|