How to write to & read from network card in x86 assembly?

前端 未结 4 1950
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 13:20

does anyone know how to gain access to devices such as an ethernet port on a mainboard or on a pci card?

Are there special registers? Opcodes? Do I have to make a ca

4条回答
  •  既然无缘
    2020-12-30 14:04

    It depends on the particular Ethernet MAC chip you're trying to talk to. Even chips in the same family will often have minor differences in how they operate. This is why modern OSes have the "driver" concept: the hardware manufacturer usually writes the driver because they know the hardware, and the driver provides a translation between the hardware and what the OS wants to see.

    You can often get documentation from the MAC chip's manufacturer to write your own driver. Again, you have to know exactly which chip you're trying to talk to in order to get the right specs. Some chips have no public documentation, but that's usually not a problem with Ethernet chips.

提交回复
热议问题