Read line from input
OSWord call | Action | Available on: | ||||
---|---|---|---|---|---|---|
(dec) | (hex) | BBC | Master | Electron | ||
0 | 00 | Read line from input | x | x | x |
This routine takes a specified number of characters from the currently selected input stream.
Input is terminated following a RETURN or an ESCAPE. DELETE (&7F/127) deletes the previous character and CTRL U (&15/21) deletes the entire line.
If characters are presented after the maximum line length has been reached the characters are ignored and a BEL (ASCII 7) character is output.
OSWORD 0x00 is the only OSWord which return's data in the registers.
Parameter block
XY+ | Size | Content |
---|---|---|
0 | 2 | Buffer address for input |
2 | 1 | Maximum line length |
3 | 1 | Minimum acceptable ASCII value |
4 | 1 | Maximum acceptable ASCII value |
Only characters greater or equal to XY+3 and less than or equal to XY+4 will be accepted. This is useful for forms where you want only digits by setting the minimum to '0' and maximum to '9'
On exit
C=0 | Carriage return terminate input |
---|---|
C=1 | ESCAPE condition terminated input |
Y | Contains line length, excluding carriage return if used. |
Last modified October 6, 2021: Move BBC content into subdirectory to allow more bbc content (23080e8)