So this might be a somewhat lengthy post but I'm trying to figure something out about computer hardware. I am attempting to understand more clearly how software such as drivers, but I guess in the technical sense it wouldn't have to be a driver, communicates with a given piece of hardware (video card, sound card, ethernet card, web cam). A few weeks ago Steve recommended the humble bundle book package which included Introduction to Computer Organization. That book answered some of my questions as chapter 20 talks about port-mapped i/o and memory mapped i/o which am assuming drivers use this technique. I can see in my device manager under the resources tab of my video card memory ranges and I/O ranges which must be what this is referring to. So basically using these memory mappings i/o ranges do typical hardware devices such as video cards or web cams, ethernet cards have something like registers the way CPU has registers and that's how you write data to these devices? Particular drivers know about particular registers and other hardware in devices such as a realtek chipset in a ethernet card? I believe that in some ways Windows drivers basically treat a piece of hardware like a file, writing and reading to it for input and output. We also know that Linux treats every device as a file. But how is it one would know exactly what read or write in terms of the bits? Again, registers and what else perhaps? If a person knew the chips and on a classic sound blaster card, could you in theory produce sound on it using an assembler program. I know as "in" and "out" are assembler instructions for hardware. I also noticed in the SpinRite dev folder a SATA-AHCI-Spec pdf. Is this needed to write the spinrite assembler code that talks to a hard disk, does this document discuss non-processor registers? If so, do all devices that sit on a bus have there own kind of registers? What about DMA? I think Steve has talked about that in regards to SpinRite. Is this what the Windows HAL api are for? Abstracting these things from different kinds of hardware? I apologize in advance if this is just too confusing of a post. I've been reading multiple sources and in many cases speed reading to get some generic answers. Thanks.
Chad
Chad