I$ReadLn
From NitrOS-9
Read Line With Editing | Reads a text line with editing |
OS9 I$ReadLn 103F 8B |
Entry Conditions
A path number
X address at which to store data
Y maximum number of bytes to read
Exit Conditions
Y number of bytes read
Error Output
CC carry set on error
B error code, if any
Additional Information
- Read Line is similar to Read. The difference is that Read Line reads the input file or device until it encounters a carriage return character or until it reaches the maximum byte count specified, whichever comes first. The Read Line also automatically activates line editing on character oriented devices, such as terminals and printers. The line editing refers to auto line feed, null padding at the end of the line, backspacing, line deleting, and so on.
- SCF requires that the last byte entered be an end-of-record character (usually a carriage return). If more data is entered than the maximum specified, Read Line does not accept it and a PD.OVF character (usually a bell) is echoed.
- After one Read Line call reads all the data in a file, the next Read Line call generates an end-of-file error.
- For more information about line editing, see “SCF Line Editing Functions” in Chapter 6.