h6. [[FileSwitch]] h6(. » [[FileSwitch Technical Details|Technical Details]] h6((. » Miscellaneous Information h2. Miscellaneous Information h2(#re-entrancy). Re-entrancy and Interrupts The [[FileSwitch]] module can handle recursive calls made to different streams, via the same or different entry points. For example, two different file are to be accessed using; file 1 is an output file on a disc that is no longer valid, and file 2 is a spool file. # Call [[OS_BPut]] to put a byte to file 1 (this fills the buffer and causes it to flush to the filing system) # The filing system generates an UpCall to inform that the medium is missing # An UpCall handler asks the user to supply the missing medium (if possible) # This goes through [[OS_BPut]] to file 2, filling the buffer and causing a flush to the filing system If the filing systems are different then both calls will work as expected. If, however, they are the same, then it is the responsibility of the filing system to decide whether it can handle it. Filing systems that use the [[FileCore]] module do not. Filing systems must not be called from interrupt code. An error may/or may not be given. h2(#support). Filing System Support of SWI Calls As a system may use different filing systems, applications must be written to handle situations where a filing system may not support a command that other filing system do support. In this instance, an error will be returned, and it is the responsibility of the application to handle it. h2(#system_devices). System Devices In addition to true filing system used to store information, other device-orientated systems are assigned like a filing system. These are called System Devices. They can be used anywhere that require a file name as an input, or destination for output, using a method called redirection. The [[SystemDevices]] module is responsible for providing these devices. |_\2<^. System Devices suitable for input| |<^{width:6em}. <code>kbd:</code>|<^. The keyboard, reading a line at a time using [[OS_ReadLine]]| |<^. <code>rawkbd:</code>|<^. The keyboard, reading a character at a time using [[OS_ReadC]]| |<^. <code>null:</code>|<^. The 'null device', which effectively gives no input| |_\2<^. System Devices suitable for Output| |<^{width:6em}. <code>vdu:</code>|<^. The screen, using GSRead format passed to [[OS_WriteC]] | |<^. <code>rawvdu:</code>|<^. The screen, via the VDU drivers and [[OS_WriteC]]| |<^. <code>printer:</code>|<^. The currently configured printer| |<^. <code>netprint:</code>|<^. The currently configured printer, provided by the [[NetPrint]] module| |<^. <code>null:</code>|<^. The 'null device', which effectively gives no output| *Note:* An error is given if the specified system device is not present. e.g the [[SystemDevices]] module is not present. More information is available in the [[SystemDevices]] section. h2(#additional). Additional information Other filing systems may store extra information not detailed here, with each file. To find out more, you should consult the documentation provided with the filing system.