There is still information to be transferred to the I/O unit from the printer, for example a request for the next line of print, or an error message. So we use an OUTPUT cable and an INPUT cable. Apart from this, the printer is an Output Device. (We are talking here about the System Line Printer, so called because it prints one line at a time on continuous paper at speeds up to 2000 lines a minute).
We observe a convention here, that data movement FROM the mainframe is considered to be OUTPUT, while data TO the mainframe is considered input. This convention is continued down the hierarchy, so that data from a disk drive to a controller is Input data, headed for the mainframe.
When the program running on the mainframe wants to print something on the line printer, it sets up certain information in registers, via the Operating System, or OS, in a reserved area of memory. This information consists of data to inform the I/O unit of where it can find the data to be printed, how many characters to print etc. It may also select a printer, if there are more than one.
Included in the data field are non-printing control characters such as line feed, form feed, etc. to tell the printer when to perform these actions.
The registers will also identify the command as a print command, as opposed to disk or tape command, for instance. The OS then notifies the I/O unit that it has some work to do, another form of handshaking, and the program carries on with its own business.
The I/O unit takes control of the process from now on. It has its own path to memory, so can access the data and control information placed there by the program. (It has other tasks running at the same time. It may be reading data from a disk, rewinding a tape drive, talking to the system operator, and many other things. All these happen concurrently by a process known as time-sharing, see separate article.)
In part 2 we will see how the print command is sent to the printer, and carried out.
Tony is an experienced computer engineer. He is currently webmaster and contributor to http://www.what-why-wisdom.com A set of diagrams accompanying these articles may be seen at http://www.what-why-wisdom.com/history-of-the-computer-0.html RSS feed also available - use http://www.what-why-wisdom.com/Educational.xml