h6. [[OS SWI Calls]] h6(. » OS_WriteC h2. OS_WriteC h5. (SWI &00) |_<^{width:4em}. Entry | | |<^. R0 |<^. Character to write | |_<^{width:4em}. Exit | | |<^. R0 |<^. Preserved | h4. Use The purpose of this call is to send a character to all of the active output streams. h4. Notes This SWI sends the byte in R0 to all active output streams (see [[OS_Byte 3]] for specifying a stream). Do not assume that this SWI will never generate an error - it can and occasionally does. Consider the case where output is redirected to a file on a filing system which has no space. This is the most common example. A less common, but possible case is where an application displays a string in its Exit handler. Under a [[TaskWindow]], if you close the window before the task has exited, its Exit handler is called. This should tidy up and exit. If it prints strings using non-X versions of the SWIs an error will be generated. This will call the Error handler, which will either display a message or call the Exit handler. In the former case, if X SWIs are used the Exit handler is usually called. The outcome of this is that a TaskWindow can hog 99% of the processor time as it switches in and out of SVC mode incredibly quickly in an infinite sequence of errors. Avoid this by using X SWIs. h4. See also * [[OS_Byte 3]] * [[OS_Write0]] * [[OS_WriteI]] * [[OS_WriteN]] * [[OS_WriteS]] * [[TaskWindow]]