Hi guys
Its my first time that I am writing in a forum and I am a very new on hardware architecture field.

I read something that confused me and I can not understand how it works or what it means but I will try to formulate as best I can my question:

I can not understand how a NIC communicates with the OS and the hardware.
I mean, If I want to see and capture a state of a NIC card what I have to do?
I read something about that a NIC is consisted by some registers (device registers) and send an interrupt to the OS. Furthermore, I read that these registers are accessible through a PIO or MMIO.
How I can find out which registers are those?

Basically, If I want to see( read) the NIC's registers values what I have to do?
NIC drivers source code explain which registers I have to read?
or is something that based on the motherboard?

Can anyone advice me, what I have to read and guide me where to look?
Something that it will help me to understand how NIC registers work and how communicate with hardware and the OS?

Many thanks,
Sorry If I bother you, or is irrelevant with the category
Regards,
Elias