h6. [[OS SWI Calls]] h6(. » OS_UpCall h2. OS_UpCall h5. (SWI &33) |_<^{width:4em}. Entry | | |<^. R0 |<^. "Reason code":#reason| |\2<^. All other registers dependent on reason code| |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved| |\2<^. All other registers dependent on reason code| h4. Use The purpose of this call is to call the vector [[UpCallV]], to warn of particular conditions. h4. Notes The action performed depends on the reason code value in R0. This SWI calls the vector [[UpCallV]]. To use UpCalls, you must either claim the vector and install a routine on it, or install an UpCall handler. They are called UpCalls because they are calls that RISC OS makes <b>up</b> to an application, rather than calls that an application makes <b>down</b> to RISC OS. They generally occur in the foreground, and are hence different to Events, which occur in the background. Routines that handle UpCalls must *only* call the error-returning SWI calls. That is SWI calls that have their X bit set. i.e. either add the value &20000 to the SWI number, or add the letter 'X' in front of the SWI name. If a routine installed on the vector deals with the situation, it should intercept the call to the vector, as there is no longer any point informing any other routines or the UpCall handler of the situation. If it can't deal with the situation, it must pass the call on, as another one may be able to do so. h4(#reason). Reason Codes |_<^{width:4em}. #|_<^{width:4em}. Hex #|_<^. Action| |<^. 1|<^. &01|<^. [[OS_UpCall 1|Media not present]]| |<^. 2|<^. &02|<^. [[OS_UpCall 2|Media not known]]| |<^. 3|<^. &03|<^. [[OS_UpCall 3|Miscellaneous file changed information]]| |<^. 4|<^. &04|<^. [[OS_UpCall 4|Media search end]]| |<^. 5|<^. &05|<^. [[OS_UpCall 5|Password]]| |<^. 6|<^. &06|<^. [[OS_UpCall 6|Taskwindow sleep]]| |<^. 7|<^. &07|<^. [[OS_UpCall 7|PipeFS sleep no more]] | |<^. 8|<^. &08|<^. [[OS_UpCall 8|Buffer filling]]| |<^. 9|<^. &09|<^. [[OS_UpCall 9|Buffer emptying]]| |<^. 10|<^. &0A|<^. [[OS_UpCall 10|DeviceFS stream created]]| |<^. 11|<^. &0B|<^. [[OS_UpCall 11|DeviceFS stream closed]]| |<^. 12|<^. &0C|<^. [[OS_UpCall 12|Freeway]] | |<^. 13|<^. &0D|<^. [[OS_UpCall 13|Media Set-Top Box online]] | |<^. 14|<^. &0E|<^. [[OS_UpCall 14|Media Set-Top Box standby]] | |<^. 15|<^. &0F|<^. [[OS_UpCall 15|Device receive data present]]| |<^. 16|<^. &10|<^. [[OS_UpCall 16|Device threshold above]]| |<^. 17|<^. &11|<^. [[OS_UpCall 17|Device threshold below]]| |<^. 18|<^. &12|<^. [[OS_UpCall 18|Progress UI]]| |<^. 19|<^. &13|<^. [[OS_UpCall 19|Media search end with message]]| |<^. 20|<^. &14|<^. [[OS_UpCall 20|Keyboard status change]]| |<^. 21|<^. &15|<^. [[OS_UpCall 21|MPEG]]| |<^. 22|<^. &16|<^. [[OS_UpCall 22|PMonitor]]| |<^. 23|<^. &17|<^. [[OS_UpCall 23|PDumper action]]| |<^. 24|<^. &18|<^. [[OS_UpCall 24|Drive added]]| |<^. 25|<^. &19|<^. [[OS_UpCall 25|Drive removed]]| |<^. 26|<^. &1A|<^. [[OS_UpCall 26|Certificate confirm]]| |<^. 27|<^. &1B|<^. [[OS_UpCall 27|Certificate confirm end]]| |<^. 256|<^. &100|<^. [[OS_UpCall 256|New application]]| |<^. 257|<^. &101|<^. [[OS_UpCall 257|Move memory request]]| h6. Controlling sources: "Hdr:UpCall":https://gitlab.riscosopen.org/RiscOS/Sources/Programmer/HdrSrc/-/blob/master/hdr/UpCall managed by the "allocations manager":/content/allocate h4. See also * [[Software Vector Numbers]] * [[UpCallV]]