I/O paths and many device interfaces have registers that control aspects of their operation and report their status. For example, screen colors can be controlled by writing to the registers of the CRT interface. The baud rate can be changed by writing to the registers of the serial interface. The status of an I/O path variable can be read from the I/O path registers. These and many other attributes can be controlled and read through interface registers.
In general, there are three different kinds of registers: I/O path registers, interface registers, and hardware registers. The following program shows access to all three types:
ASSIGN @Path TO 9
PRINT "I/O Path Register 0:",STATUS(@Path,0)
PRINT "Interface Register 0:",STATUS(9,0)
PRINT "Hardware Register 0:",READIO(9,0)
The CONTROL and STATUS statements are used to access two of the three kinds of registers: I/O path registers and interface registers. If the statement specifies an I/O path, I/O path registers are accessed. If the statement specifies an interface select code, interface registers are accessed.
The range of legal register numbers and their definitions differ depending on the I/O path assignment or the type of interface. I/O path registers are given below. The registers for each interface are given in the sections that follow this one, or the documentation that came with the interface.