h6. [[OS SWI Calls]] h6(. » OS_ReadLine h2. OS_ReadLine h5. (SWI &0E) *This SWI does not work correctly under RISC OS 5* |_<^{width:4em}. Entry | | |<^. R0 |<^. Buffer + [[OS_ReadLine Flags|flags]] (flags ignored in RISC OS 5) | |<^. R1 |<^. Size of buffer -1 (maximum number of bytes to return, excluding CR) | |<^. R2 |<^. Lowest char allowed | |<^. R3 |<^. Highest char allowed | |<^. R4 |<^. Character to output (if R0 bit 30 set) (ignored in RISC OS 5) | |_<^{width:4em}. Exit | | |<^. R0 |<^. “Corrupted” (all implementations return the buffer address, minus flags) | |<^. R1 |<^. Bytes read, excluding Return | |<^. R2 |<^. “Corrupted” (all implementations preserve R2) | |<^. R3 |<^. “Corrupted” (all implementations preserve R3) | |<^. R4 |<^. Preserved | |\2<^. C flag is set if input is terminated by an escape condition | h4. Use This SWI is deprecated, because the use of flag bits in address values makes it unsafe to use on systems with 32bit logical memory maps. Please use [[OS_ReadLine32]] instead. The purpose of this call is to read a line from the current input stream. h4. Notes Input is terminated with Return, Ctrl-J or Escape. Delete and Backspace deletes last char entered. Ctrl-U empties buffer. When the buffer is full, each successive attempt to enter a character results in a Ctrl-G 'beep'. Other than RISC OS 5, ReadLineV uses this API. RISC OS 5’s ReadLineV uses the [[OS_ReadLine32]] API instead. RISC OS Six introduced a flag in the top bit of R1 to select the [[OS_ReadLine32]] API instead. This identifies the API in use on ReadLineV in 26bit processor modes. h4. See also * [[OS_ReadLine Flags]] * [[OS_ReadLine32]]