This the multi-page printable view of this section.Click here to print.

Return to the regular view of this page.

Read line from input

Table of Contents

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.