I/O Input Output devices. Where can you send information? From where can you receive information? 1. Disk drive. (Read/write files). 2. Classic Input Method: Punch Cards, Keyboard. Mouse. TracPad. Touchscreen. Controller: Joystick, paddles, a steering wheel, DIP Switches, Camera/Microphone, network/internet/bluetooth, external drives "It's only an arrow flight away." "It's only a narrow flight away." 3. Classic Output Method: printer, punch cards, displays of lights, screen, speaker, network/internet/bluetooth, external drives The OS handles I/O and does most of the dirty work for the programmer. The programmer pretty much never has to interact directly with the I/O device. It uses software commands to the OS, and the OS controls the device. (Usually, there is an electrical connection, certain signals are sent to the device, perhaps the device responds to let it know that the signal is received. Sometimes there's a latency involved. You request information from a device and then the device sends it...or sometimes the device sends something when it feels like, and if you miss it, you miss it. The OS handles all of this so that you can use these devices with relatively simple system calls. Everything was tied into the file system. So, if I wanted to send something to the printer, I could open up the print queue as a file, use a regular write command to that file, close the file, and then my stuff would print. Along the same lines, if I wanted to send something to the screen, not just raw text, but formatted text, I would treat the console as a file, and write certain characters to it. ASCII 12 would clear the screen. ASCII 8 would move the cursor to the upper left of the screen without clearing it. ASCII 14 would cause text to start blinking. ASCII 16 would move the cursor anywhere you wanted to. Other characters in combination could plot points draw lines or do other graphics within the sphere of these simple terminals. With other more advanced forms of I/O, the commands to control them become more complex. A graphics windows is still controlled with system calls, but they are more complex, and the implementation varies between languages. (Drawing a shape in Java and drawing one in Python may involve very different commands.) With a mouse, for example, you send a system call that returns the position of the mouse cursor as well as the status of any buttons that may be pressed at the time.