h6. [[OS SWI Calls]] h6(. » [[OS_Byte]] h6((. » OS_Byte 128 h2. OS_Byte 128 h5. (SWI &06) |_<^{width:3em}. Entry | | |<^. R0|<^. 128 (&80) | |<^. R1|<^. [[OS_Byte 128 Reason Codes|Reason code]] | |_<^{width:3em}. Exit|_<^. | |<^. R0|<^. Preserved | |/2<^. R1|<^. If R1 = 1 on entry: state of switch 0 on joysticks 0 (in bit 0) and 1 (in bit 1) | |<^. Otherwise: Bits 0-7 give LSB of answer| |/2<^. R2|<^. If R1 = 1 on entry: Number of last channel converted | |<^. Otherwise: Bits 0-23 give bits 8-31 of answer | h4. Use The purpose of this call is to return the mouse coordinates, or number of bytes in an input buffer, or number of free bytes in an output buffer. h4. Notes This call checks the (buffered) mouse position or the free space in system buffers, depending on the reason code passed in R1. It is recommended to use [[OS_Mouse]] to read the mouse position, as this reads the current (unbuffered) position. h4. See also * [[OS_Byte]] * [[OS_Mouse]]