h6. [[SystemDevices]] h6(. » Technical Details h3(#systemdevices). List of System Devices |_<^{width:8em}. System Device |_<^. Input |_<^. Output |_<^. Provide by Module Name |_<^. Description |_<^. Notes | |<^. <code>kbd:</code> |<^. Y |<^. Y |<^. [[SystemDevices]] |<^. The keyboard |<^. Reading a line at a time using [[OS_ReadLine]] | |<^. <code>rawkbd:</code> |<^. Y |<^. Y |<^. [[SystemDevices]] |<^. The keyboard |<^. Reading a character at a time using [[OS_ReadC]] | |<^. <code>null:</code> |<^. Y |<^. Y |<^. [[SystemDevices]] |<^. The 'null' device |<^. Gives no input/output | |<^. <code>printer:</code> |<^. N |<^. Y |<^. [[SystemDevices]] |<^. The printer |<^. Currently configured printer | |<^. <code>vdu:</code> |<^. N |<^. Y |<^. [[SystemDevices]] |<^. The screen |<^. Using GSRead format passed to [[OS_WriteC]] | |<^. <code>rawvdu:</code> |<^. N |<^. Y |<^. [[SystemDevices]] |<^. The screen |<^. Via the VDU drivers and [[OS_WriteC]]| |<^. <code>netprint:</code> |<^. N |<^. Y |<^. [[NetPrint]] |<^. The printer |<^. Currently configured printer | |<^. <code>device:</code> |<^. Y |<^. Y |<^. [[DeviceFS]] |<^. Device filing system |<^. - | |<^. <code>parallel:</code> |<^. N |<^. Y |<^. [[DeviceFS]] |<^. [[ParallelDeviceDriver|Parallel port]] |<^. - | |<^. <code>serial:</code> |<^. N |<^. Y |<^. [[DeviceFS]] |<^. [[SerialDeviceDriver|Serial port]] |<^. - | |<^. <code>pipe:</code> |<^. Y |<^. Y |<^. [[PipeFS]] |<^. The pipe filing system |<^. | |<^. <code>resource:</code> |<^. Y |<^. Y |<^. [[ResourceFS]] |<^. The resource filing system |<^. | h3(#redirection). Redirection System Devices can be useful with commands such as [[*Copy]], and the redirection operators (> and <): |_<^. Example |_<^. Description | |<^. <code>*Copy myfile printer:</code>|<^. Send <code>myfile</code> to the printer | |<^. <code>*Cat { > printer: }</code>|<^. List the files in the current directory to the printer | h3(#suppress). Suppressing Output By using the System Device named <code>null:</code> it is possible to suppress unwanted output from a command script or program: |_<^. Example |_<^. Description | |<^. <code>*myprogram { > null: }</code>|<^. Run myprogram with no output | h3(#suppress). Input Devices You can only open one file for input on kbd: at once as it has buffered input; normal line editing facilities are available. If you try to open <code>kbd:</code> a second time whilst the first file is open, you will get returned a handle of 0, or an error if the appropriate bit is set in the open mode passed to [[FileSwitch]]. Ctrl-D in the input line will yield EOF when it is read from the buffer. You can open <code>rawkbd:</code> as many times as you like, even if a file is open on kbd:. It uses [[OS_ReadC|XOS_ReadC]] (without echoing to the screen) to read characters. No EOF condition exists on rawkbd:; the program reading it must detect an input value/pattern and stop on that. No files exist on any of these devices. If you call [[OS_File 5]] on the devices it will always return object type 0, so you cannot use them for input to programs that need to load an entire file at once for processing. h3(#netprint). netprint Device The <code>netprint:</code> system device, as well as using it in place of file names, you can also be used with certain commands that normally use the name of a filing system. h3(#printer). printer Device This device allows various special fields to specify different types of printers. They are: |_<^. Special Field |_<^. Printer Type | |<^. <code>printer#null:</code> |/2<^. Null Printer | |<^. <code>printer#sink:</code> | |<^. <code>printer#parallel:</code> |/2<^. Parallel Printer | |<^. <code>printer#centronics:</code> | |<^. <code>printer#serial:</code> |/2<^. Serial Printer | |<^. <code>printer#rs423:</code> | |<^. <code>printer#user:</code> |<^. Printer Type 3 | |<^. <code>printer# n :</code> |<^. Printer Type n (where n is in the range 0 - 255) | It is possible to open multiple files on <code>printer:</code>, provided they are on different devices and using different buffers. h3(#miscoutput). Other Output Devices You can open as many files as you wish on the 'other output devices', which are: * <code>null:</code> * <code>vdu:</code> * <code>rawvdu:</code> <pre> H% = OPENOUT "rawvdu:" SYS"OS_Byte",199,H%,0 type hereā¦ *Spool </pre> When you type everything is sent to the vdu, which outputs it and then uses [[OS_BPut|XOS_BPut]] to send it to the spool file handle. This in turn sends it (through another mechanism, [[OS_PrintChar]]) to the screen again! The [[*Spool]] at the end clears up. In addition to byte-oriented operations, you are allowed to perform file save operations on the output devices. The difference between vdu: and rawvdu: is that the former is filtered using the configured DumpFormat, whereas the latter sends its characters straight to the VDU drivers. h4. See also * [[ParallelDeviceDriver]] * [[SerialDeviceDriver]] * [[SystemDevices]] * [[OS_File 5]] * [[OS_PrintChar]] * [[OS_ReadC]] * [[OS_ReadLine]] * [[OS_BPut|XOS_BPut]] * [[OS_ReadC|XOS_ReadC]] * [[*Spool]] * [[*Copy]]