Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Page Mode
! horizontal tab, and carriage return
! change to page mode
CALL SETMODE ( HOME^TERM^NUM, CHANGE^MODE, PAGE^MODE );
! all four interrupt characters are end-of-text characters
! set new page mode interrupt characters
CALL SETMODE (HOME^TERM^NUM, SET^INTCHARS, ETX^EOT, ETX^EOT);
! interrupt characters are end of text and end of transmission
! return to conversational mode
CALL SETMODE ( HOME^TERM^NUM, CHANGE^MODE, CONV^MODE );
! interrupt characters are restored to their initial values:
! backspace, line cancel, end of file, and carriage return
BREAK HANDLING
The break feature allows the terminal operator to signal a
| process by pressing the BREAK key while operating in conversa-
| tional mode or block mode. For example, a terminal operator
| can press the BREAK key while an application is running through
| the command interpreter. However, the effect of the BREAK key
| while the application is running through the command interpreter
| depends on whether the application performs its own break
| handling. If the application application does not perform its
| own break handling, pressing the BREAK key returns the command
| interpreter to command input mode. If the application performs
| its own break handling, pressing the BREAK key interrupts the
| application without requiring the application to periodically
| check the terminal for input. However, the application must
| check the $RECEIVE file for a BREAK message. The break message
contains the following information:
• -20 (indicates that this is a break message)
• Logical device number, in binary, of device where BREAK was
pressed
• System number, in binary, of device where BREAK was pressed
Once the BREAK key is pressed, it is disabled, and further breaks
on that terminal are ignored. BREAK is automatically reenabled
for the owner when a READ or WRITEREAD is issued to the terminal.
An application that does not wish to issue a READ or WRITEREAD
reenables BREAK with a SETMODE 11 call.
4-14 November 1987