h6. [[OS SWI Calls]] h6(. » OS_Byte h2. OS_Byte h5. (SWI &06) |_<^{width:3em}. Entry | | |<^. R0|<^. "Reason codes":#reason | h4. Use This SWI has many different uses. h4. Notes Different parts of the Operating System rely on this SWI. The value in R0 upon entry determines the function of the call, and is known as the reason code. For calls with reason codes between 166 and 255:<br /> <code>NewVal = (OldVal AND R2) EOR R1</code><br /> |<^. To read:|<^. R1=0|<^. R2=&FF| |<^. To write:|<^. R1=New Value|<^. R2=0| h4(#reason). Reason Codes |_<^{width:3em}. #|_<^{width:3em}. Hex|_<^. Meaning| |<^. 0|<^. &00|<^. [[OS_Byte 0|Display OS version info]]| |<^. 1|<^. &01|<^. [[OS_Byte 1|Write user flag]]| |<^. 2|<^. &02|<^. [[OS_Byte 2|Specify input stream]]| |<^. 3|<^. &03|<^. [[OS_Byte 3|Specify output stream]]| |<^. 4|<^. &04|<^. [[OS_Byte 4|Cursor key status]]| |<^. 5|<^. &05|<^. [[OS_Byte 5|Write printer driver type]]| |<^. 6|<^. &06|<^. [[OS_Byte 6|Write printer ignore char]]| |<^. 7|<^. &07|<^. [[OS_Byte 7|Write RS232 receive rate]]| |<^. 8|<^. &08|<^. [[OS_Byte 8|Write RS232 transmit rate]]| |<^. 9|<^. &09|<^. [[OS_Byte 9|Write duration of first flash colour]]| |<^. 10|<^. &0A|<^. [[OS_Byte 10|Write duration of second flash colour]]| |<^. 11|<^. &0B|<^. [[OS_Byte 11|Write keyboard auto-repeat delay]]| |<^. 12|<^. &0C|<^. [[OS_Byte 12|Write keyboard auto-repeat rate]]| |<^. 13|<^. &0D|<^. [[OS_Byte 13|Disable event]]| |<^. 14|<^. &0E|<^. [[OS_Byte 14|Enable event]]| |<^. 15|<^. &0F|<^. [[OS_Byte 15|Flush buffer]]| |<^. 16|<^. &10|<^. [[OS_Byte 16|Store number of channels to be sampled]]| |<^. 17|<^. &11|<^. [[OS_Byte 17|Return to the caller, doing nothing]]| |<^. 18|<^. &12|<^. [[OS_Byte 18|Reset function keys]]| |<^. 19|<^. &13|<^. [[OS_Byte 19|Wait for vsync]]| |<^. 20|<^. &14|<^. [[OS_Byte 20|Reset font definitions]]| |<^. 21|<^. &15|<^. [[OS_Byte 21|Flush selected buffer]]| |<^. 25|<^. &19|<^. [[OS_Byte 25|Reset group of font definitions]]| |<^. 70|<^. &46|<^. [[OS_Byte 70|Read/Write country number]]| |<^. 71|<^. &47|<^. [[OS_Byte 71|Read/Write alphabet or keyboard number]]| |<^. 106|<^. &6A|<^. [[OS_Byte 106|Select pointer/Activate mouse]]| |<^. 112|<^. &70|<^. [[OS_Byte 112|Write VDU driver screen bank]]| |<^. 113|<^. &71|<^. [[OS_Byte 113|Write display hardware screen bank]]| |<^. 114|<^. &72|<^. [[OS_Byte 114|Write shadow/non-shadow state]]| |<^. 117|<^. &75|<^. [[OS_Byte 117|Read VDU status]]| |<^. 118|<^. &76|<^. [[OS_Byte 118|Reflect keyboard status in LEDs]]| |<^. 120|<^. &78|<^. [[OS_Byte 120|Temporarily lock auto-repeat]]| |<^. 121|<^. &79|<^. [[OS_Byte 121|Keyboard scan]]| |<^. 122|<^. &7A|<^. [[OS_Byte 122|Keyboard scan from 16 decimal]]| |<^. 124|<^. &7C|<^. [[OS_Byte 124|Clear escape condition]]| |<^. 125|<^. &7D|<^. [[OS_Byte 125|Set escape condition]]| |<^. 126|<^. &7E|<^. [[OS_Byte 126|Acknowledge escape condition]]| |<^. 127|<^. &7F|<^. [[OS_Byte 127|Check for end of file]]| |<^. 128|<^. &80|<^. [[OS_Byte 128|Return the switch state and last channel converted, or a channel's uncalibrated position]]| |<^. 129|<^. &81|<^. [[OS_Byte 129|Scan for a particular key]]| |<^. 134|<^. &86|<^. [[OS_Byte 134|Read text cursor position]]| |<^. 135|<^. &87|<^. [[OS_Byte 135|Read char at text cursor, and screen mode]]| |<^. 138|<^. &8A|<^. [[OS_Byte 138|Insert byte into buffer]]| |<^. 139|<^. &8B|<^. [[OS_Byte 139|Write filing system options]]| |<^. 143|<^. &8F|<^. [[OS_Byte 143|Issue module service call]]| |<^. 144|<^. &90|<^. [[OS_Byte 144|Set vertical screen shift, and interlace]]| |<^. 145|<^. &91|<^. [[OS_Byte 145|Get char from buffer]]| |<^. 152|<^. &98|<^. [[OS_Byte 152|Examine buffer status]]| |<^. 153|<^. &99|<^. [[OS_Byte 153|Insert char into input buffer]]| |<^. 156|<^. &9C|<^. [[OS_Byte 156|Read/Write serial port state]]| |<^. 160|<^. &A0|<^. [[OS_Byte 160|Read VDU variable value]]| |<^. 161|<^. &A1|<^. [[OS_Byte 161|Read non-volatile CMOS memory]]| |<^. 162|<^. &A2|<^. [[OS_Byte 162|Write non-volatile CMOS memory]]| |<^. 163|<^. &A3|<^. [[OS_Byte 163|Read/Write general graphics info]]| |<^. 165|<^. &A5|<^. [[OS_Byte 165|Read output cursor position]]| |<^. 176|<^. &B0|<^. [[OS_Byte 176|50 Hz counter]]| |<^. 177|<^. &B1|<^. [[OS_Byte 177|Read input source]]| |<^. 178|<^. &B2|<^. [[OS_Byte 178|Read/Write keyboard semaphore]]| |<^. 181|<^. &B5|<^. [[OS_Byte 181|Read/Write serial input interpretation status]]| |<^. 182|<^. &B6|<^. [[OS_Byte 182|Read/Write NoIgnore state]]| |<^. 188|<^. &BC|<^. [[OS_Byte 188|Read the current channel]]| |<^. 189|<^. &BD|<^. [[OS_Byte 189|Read the number of channels to be sampled]]| |<^. 190|<^. &BE|<^. [[OS_Byte 190|Read the resolution of conversion]]| |<^. 191|<^. &BF|<^. [[OS_Byte 191|Read/Write RS423 busy flag]]| |<^. 192|<^. &C0|<^. [[OS_Byte 192|Read serial port state]]| |<^. 193|<^. &C1|<^. [[OS_Byte 193|Read/Write flash counter]]| |<^. 194|<^. &C2|<^. [[OS_Byte 194|Read duration of second flash colour]]| |<^. 195|<^. &C3|<^. [[OS_Byte 195|Read duration of first flash colour]]| |<^. 196|<^. &C4|<^. [[OS_Byte 196|Read/Write keyboard auto-repeat delay]]| |<^. 197|<^. &C5|<^. [[OS_Byte 197|Read/Write keyboard auto-repeat rate]]| |<^. 198|<^. &C6|<^. [[OS_Byte 198|Read/Write *Exec file handle]]| |<^. 199|<^. &C7|<^. [[OS_Byte 199|Read/Write *Spool file handle]]| |<^. 200|<^. &C8|<^. [[OS_Byte 200|Read/Write Break and Escape effect]]| |<^. 201|<^. &C9|<^. [[OS_Byte 201|Read/Write keyboard disable flag]]| |<^. 202|<^. &CA|<^. [[OS_Byte 202|Read/Write keyboard status byte]]| |<^. 203|<^. &CB|<^. [[OS_Byte 203|Read/Write serial input buffer minimum space]]| |<^. 204|<^. &CC|<^. [[OS_Byte 204|Read/Write serial ignore flag]]| |<^. 211|<^. &D3|<^. [[OS_Byte 211|Read/Write bell channel]]| |<^. 212|<^. &D4|<^. [[OS_Byte 212|Read/Write bell sound volume]]| |<^. 213|<^. &D5|<^. [[OS_Byte 213|Read/Write bell frequency]]| |<^. 214|<^. &D6|<^. [[OS_Byte 214|Read/Write bell duration]]| |<^. 216|<^. &D8|<^. [[OS_Byte 216|Read/Write length of function key string]]| |<^. 217|<^. &D9|<^. [[OS_Byte 217|Read/Write paged mode line count]]| |<^. 218|<^. &DA|<^. [[OS_Byte 218|Read/Write bytes in VDU queue]]| |<^. 219|<^. &DB|<^. [[OS_Byte 219|Read/Write Tab key code]]| |<^. 220|<^. &DC|<^. [[OS_Byte 220|Read/Write escape character]]| |<^. 221|<^. &DD|<^. [[OS_Byte 221 - 228|Read/Write interpretation of input values &C0-&CF]]| |<^. 222|<^. &DE|<^. [[OS_Byte 221 - 228|Read/Write interpretation of input values &D0-&DF]]| |<^. 223|<^. &DF|<^. [[OS_Byte 221 - 228|Read/Write interpretation of input values &E0-&EF]]| |<^. 224|<^. &E0|<^. [[OS_Byte 221 - 228|Read/Write interpretation of input values &F0-&FF]]| |<^. 225|<^. &E1|<^. [[OS_Byte 221 - 228|Read/Write function key interpretation]]| |<^. 226|<^. &E2|<^. [[OS_Byte 221 - 228|Read/Write Shift Fn interpretation]]| |<^. 227|<^. &E3|<^. [[OS_Byte 221 - 228|Read/Write Ctrl Fn interpretation]]| |<^. 228|<^. &E4|<^. [[OS_Byte 221 - 228|Read/Write Shift Ctrl Fn interpretation]]| |<^. 229|<^. &E5|<^. [[OS_Byte 229|Read/Write escape key status]]| |<^. 230|<^. &E6|<^. [[OS_Byte 230|Read/Write escape effects]]| |<^. 236|<^. &EC|<^. [[OS_Byte 236|Read/Write character destination status]]| |<^. 237|<^. &ED|<^. [[OS_Byte 237|Read/Write cursor key status]]| |<^. 238|<^. &EE|<^. [[OS_Byte 238|Read/Write numeric keypad interpretation]]| |<^. 240|<^. &F0|<^. [[OS_Byte 240|Read country number]]| |<^. 241|<^. &F1|<^. [[OS_Byte 241|Read/Write user flag]]| |<^. 242|<^. &F2|<^. [[OS_Byte 242|Read serial baud rates]]| |<^. 243|<^. &F3|<^. [[OS_Byte 243|Read timer switch state]]| |<^. 245|<^. &F5|<^. [[OS_Byte 245|Read/Write printer driver type]]| |<^. 246|<^. &F6|<^. [[OS_Byte 246|Read/Write printer ignore character]]| |<^. 247|<^. &F7|<^. [[OS_Byte 247|Read/Write Break key actions]]| |<^. 250|<^. &FA|<^. [[OS_Byte 250|Read VDU driver screen bank number]]| |<^. 251|<^. &FB|<^. [[OS_Byte 251|Read display screen bank number]]| |<^. 253|<^. &FD|<^. [[OS_Byte 253|Read last break type]]| |<^. 254|<^. &FE|<^. [[OS_Byte 254|Set effect of Shift-Ctrl on numeric keypad]]| |<^. 255|<^. &FF|<^. [[OS_Byte 255|Read/Write boot option]]| h6. Controlling sources: "Hdr:OsBytes":https://gitlab.riscosopen.org/RiscOS/Sources/Programmer/HdrSrc/-/blob/master/hdr/OsBytes managed by the "allocations manager":/content/allocate h4. See also * [[OS_Byte CMOS Settings]] [link3]OS_Byte+Reason+Codes