User`s guide
The basic I/O functions also monitor the console to stop and start console output
scroll at the user's request. To provide this support, the console output functions
make internal status checks for an input character before writing a character to the
output device. The console input and console status functions also check the input
character. If the user types a CTRL-S, these functions make an additional Blos
console input call. This input call suspends execution until a character is typed. If the
typed character is not a CTRL-Q, an additional BIOS console input call is made.
Execution and console scrolling resume when the user types a CTRL-Q.
When the BDOS is suspended because of a typed CTRL-S, it scans input for three
special characters: CTRL-Q, CTRL-C, and CTRL-P. If the user types any other
character, the BDOS echoes a bell character, CTRL-G, to the console, discards the
input character, and continues the scan. If the user types a CTRL-C, the BDOS
executes a warm start which terminates the calling program. If the user types a
CTRL-P, the BDOS toggles the printer echo switch. The printer echo switch controls
whether console output is automatically echoed to the list device, LST:. The BDOS
signals when it turns on printer echo by sending a bell character to the console.
All basic console I/O functions discard any CTRL-Q or CTRL-P character that is
not preceded by a CTRL-S character. Thus, BDOS function 1 cannot read a CTRL-
S, CTRL-Q, or CTRL-P character. Furthermore, these characters are invisible to the
console status function.
The second category of console I/O is direct console I/O. BDOS function 6 can
proveide direct console I/O in situations where unadorned console I/O is required.
Function 6 actually consists of several sub-functions that support direct console input,
output, and status checks. The BDOS does not filter out special characters during
direct console I/O. The direct output sub-function does not expand tabs, and the
direct input sub-function does not echo typed characters to the console.
The third category of console I/O accepts edited input from the console. The only
function in this category, Function 10, Read Buffer Input, reads an input line from a
buffer and recognizes certain control characters that edit the input. As an option, the
line to be edited can be initialized by the calling program.
In the nonbanked version of CP/M 3, editing within the buffer is restricted to the
last character on the line. That. is, to edit a character embedded in the line, the user
must delete all characters that follow the erroneous character, correct the error, and
then retype the remainder of the line. The banked version of CP/M 3 supports
complete line editing in which characters can be deleted and inserted anywhere in the
line. In addition', the banked version can also recall the previously entered line.
2-4
2.2 BDOS Serial Device I/O CP/M 3 Programmer's Guide