Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Programming Question

  1. Feb 26, 2005 #1
    I'm taking my first programming class and I have some questions. How does your program access external devices like a printer or modem? I know in linux everything has a corresponding file but I have no idea how it works in dos/windows.
  2. jcsd
  3. Feb 27, 2005 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    In general, your application program communicates with a driver, which is a piece of software that knows how to talk directly to the hardware. The driver generally communicates with hardware by reading and writing to various addresses. These addresses are not associated with memory, but instead with some of the various chips inside the computer. Some of the chips do serial communication; others do parallel, others do USB, and so on. When you read and write to those addresses, you are moving data between the processor and those chips, which then communicate with the printer or modem.

    - Warren
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook