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-07-31 20:46
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » [Help] RTL8100BL network card driver, some registers cannot be operated View 2,358 Replies 0
Original Poster Posted 2016-01-07 09:32 ·  中国 北京 电信
新手上路
Credits 4
Posts 1
Joined 2016-01-06 17:19
10-year member
UID 181417
Gender Male
Status Offline
DOS version: 6.22
BC version: 3.1
Hardware architecture: x86

Current problem encountered: Found that some registers cannot be operated normally: For example, the Transmit Configuration Register. When writing in 8-bit, 16-bit, 32-bit, and then reading in 8-bit, it is found that the value cannot be written in at all each time. My 8-bit operation is the outport() function, the 16-bit operation is the outportb() function, and for 32-bit, I use the static void outportd(unsigned short portid, unsigned long value) //output dword to I/O port
{

asm MOV DX, portid
asm DB 0x66 //
asm MOV AX, WORD PTR value // MOV EAX,value
asm DB 0x66, 0xEF // OUT DX,EAX

}
There is one point I don't particularly understand. Generally, if a register supports 32-bit writing, it should be able to write in 8-bit and 16-bit as well. But currently, I don't know which part of my operation is wrong. Who has done work in this aspect, give some suggestions or opinions, thanks......
Forum Jump: