Showing changes from revision #1 to #2:
Added | Removed | Changed
The API of this vector depends on processor mode.
In 32bit processor modes, the API is as for OS_ReadLine32:
Entry | |
---|---|
R0 | Buffer |
R1 | Size of buffer -1 (bit31 should be ignored) |
R2 | Lowest char allowed |
R3 | Highest char allowed |
R4 | Character to output + flags |
Exit | |
---|---|
R0 | Preserve |
R1 | Chars read, excluding Return |
R2 | Preserve |
R3 | Preserve |
R4 | Preserve |
C flag is set if input is terminated by an escape condition |
In 26bit processor modes, the API is dependent on R1 bit31. If it is set, the API is as above (and bit31 must be masked out). Otherwise it is as OS_ReadLine:
Entry | |
---|---|
R0 | Buffer + flags |
R1 | Size of buffer -1 |
R2 | Lowest char allowed |
R3 | Highest char allowed |
R4 | Character to output (if bit 30 set) |
Exit | |
---|---|
R0 | Buffer address, without flags |
R1 | Chars read, excluding Return |
R2 | Preserve |
R3 | Preserve |
R4 | Preserve |
C flag is set if input is terminated by an escape condition |
This vector is called to indirect all calls to OS_ReadLine and OS_ReadLine32.
Claimants must first check the processor mode. If running in a 32bit mode, the OS_ReadLine32 API is used, with flags in R4. Else, if R1 bit31 is set, the OS_ReadLine32 API is used, with flags in R4. Otherwise, the OS_ReadLine API is used, with flags in R0.
As well as the kernel, common implementations can be found in the ReadLine and LineEditor third-party modules.