China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 04:37
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » [Help] Use TC2 program to read the network card address! View 1,672 Replies 6
Original Poster Posted 2008-09-22 15:47 ·  中国 上海 电信
新手上路
Credits 17
Posts 6
Joined 2008-09-22 14:20
17-year member
UID 126302
Gender Male
Status Offline
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!
Floor 2 Posted 2008-09-26 11:54 ·  中国 江苏 苏州 电信
初级用户
Credits 21
Posts 6
Joined 2006-06-28 10:16
20-year member
UID 57670
Status Offline
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.
Floor 3 Posted 2008-09-26 14:45 ·  中国 上海 电信
新手上路
Credits 17
Posts 6
Joined 2008-09-22 14:20
17-year member
UID 126302
Gender Male
Status Offline
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.
Floor 4 Posted 2008-12-29 17:15 ·  中国 江苏 苏州 电信
初级用户
Credits 20
Posts 9
Joined 2008-09-25 13:36
17-year member
UID 126586
Gender Male
Status Offline
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"
Floor 5 Posted 2009-01-02 11:45 ·  中国 福建 厦门 电信
高级用户
★★★
Credits 741
Posts 366
Joined 2007-07-25 19:11
19-year member
UID 94024
Gender Male
Status Offline
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 ]
Floor 6 Posted 2009-01-06 15:41 ·  中国 山东 潍坊 联通
新手上路
Credits 4
Posts 2
Joined 2008-12-27 10:06
17-year member
UID 135057
Gender Male
Status Offline
Nice
Floor 7 Posted 2009-01-22 12:28 ·  中国 河北 石家庄 联通
新手上路
Credits 2
Posts 1
Joined 2009-01-21 19:39
17-year member
UID 137207
Gender Male
Status Offline
PCI network cards are somewhat different from ISA network cards. We have the source code of TC/BC. Please contact:
0311-87024917 13803113171
Forum Jump: