Screen Control Procedures

The following Sections describe the procedures available to a user program. These procedures return information about how to drive the type of terminal currently in use. In the case of phone and PSS connections, the TERMINALTYPE command must be used at some point to set this up.

VDUI

%externalintegerfunctionspec vdui(%integer n) This function returns various integer characteristics of the terminal. A result of zero is usually an error. n = 1 Terminal type n = 2 Columns per line n = 3 Lines per page (zero for hard copy) n = 4 ASCII code for recommended interrupt character n = 5 Base character for X position n = 6 Base character for Y position

VDUB

This function returns various boolean characteristics of the terminal. A result of zero indicates 'no' or 'false', and a result of 1 indicates 'yes' or 'true'. A result of -1 indicates an error. %externalintegerfunctionspec vdub(%integer n) n = 1 Home moves cursor to top line n = 2 Terminal can operate in page mode n = 3 Y coordinate comes first n = 4 Terminal auto wraps at line end

VDUC

This function returns a string which, if sent to the terminal, will move the cursor to specified coordinates. A null result indicates that the terminal is incapable of controlled cursor positioning. %externalstringfunctionspec vduc(%integer x,y) The values 'x' and 'y' have an origin of zero (e.g. top left is 0,0).

VDUS

%externalstringfunctionspec vdus(%integer n) This function returns a string. Sometimes this is a name, but usually it is a value which must be 'printch'd to achieve a particular effect on the terminal. A null result indicates that the operation is not supported by that terminal. n = 0 Terminal name n = 1 Clear screen (cursor moved to home) n = 2 Cursor home n = 3 Clear to end of line n = 4 Clear to end of screen n = 5 Initialise terminal n = 6 Cursor up n = 7 Cursor down n = 8 Cursor left n = 9 Cursor right n = 10 Insert line n = 11 Delete line n = 12 Set terminal into page mode n = 13 Set terminal into roll mode n = 14 String to append to start of cursor X movement n = 15 String to append to start of cursor Y movement n = 16 Two character Unix name for terminal type n = 17 Start standout mode n = 18 End standout mode n = 19 Raw cursor positioning string

PRINTCHS

KEY %externalroutinespec printchs(%string(255) s) If the length of 's' is > 0, this routine effectively calls 'printch' for each character of the string. If the length of 's' is zero, the routine has no effect.