MOSTEK CRT DRIVER USER'S GUIDE MOSTEK CRT DRIVER USER'S GUIDE MOSTEK CRT DRIVER USER'S GUIDE FOR SOFTWARE RELEASE 2.1 BY KEVIN KLUGHART CONTENTS CHAPTER 1 GENERAL INFORMATION 1.1 SUMMARY . . . . . . . . . . . . . . . . . . . . . 1-2 1.2 DESCRIPTION . . . . . . . . . . . . . . . . . . . 1-3 1.3 STRUCTURE . . . . . . . . . . . . . . . . . . . . 1-5 CHAPTER 2 USING THE CRT DRIVER 2.1 INITIALIZATION AND EXIT . . . . . . . . . . . . . 2-2 2.1.1 CRT_INITIALIZE . . . . . . . . . . . . . . . . . 2-4 2.1.2 CRT_EXIT . . . . . . . . . . . . . . . . . . . . 2-5 CHAPTER 3 CHARACTER I/O FUNCTION COMMANDS 3.1 CHARACTER INPUT COMMANDS . . . . . . . . . . . . . 3-3 3.1.1 CRT_READ(STRING) . . . . . . . . . . . . . . . . 3-4 3.1.2 CRT_INPUT(STRING) . . . . . . . . . . . . . . . 3-4 3.1.3 CRT_POLL(STRING,TIME_PERIOD) . . . . . . . . . . 3-4 3.2 CHARACTER OUTPUT COMMANDS . . . . . . . . . . . . 3-5 3.2.1 MULTIPLE BYTE OUTPUT COMMANDS . . . . . . . . . 3-6 3.2.1.1 CRT_WRITE(STRING) . . . . . . . . . . . . . . 3-6 3.2.1.2 CRT_PRINT(STRING) . . . . . . . . . . . . . . 3-6 3.2.1.3 CRT_LARGE(STRING) . . . . . . . . . . . . . . 3-6 3.2.2 SINGLE BYTE OUTPUT COMMANDS . . . . . . . . . . 3-7 3.2.2.1 CRT_ASCII(ASCII_CODE) . . . . . . . . . . . . 3-7 3.2.2.2 CRT_BELL . . . . . . . . . . . . . . . . . . . 3-7 3.2.2.3 CRT_TAB . . . . . . . . . . . . . . . . . . . 3-7 3.2.2.4 CRT_LINEFEED . . . . . . . . . . . . . . . . . 3-7 3.2.2.5 CRT_VFU . . . . . . . . . . . . . . . . . . . 3-7 3.2.2.6 CRT_FORMFEED . . . . . . . . . . . . . . . . . 3-7 3.2.2.7 CRT_RETURN . . . . . . . . . . . . . . . . . . 3-8 3.2.2.8 CRT_NEXT_LINE . . . . . . . . . . . . . . . . 3-8 CHAPTER 4 SCREEN CONTROL FUNCTIONS 4.1 HORIZONTAL AND VERTICAL MARGIN COMMANDS . . . . . 4-3 4.1.1 CRT_MARGIN(LEFT,RIGHT) . . . . . . . . . . . . . 4-4 4.1.2 CRT_REGION(TOP,BOTTOM) . . . . . . . . . . . . . 4-4 4.1.3 CRT_FORM_LENGTH(LENGTH) . . . . . . . . . . . . 4-4 4.2 CURSOR MOVEMENT COMMANDS . . . . . . . . . . . . . 4-5 4.2.1 CRT_HOME, CRT_HOME_UP . . . . . . . . . . . . . 4-6 4.2.2 CRT_HOME_RIGHT . . . . . . . . . . . . . . . . . 4-6 4.2.3 CRT_HOME_DOWN . . . . . . . . . . . . . . . . . 4-6 4.2.4 CRT_HOME_BOTTOM . . . . . . . . . . . . . . . . 4-6 4.2.5 CRT_MOVE_UP(COUNT) . . . . . . . . . . . . . . . 4-7 4.2.6 CRT_MOVE_DOWN(COUNT) . . . . . . . . . . . . . . 4-7 4.2.7 CRT_MOVE_RIGHT(COUNT) . . . . . . . . . . . . . 4-7 4.2.8 CRT_MOVE_LEFT(COUNT) . . . . . . . . . . . . . . 4-7 4.2.9 CRT_MOVE(ROW,COLUMN) . . . . . . . . . . . . . . 4-7 4.2.10 CRT_POSITION(ROW,COLUMN) . . . . . . . . . . . . 4-7 4.2.11 CRT_INDEX, CRT_INDEX_DOWN . . . . . . . . . . . 4-8 4.2.12 CRT_INDEX_NEXT . . . . . . . . . . . . . . . . . 4-8 4.2.13 CRT_INDEX_UP . . . . . . . . . . . . . . . . . . 4-8 4.2.14 CRT_STORE . . . . . . . . . . . . . . . . . . . 4-8 4.2.15 CRT_RESTORE . . . . . . . . . . . . . . . . . . 4-8 4.3 TAB STOP COMMANDS . . . . . . . . . . . . . . . . 4-9 4.3.1 HORIZONTAL TAB STOP COMMANDS . . . . . . . . . 4-10 4.3.1.1 CRT_SET_TAB . . . . . . . . . . . . . . . . 4-10 4.3.1.2 CRT_CLEAR_TAB . . . . . . . . . . . . . . . 4-10 4.3.1.3 CRT_CLEAR_TABS . . . . . . . . . . . . . . . 4-10 4.3.1.4 CRT_TAB . . . . . . . . . . . . . . . . . . 4-10 4.3.2 VERTICAL TAB STOP (VFU) COMMANDS . . . . . . . 4-11 4.3.2.1 CRT_SET_VFU . . . . . . . . . . . . . . . . 4-11 4.3.2.2 CRT_CLEAR_VFU . . . . . . . . . . . . . . . 4-11 4.3.2.3 CRT_CLEAR_VFUS . . . . . . . . . . . . . . . 4-11 4.3.2.4 CRT_VFU . . . . . . . . . . . . . . . . . . 4-11 4.4 HORIZONTAL AND VERTICAL PITCH COMMANDS . . . . . 4-12 4.4.1 CRT_HORIZONTAL(PITCH) . . . . . . . . . . . . 4-13 4.4.2 CRT_VERTICAL(PITCH) . . . . . . . . . . . . . 4-13 4.4.3 CRT_DOUBLE_TOP . . . . . . . . . . . . . . . . 4-13 4.4.4 CRT_DOUBLE_BOT . . . . . . . . . . . . . . . . 4-13 4.4.5 CRT_SINGLE_WIDE . . . . . . . . . . . . . . . 4-13 4.4.6 CRT_DOUBLE_WIDE . . . . . . . . . . . . . . . 4-14 4.5 CHARACTER ATTRIBUTE COMMANDS . . . . . . . . . . 4-15 4.5.1 CRT_TURN_OFF . . . . . . . . . . . . . . . . . 4-16 4.5.2 CRT_BOLD . . . . . . . . . . . . . . . . . . . 4-16 4.5.3 CRT_UNDER . . . . . . . . . . . . . . . . . . 4-16 4.5.4 CRT_BLINK . . . . . . . . . . . . . . . . . . 4-16 4.5.5 CRT_REVERSE . . . . . . . . . . . . . . . . . 4-16 4.5.6 COLOR SELECTION COMMANDS . . . . . . . . . . . 4-17 4.5.6.1 CRT_COLOR(COLOR_MASK) . . . . . . . . . . . 4-18 4.5.6.2 CRT_HUE_BLACK . . . . . . . . . . . . . . . 4-18 4.5.6.3 CRT_HUE_RED . . . . . . . . . . . . . . . . 4-18 4.5.6.4 CRT_HUE_GREEN . . . . . . . . . . . . . . . 4-18 4.5.6.5 CRT_HUE_YELLOW . . . . . . . . . . . . . . . 4-18 4.5.6.6 CRT_HUE_BLUE . . . . . . . . . . . . . . . . 4-19 4.5.6.7 CRT_HUE_MAGENTA . . . . . . . . . . . . . . 4-19 4.5.6.8 CRT_HUE_CYAN . . . . . . . . . . . . . . . . 4-19 4.5.6.9 CRT_HUE_WHITE . . . . . . . . . . . . . . . 4-19 4.6 ERASING COMMANDS . . . . . . . . . . . . . . . . 4-20 4.6.1 CRT_CLEAR_EOL . . . . . . . . . . . . . . . . 4-21 4.6.2 CRT_CLEAR_BOL . . . . . . . . . . . . . . . . 4-21 4.6.3 CRT_CLEAR_LINE . . . . . . . . . . . . . . . . 4-21 4.6.4 CRT_CLEAR_BOP . . . . . . . . . . . . . . . . 4-21 4.6.5 CRT_CLEAR_EOP . . . . . . . . . . . . . . . . 4-21 4.6.6 CRT_CLEAR_PAGE . . . . . . . . . . . . . . . . 4-21 4.7 SPECIAL DISPLAY COMMANDS . . . . . . . . . . . . 4-22 4.7.1 CRT_CLEAR_LEDS . . . . . . . . . . . . . . . . 4-23 4.7.2 CRT_SET_LED(LED) . . . . . . . . . . . . . . . 4-23 CHAPTER 5 CHARACTER SET SELECTION COMMANDS 5.1 STANDARD CHARACTER SET COMMANDS . . . . . . . . . 5-3 5.1.1 USASCII . . . . . . . . . . . . . . . . . . . . 5-4 5.1.1.1 CRT_USASCII, CRT_USASCII_G0 . . . . . . . . . 5-4 5.1.1.2 CRT_USASCII_G1 . . . . . . . . . . . . . . . . 5-4 5.1.2 UNITED KINGDOM (UK) . . . . . . . . . . . . . . 5-5 5.1.2.1 CRT_UK, CRT_UK_G0 . . . . . . . . . . . . . . 5-5 5.1.2.2 CRT_UK_G1 . . . . . . . . . . . . . . . . . . 5-5 5.1.3 GRAPHICS LINE DRAWING . . . . . . . . . . . . . 5-6 5.1.3.1 CRT_GRAPHICS, CRT_GRAPHICS_G0 . . . . . . . . 5-6 5.1.3.2 CRT_GRAPHICS_G1 . . . . . . . . . . . . . . . 5-6 5.2 NONSTANDARD CHARACTER SET COMMANDS . . . . . . . . 5-7 5.2.1 ROM1 CHARACTER SET . . . . . . . . . . . . . . . 5-8 5.2.1.1 CRT_ROM1, CRT_ROM1_G0 . . . . . . . . . . . . 5-8 5.2.1.2 CRT_ROM1_G1 . . . . . . . . . . . . . . . . . 5-8 5.2.2 ROM2 CHARACTER SET . . . . . . . . . . . . . . . 5-9 5.2.2.1 CRT_ROM2, CRT_ROM2_G0 . . . . . . . . . . . . 5-9 5.2.2.2 CRT_ROM2_G1 . . . . . . . . . . . . . . . . . 5-9 CHAPTER 6 SPECIAL GRAPHICS SYMBOLS 6.1 STANDARD GRAPHICS CHARACTERS . . . . . . . . . . . 6-3 6.1.1 CRT_SYM_BLANK . . . . . . . . . . . . . . . . . 6-4 6.1.2 CRT_SYM_DIAMOND . . . . . . . . . . . . . . . . 6-4 6.1.3 CRT_SYM_CHECK . . . . . . . . . . . . . . . . . 6-4 6.1.4 CRT_SYM_HT . . . . . . . . . . . . . . . . . . . 6-4 6.1.5 CRT_SYM_FF . . . . . . . . . . . . . . . . . . . 6-4 6.1.6 CRT_SYM_CR . . . . . . . . . . . . . . . . . . . 6-4 6.1.7 CRT_SYM_LF . . . . . . . . . . . . . . . . . . . 6-4 6.1.8 CRT_SYM_DEGREE . . . . . . . . . . . . . . . . . 6-5 6.1.9 CRT_SYM_PL_MIN . . . . . . . . . . . . . . . . . 6-5 6.1.10 CRT_SYM_NL . . . . . . . . . . . . . . . . . . . 6-5 6.1.11 CRT_SYM_VT . . . . . . . . . . . . . . . . . . . 6-5 6.1.12 CRT_SYM_LRC . . . . . . . . . . . . . . . . . . 6-5 6.1.13 CRT_SYM_URC . . . . . . . . . . . . . . . . . . 6-5 6.1.14 CRT_SYM_ULC . . . . . . . . . . . . . . . . . . 6-5 6.1.15 CRT_SYM_LLC . . . . . . . . . . . . . . . . . . 6-6 6.1.16 CRT_SYM_CROSS . . . . . . . . . . . . . . . . . 6-6 6.1.17 CRT_SYM_SCAN1 . . . . . . . . . . . . . . . . . 6-6 6.1.18 CRT_SYM_SCAN3 . . . . . . . . . . . . . . . . . 6-6 6.1.19 CRT_SYM_SCAN5 . . . . . . . . . . . . . . . . . 6-6 6.1.20 CRT_SYM_SCAN7 . . . . . . . . . . . . . . . . . 6-6 6.1.21 CRT_SYM_SCAN9 . . . . . . . . . . . . . . . . . 6-6 6.1.22 CRT_SYM_LEFT_T . . . . . . . . . . . . . . . . . 6-7 6.1.23 CRT_SYM_RIGHT_T . . . . . . . . . . . . . . . . 6-7 6.1.24 CRT_SYM_LOWER_T . . . . . . . . . . . . . . . . 6-7 6.1.25 CRT_SYM_UPPER_T . . . . . . . . . . . . . . . . 6-7 6.1.26 CRT_SYM_V_BAR . . . . . . . . . . . . . . . . . 6-7 6.1.27 CRT_SYM_V_LINE(COUNT) . . . . . . . . . . . . . 6-7 6.1.28 CRT_SYM_LE . . . . . . . . . . . . . . . . . . . 6-7 6.1.29 CRT_SYM_GE . . . . . . . . . . . . . . . . . . . 6-8 6.1.30 CRT_SYM_PI . . . . . . . . . . . . . . . . . . . 6-8 6.1.31 CRT_SYM_NE . . . . . . . . . . . . . . . . . . . 6-8 6.1.32 CRT_SYM_POUND . . . . . . . . . . . . . . . . . 6-8 6.1.33 CRT_SYM_DOT . . . . . . . . . . . . . . . . . . 6-8 CHAPTER 7 GRAPHICS PLOTTING COMMANDS 7.1 BASIC PLOTTING FUNCTIONS . . . . . . . . . . . . . 7-3 7.1.1 CRT_PLOT(X,Y) . . . . . . . . . . . . . . . . . 7-4 7.2 ADVANCED PLOTTING FUNCTIONS . . . . . . . . . . . 7-5 7.2.1 CRT_PLOT_X_BAR(X_START,Y_START,X_LIMIT) . . . . 7-6 7.2.2 CRT_PLOT_Y_BAR(X_START,Y_START,Y_LIMIT) . . . . 7-6 7.2.3 CRT_PLOT_VECTOR(X_STOP,Y_STOP) . . . . . . . . . 7-6 7.2.4 CRT_PLOT_LINE(X_START,Y_START,X_STOP,Y_STOP) . . 7-6 CHAPTER 8 TERMINAL MODE CONVERSION COMMANDS 8.1 STANDARD MODE CONVERSION COMMANDS . . . . . . . . 8-3 8.1.1 LINE MODES . . . . . . . . . . . . . . . . . . . 8-4 8.1.1.1 CRT_NL_MODE . . . . . . . . . . . . . . . . . 8-4 8.1.1.2 CRT_LF_MODE . . . . . . . . . . . . . . . . . 8-4 8.1.2 CURSOR KEYPAD MODES . . . . . . . . . . . . . . 8-5 8.1.2.1 CRT_CURSOR_APP . . . . . . . . . . . . . . . . 8-5 8.1.2.2 CRT_CURSOR_KEY . . . . . . . . . . . . . . . . 8-5 8.1.3 NUMERIC KEYPAD MODES . . . . . . . . . . . . . . 8-6 8.1.3.1 CRT_KEYPAD_APP . . . . . . . . . . . . . . . . 8-6 8.1.3.2 CRT_KEYPAD_NUM . . . . . . . . . . . . . . . . 8-6 8.1.4 TERMINAL EMULATION MODES . . . . . . . . . . . . 8-7 8.1.4.1 CRT_ANSI, CRT_VT100 . . . . . . . . . . . . . 8-7 8.1.4.2 CRT_VT52 . . . . . . . . . . . . . . . . . . . 8-7 8.1.4.3 CRT_ISC_8001 . . . . . . . . . . . . . . . . . 8-7 8.1.5 LINE WIDTH MODES . . . . . . . . . . . . . . . . 8-8 8.1.5.1 CRT_132_COLUMN . . . . . . . . . . . . . . . . 8-8 8.1.5.2 CRT_80_COLUMN . . . . . . . . . . . . . . . . 8-8 8.1.6 SCROLLING MODES . . . . . . . . . . . . . . . . 8-9 8.1.6.1 CRT_SMOOTH . . . . . . . . . . . . . . . . . . 8-9 8.1.6.2 CRT_JUMP . . . . . . . . . . . . . . . . . . . 8-9 8.1.7 SCREEN MODES . . . . . . . . . . . . . . . . . 8-10 8.1.7.1 CRT_PAGE_LIGHT . . . . . . . . . . . . . . . 8-10 8.1.7.2 CRT_PAGE_DARK . . . . . . . . . . . . . . . 8-10 8.1.8 CURSOR ORIGIN MODES . . . . . . . . . . . . . 8-11 8.1.8.1 CRT_RELATIVE . . . . . . . . . . . . . . . . 8-11 8.1.8.2 CRT_ABSOLUTE . . . . . . . . . . . . . . . . 8-11 8.1.9 LINE WRAP MODES . . . . . . . . . . . . . . . 8-12 8.1.9.1 CRT_WRAP_ON . . . . . . . . . . . . . . . . 8-12 8.1.9.2 CRT_WRAP_OFF . . . . . . . . . . . . . . . . 8-12 8.1.10 KEYBOARD REPEAT MODES . . . . . . . . . . . . 8-13 8.1.10.1 CRT_REPEAT_ON . . . . . . . . . . . . . . . 8-13 8.1.10.2 CRT_REPEAT_OFF . . . . . . . . . . . . . . . 8-13 8.1.11 VIDEO INTERLACE MODES . . . . . . . . . . . . 8-14 8.1.11.1 CRT_RETRACE_ON . . . . . . . . . . . . . . . 8-14 8.1.11.2 CRT_RETRACE_OFF . . . . . . . . . . . . . . 8-14 8.1.12 GRAPHICS PROCESSOR MODES . . . . . . . . . . . 8-15 8.1.12.1 CRT_GRAPHICS_ON . . . . . . . . . . . . . . 8-15 8.1.12.2 CRT_GRAPHICS_OFF . . . . . . . . . . . . . . 8-15 CHAPTER 9 AUXILIARY I/O PORT COMMANDS 9.1 STANDARD I/O PORT COMMANDS . . . . . . . . . . . . 9-3 9.1.1 CRT_PRINT_PAGE . . . . . . . . . . . . . . . . . 9-4 9.1.2 CRT_PRINTER_ON . . . . . . . . . . . . . . . . . 9-4 9.1.3 CRT_PRINTER_OFF . . . . . . . . . . . . . . . . 9-4 CHAPTER 10 DEVICE STATUS REPORT COMMANDS 10.1 SOFTWARE STATUS REPORTS . . . . . . . . . . . . 10-3 10.1.1 CRT_IO_STATUS(QUADWORD) . . . . . . . . . . . 10-4 10.1.2 CRT_SENSE_MODE(CLASS,TYPE,PAGWID,PAGLEN,TRMCHR) 10-5 10.1.3 CRT_TYPEAHEAD(BYTCNT,BYTONE) . . . . . . . . . 10-6 10.1.4 CRT_SET_MODE(CLASS,TYPE,PAGWID,PAGLEN,TRMCHR) 10-7 10.1.5 CRT_ESCAPE_ON . . . . . . . . . . . . . . . . 10-8 10.1.6 CRT_ESCAPE_OFF . . . . . . . . . . . . . . . . 10-8 10.2 DEVICE HARDWARE SPECIFIC STATUS REPORTS . . . . 10-9 10.2.1 CRT_ANSWERBACK . . . . . . . . . . . . . . . . 10-10 Index CHAPTER 1 GENERAL INFORMATION GENERAL INFORMATION Page 1-2 SUMMARY 22 Apr 81 1.1 SUMMARY This manual describes the operation of the VAX/VMS universal CRT terminal driver interface currently implemented on the VAX-11/780 computer system at MOSTEK. This document supersedes all previous documentation concerning the CRT (VT100) driver, whether written or oral. This is release 2.1 of the terminal driver package. Release 1.0 (08-03-79) supported only VT100 video terminals and was very narrow in its scope of operation and available functions. This release has been renamed CRT driver to emphasize the new transparency which comes with the inclusion of other video as well as hardcopy terminals in the range of supported interface devices. This release is designed to support the following terminals: DEC VT100 with advanced video option (AVO) DEC VT52 DEC LA36 DECWRITER II DEC LA120 DECWRITER III Datamedia DT80/1 Intelligent Systems Corp. 8001 color graphics Hewlett-Packard HP264X series PRINTRONIX Model 300/600 Printers QUME Corp. SPRINT 5 series In addition, for those terminals which support auxiliary I/O ports, the new release of the CRT driver fully supports BOTH terminals in such a configuration. This capability is designed to be upward compatible with future support of several on-line color graphics terminals tied to the auxiliary I/O ports of the existing video terminals at Mostek. Users of this software package are urged to read fully the following documentation, as there have been many changes in this software with release 2.1. The major changes involve the following: 1. Support of more terminals 2. Support of auxiliary I/O interface 3. Dynamic determination of terminal type 4. Increased driver speed (2X to 5X) 5. Reduction of unnecessary I/O 6. Cursor position report 7. Elimination of terminal width limits 8. Addition of SENSE MODE and SET MODE 9. Elimination of auxiliary I/O bugs GENERAL INFORMATION Page 1-3 DESCRIPTION 22 Apr 81 1.2 DESCRIPTION The CRT driver was designed in the summer of 1979 as a unified and consistent method of accessing the graphics and control functions of the VT100 terminal from high level languages such as FORTRAN, COBOL, BASIC and PASCAL. To this end a software package consisting of approximately 40 entrypoints was developed to interface the general FORTRAN or COBOL user with the advanced screen control and graphics functions of the VT100 and DT80/1 terminals. In this fashion, the burdon of issuing control and graphics commands could be carried by a set of utility subroutines, thus freeing the applications programmer to concentrate on the task of the applications program. In addition, this method of unifying the control functions within one single piece of software serves to reduce the amount of software that has to be written and in addition tends to make the software which is written easier to read, as the control function entrypoints have standardized naming conventions. This method of CRT control is fast, efficient, and will reduce the software development time of most graphics applications by 100% or more. In addition, a great deal of hardware compatibility can be maintained with respect to future display terminals. This hardware compatibility is the result of a sharp division between interfacial and algorithmic code segments. As stated by Harvy A. Cohen and Rhys S. Francis: To make any headway on the problem of code production and update it is necessary to examine the nature of the software changes induced by hardware configuration changes. Major portions of any well-structured code are unaltered by such changes. To eliminate once and for all the sheer messiness of having to make innumerable tiny alterations in what had been functional code, we need to erect a barrier within the software. Outside the barrier lies software not affected by hardware configuration changes. This software is essentially configuration-free; we call it algorithmic software. Within the barrier lies the intefacial software, including such items as input, output, and timing routines, special execution mode routines, and interrupt handlers. Our development strategy requires that properly constructed programs should never directly penetrate the barrier between algorithmic and interfacial code. Instead, all communication GENERAL INFORMATION Page 1-4 DESCRIPTION 22 Apr 81 between the two must be via specially provided bridges or links. COMPUTER, February, 1979 It is the function of the CRT driver to provide such bridges or links for terminal graphics and control functions. Although the software is relatively young, it has proven worthy of CAD standardization as the unified method of providing terminal control functions in FORTRAN and COBOL programs. Due to the unique structure of the CRT driver, the addition of additional terminal types in the knowledge base of the driver is extremely simple. Requests for such inclusions should be made to the author. GENERAL INFORMATION Page 1-5 STRUCTURE 22 Apr 81 1.3 STRUCTURE The CRT driver is structured as a set of several VAX/VMS FORTRAN V2.0 programs which contain a single entrypoint for each function required by the terminal hardware to be controlled. This software is located in SYS$SYSDISK:[SYSLIB.MOSTEK] in a source file named CRT.FOR. This module is compiled and then inserted in the SYS$SYSDISK:[SYSLIB]STARLET.OLB system object code library. At this point the entrypoints become globally defined, and are automatically included in a user's program at LINK time if they are referenced. This allows the general user population the benefits of driver package with none of the overhead associated with its initial generation and debugging. Users are encouraged to examine and study the [SYSLIB.MOSTEK] subdirectory and the CRT driver module CRT.FOR. This source module conforms to strict Mostek coding practices and should serve as a guide to writing effective and well documented user application programs. CHAPTER 2 USING THE CRT DRIVER USING THE CRT DRIVER Page 2-2 INITIALIZATION AND EXIT 22 Apr 81 2.1 INITIALIZATION AND EXIT The initialization and exit routines of the CRT driver have changed with release 2.0. The philosophy of release 1.0 was to initialize the terminal parameters for a specific configuration when the CRT_INITIALIZE routine was called. This strategy has been changed to the following: "The user is responsible for setting the required terminal parameters for his particular application program. No assumptions should be made as to the current terminal configuration except those stated in the MOSTEK TERMINAL CONFIGURATION FIRMWARE STANDARD. Prior to exit, the user should under software control restore the desired terminal configuration to the user's terminal. The CRT driver will make no attempt to perform such a restoration. With respect to the software status of the user terminal, upon initialization the CRT driver will save the current terminal mode settings, and upon exit these mode settings will be restored to their original values. The user is free to modify these mode settings at will in the interval between initilization and exit." USING THE CRT DRIVER Page 2-3 INITIALIZATION AND EXIT 22 Apr 81 In addition to the above initialization procedures the user is responsible for the initialization of a local process symbol SYS$TERMINAL which defines the logical terminal type and any auxiliary I/O port which may be attached to the main terminal. This symbol should be defined before any program using the CRT driver is executed, and may be defined in the user's LOGIN.COM procedure file. This symbol is decoded at run-time to determine the specific terminal type. The format for definition of the process terminal type is as follows: $ TERMINAL term_type[.aux_io_port] Where term_type and aux_io_port are one of the following: 1. VT100 2. VT52 3. LA36 4. LA120 5. DT80 6. ISC8001 7. HP264X 8. PRINTRONIX 9. QUME USING THE CRT DRIVER Page 2-4 INITIALIZATION AND EXIT 22 Apr 81 2.1.1 CRT_INITIALIZE This routine initializes the CRT driver interface to the user terminal. Two I/O channels are associated with the user terminal, SYS$COMMAND for all terminal input and SYS$OUTPUT for all output. Once these channels are successfully assigned, the CRT driver obtains the current VAX/VMS process terminal modes which are then saved for later restoration in the CRT_EXIT entrypoint. USING THE CRT DRIVER Page 2-5 INITIALIZATION AND EXIT 22 Apr 81 2.1.2 CRT_EXIT This routine terminates CRT driver processing and MUST be the last CRT driver routine called before the process utilizing the driver terminates processing. This entrypoint restores VAX/VMS terminal mode characteristics to their state at initialization, deassigns all I/O channels, and reset internal terminal configuration parameters. CHAPTER 3 CHARACTER I/O FUNCTION COMMANDS CHARACTER I/O FUNCTION COMMANDS Page 3-2 22 Apr 81 This chapter describes the various character I/O functions which are available through the CRT driver. These character I/O functions enable the user to READ, POLL, or WRITE to the current terminal using various forms of carriage control. These I/O functions are much more versatile than their FORTRAN counterparts, and enable the user to perform realtime character processing on a byte-by-byte basis in addition to the conventional FORTRAN record oriented method of processing terminal character I/O. Please note that as of release 2.0, the character input/output commands do not function exactly as those of release 1.0. The changes in functionality reflect the revised philosophy of the CRT driver as of release 2.0. This philosophy is one of supporting both character I/O as well as record I/O, but with different entrypoints which emulate the FORTRAN equivalents. CHARACTER I/O FUNCTION COMMANDS Page 3-3 CHARACTER INPUT COMMANDS 22 Apr 81 3.1 CHARACTER INPUT COMMANDS This section describes the various character input commands which are included within the CRT driver. It should be noted that these commands are divided into two catagories. The first category emulates the FORTRAN READ statement but is faster. The second category is byte-oriented and allows the user to read not only the character string input by the user, but also the terminating character which terminated the command line. Please note that all user character strings are blank filled prior to actual character input from the user terminal. CHARACTER I/O FUNCTION COMMANDS Page 3-4 CHARACTER INPUT COMMANDS 22 Apr 81 3.1.1 CRT_READ(STRING) This entrypoint enables the user to emulate the FORTRAN READ statement by reading a character string from SYS$COMMAND and returning this string minus any terminating characters to the STRING argument specified by the user. 3.1.2 CRT_INPUT(STRING) This entrypoint enables the user to read a character string from SYS$COMMAND and return it intact with all entered data including the termination sequence. To determine the actual number of characters entered, interrogate the quadword I/O status block with a call to CRT_IO_STATUS. 3.1.3 CRT_POLL(STRING,TIME_PERIOD) This entrypoint enables the user to read a character string from SYS$COMMAND with a specified timeout period after which the read operation aborts and control is returned to the user program. Functionally equivalent to the CRT_INPUT entrypoint except that this entrypoint includes the INTEGER*4 TIME_PERIOD argument which specifies the read timeout period in seconds. Note that if the TIME_PERIOD argument has a value of zero, the VMS system QIO read will assume a time period of one (1) second. See the CRT_TYPEAHEAD entrypoint for related information concerning polling of the user typeahead buffer. CHARACTER I/O FUNCTION COMMANDS Page 3-5 CHARACTER OUTPUT COMMANDS 22 Apr 81 3.2 CHARACTER OUTPUT COMMANDS This section describes the various character input commands which are included within the CRT driver. It should be noted that these commands are divided into two categories. The first category involves multiple byte output transfers. This category includes both a FORTRAN emulated WRITE command which includes pre-output carriage control as well as a byte oriented PRINT command which suppresses all carriage control. The second category includes all single byte transfers. This category includes commonly used single byte commands such as the BELL character and horizontal TAB character. CHARACTER I/O FUNCTION COMMANDS Page 3-6 CHARACTER OUTPUT COMMANDS 22 Apr 81 3.2.1 MULTIPLE BYTE OUTPUT COMMANDS 3.2.1.1 CRT_WRITE(STRING) - This entrypoint enables the user to transfer the character argument STRING to the display surface. This entrypoint emulates the FORTRAN WRITE statement in that prior to the output of the argument STRING, the cursor is advanced to the next row (line) and placed at column 1. This is accomplished by transferring a carriage return/linefeed (CRLF) sequence prior to the output of the STRING argument. 3.2.1.2 CRT_PRINT(STRING) - This entrypoint enables the user to transfer the character argument STRING to the display surface at the current cursor row and column position. This enables character data data to be placed anywhere on the display surface with no carriage control preceeding or following the data transfer. 3.2.1.3 CRT_LARGE(STRING) - This entrypoint enables the user to transfer the character argument STRING to the display surface at the current line in double-height double-width format. This entrypoint is only valid for VT100 and DT80/1 terminals. CHARACTER I/O FUNCTION COMMANDS Page 3-7 CHARACTER OUTPUT COMMANDS 22 Apr 81 3.2.2 SINGLE BYTE OUTPUT COMMANDS 3.2.2.1 CRT_ASCII(ASCII_CODE) - This entrypoint enables the user to transfer the ASCII byte specified by the INTEGER*4 argument ASCII_CODE to the user terminal at the current row and column position. No carriage control is performed either prior to or after the single byte transfer. 3.2.2.2 CRT_BELL - This entrypoint transfers the ASCII BELL character ('07'X) to the user terminal at the current row and column position. 3.2.2.3 CRT_TAB - This entrypoint transfers the ASCII horizontal TAB character ('09'X) to the user terminal at the current row and column position. This forces the terminal to advance to the next horizontal physical tab stop. 3.2.2.4 CRT_LINEFEED - This entrypoint transfers the ASCII LINEFEED character ('0A'X) to the user terminal at the current row and column position. 3.2.2.5 CRT_VFU - This entrypoint transfers the ASCII vertical tab (VT) character ('0B'X) to the user terminal at the current row and column position. This forces the terminal to advance to the next vertical physical tab stop. 3.2.2.6 CRT_FORMFEED - This entrypoint transfers the ASCII FORMFEED character ('0C'X) to the user terminal at the current row and column position. This forces the terminal to advance to the next physical page defined by the top-of-form indicator. CHARACTER I/O FUNCTION COMMANDS Page 3-8 CHARACTER OUTPUT COMMANDS 22 Apr 81 3.2.2.7 CRT_RETURN - This entrypoint transfers the ASCII carriage return (CR) character ('0D'X) to the user terminal at the current row and column position. This forces the terminal to move the cursor to column 1 of the current line. 3.2.2.8 CRT_NEXT_LINE - This entrypoint transfers the ASCII characters carriage return/linefeed to the user terminal at the current row and column position. This advances the current row (line) position and sets the current column position to 1, effectively starting a new display line. CHAPTER 4 SCREEN CONTROL FUNCTIONS SCREEN CONTROL FUNCTIONS Page 4-2 22 Apr 81 This chapter describes the various screen control functions performed by the CRT driver. These screen control functions are logically divided into cursor movement, line size, character attribute, erasing, and special display commands. SCREEN CONTROL FUNCTIONS Page 4-3 HORIZONTAL AND VERTICAL MARGIN COMMANDS 22 Apr 81 4.1 HORIZONTAL AND VERTICAL MARGIN COMMANDS This section describes the various horizontal and vertical margin commands which are included within the CRT driver. It should be noted that the row and column counts referenced within this and following chapters are defined such that row 1 column 1 is the top left-hand corner of the display surface and is defined as the origin for absolute cursor movement commands. This is consistent with the ANSI standards X3.64 1977 and X3.41 1974. SCREEN CONTROL FUNCTIONS Page 4-4 HORIZONTAL AND VERTICAL MARGIN COMMANDS 22 Apr 81 4.1.1 CRT_MARGIN(LEFT,RIGHT) This entrypoint sets the logical horizozntal left margin to LEFT and the logical horizontal right margin to RIGHT. This determines the physical size in columns of the display surface. 4.1.2 CRT_REGION(TOP,BOTTOM) This entrypoint sets the logical vertical top margin to TOP and the logical vertical bottom margin to BOTTOM. This determines the physical size in rows (lines) of the display surface or scrolling region. 4.1.3 CRT_FORM_LENGTH(LENGTH) This entrypoint sets the logical form length in lines to LENGTH and in addition resets the top-of-form flag on the associated terminal. This functionally determines the physical size in rows (lines) of the display surface or scrolling region and in addition defines the physical line to be associated with top-of-form. SCREEN CONTROL FUNCTIONS Page 4-5 CURSOR MOVEMENT COMMANDS 22 Apr 81 4.2 CURSOR MOVEMENT COMMANDS This section describes the various cursor movement commands which are included within the CRT driver. It should be noted that the row and column counts referenced within this and following chapters are defined such that row 1 column 1 is the top left-hand corner of the display surface and is defined as the origin for absolute cursor movement commands. This is consistent with the ANSI standards X3.64 1977 and X3.41 1974. SCREEN CONTROL FUNCTIONS Page 4-6 CURSOR MOVEMENT COMMANDS 22 Apr 81 4.2.1 CRT_HOME, CRT_HOME_UP This entrypoint positions the cursor at row 1, column 1. This position is defined as the top left-hand corner of the display surface. 4.2.2 CRT_HOME_RIGHT This entrypoint positions the cursor at row 1, column COLMAX, where COLMAX is defined as the maximum column number. This position is defined as the upper right-hand corner of the display surface. 4.2.3 CRT_HOME_DOWN This entrypoint positions the cursor at row ROWMAX, column 1, where ROWMAX is defined as the maximum row number. This position is defined as the lower left-hand corner of the display surface. 4.2.4 CRT_HOME_BOTTOM This entrypoint positions the cursor at row ROWMAX, column COLMAX, where ROWMAX is defined as the maximum row number and COLMAX is defined as the maximum column number. This position is defined as the lower right-hand corner of the display surface. SCREEN CONTROL FUNCTIONS Page 4-7 CURSOR MOVEMENT COMMANDS 22 Apr 81 4.2.5 CRT_MOVE_UP(COUNT) This entrypoint moves the cursor up 'COUNT' lines. No screen wraparound is performed. No screen scrolling is performed. 4.2.6 CRT_MOVE_DOWN(COUNT) This entrypoint moves the cursor down 'COUNT' lines. No screen wraparound is performed. No screen scrolling is performed. 4.2.7 CRT_MOVE_RIGHT(COUNT) This entrypoint moves the cursor right 'COUNT' columns. No screen wraparound is performed. No character erasing is performed. 4.2.8 CRT_MOVE_LEFT(COUNT) This entrypoint moves the cursor left 'COUNT' columns. No screen wraparound is performed. No character erasing is performed. 4.2.9 CRT_MOVE(ROW,COLUMN) This entrypoint moves the cursor to a specified row and column. No argument bounds checking is performed. (1,1) is defined as the top left-hand corner of the display surface. (ROWMAX,COLMAX) is the maximum effective display surface area. 4.2.10 CRT_POSITION(ROW,COLUMN) This entrypoint enables the user to inquire as to the current position of the cursor on the screen. The same restrictions in ranging for ROW and COLUMN apply here as were stated in the CRT_MOVE entrypoint. If the current terminal does not support cursor position report, arguments ROW and COLUMN will both return 0 on exit. Please note that escape sequence recognition and validation must be enabled for this entrypoint to function properly. See entrypoints CRT_ESCAPE_ON and CRT_ESCAPE_OFF. SCREEN CONTROL FUNCTIONS Page 4-8 CURSOR MOVEMENT COMMANDS 22 Apr 81 4.2.11 CRT_INDEX, CRT_INDEX_DOWN This entrypoint moves the cursor down one line and scrolls the display area one line up if the cursor is located on the last logical line of the display area. 4.2.12 CRT_INDEX_NEXT This entrypoint moves the cursor to the first column of the next line on the display surface, scrolling the display area one line up if the cursor is located on the last logical line of the display area. 4.2.13 CRT_INDEX_UP This entrypoint moves the cursor up one line and scrolls the display area one line down if the cursor is located on the first logical line of the display area. 4.2.14 CRT_STORE This entrypoint saves the current cursor position and attributes for a later restoration by CRT_RESTORE. 4.2.15 CRT_RESTORE This entrypoint restores the cursor positon and attributes saved by a previous call the CRT_STORE. SCREEN CONTROL FUNCTIONS Page 4-9 TAB STOP COMMANDS 22 Apr 81 4.3 TAB STOP COMMANDS This section describes the various physical tab stop commands which are included within the CRT driver. These commands enable a user to clear, set, and jump to horizontal and vertical physical tab stops on the user terminal. SCREEN CONTROL FUNCTIONS Page 4-10 TAB STOP COMMANDS 22 Apr 81 4.3.1 HORIZONTAL TAB STOP COMMANDS 4.3.1.1 CRT_SET_TAB - This entrypoint sets a horizontal physical tab at the current cursor column position. This tab stop stays in effect until a RESET or CLEAR_TAB command is executed. 4.3.1.2 CRT_CLEAR_TAB - This entrypoint clears a horizontal physical tab at the current cursor column position. This command has no effect if there is no tab stop at the current cursor column position. 4.3.1.3 CRT_CLEAR_TABS - This entrypoint clears all horizontal physical tab stops for the current user terminal. Tab stops resident in the non-volatile memory of the terminal will reappear upon a RESET or power down condition. 4.3.1.4 CRT_TAB - This entrypoint forces the user terminal to jump to the next horizontal physical tab stop by issuing a TAB character to the terminal. SCREEN CONTROL FUNCTIONS Page 4-11 TAB STOP COMMANDS 22 Apr 81 4.3.2 VERTICAL TAB STOP (VFU) COMMANDS 4.3.2.1 CRT_SET_VFU - This entrypoint sets a vertical forms unit (VFU) physical tab at the current cursor row (line) position. This VFU tab stop stays in effect until a RESET or CLEAR_TAB command is executed. 4.3.2.2 CRT_CLEAR_VFU - This entrypoint clears a vertical forms unit (VFU) physical tab at the current cursor row (line) position. This command has no effect if there is no tab stop at the current cursor row (line) position. 4.3.2.3 CRT_CLEAR_VFUS - This entrypoint clears all vertical forms unit (VFU) physical tabs for the current user terminal. Tab stops resident in the non-volatile memory of the terminal will reappear upon a RESET or power down condition. 4.3.2.4 CRT_VFU - This entrypoint forces the user terminal to jump to the next vertical forms unit (VFU) physical tab stop by issuing a vertical tab (VT) character to the terminal. SCREEN CONTROL FUNCTIONS Page 4-12 HORIZONTAL AND VERTICAL PITCH COMMANDS 22 Apr 81 4.4 HORIZONTAL AND VERTICAL PITCH COMMANDS This section describes the various horizontal and vertical line size, character width, and character height commands which are included within the CRT driver. It should be noted that most of the commands within this section are device specific in nature, but that as much as possible the high level commands have been standardized to make the interface as uniform and device independent as possible. SCREEN CONTROL FUNCTIONS Page 4-13 HORIZONTAL AND VERTICAL PITCH COMMANDS 22 Apr 81 4.4.1 CRT_HORIZONTAL(PITCH) This entrypoint changes the current horizontal pitch of the given terminal to PITCH characters/inch. This entrypoint has more significance for hardcopy units than for CRT displays, but it is supported for both devices. Currently supported horizontal pitch values for the LA120 hardcopy terminal are: 5, 6, 7, 8, 10, 12, 13, and 16 characters/inch. Values not specified here are defaulted to the closest possible value listed. Negative values are reserved for future expansion. 4.4.2 CRT_VERTICAL(PITCH) This entrypoint changes the current vertical pitch of the given terminal to PITCH lines/inch. This entrypoint has more significance for hardcopy units than for CRT displays, but it is supported for both devices. Currently supported vertical pitch values for the LA120 hardcopy terminal are: 2, 3, 4, 6, 8, and 12 lines/inch. Values not specified here are defaulted to the closest possible value listed. Negative values are reserved for future expansion. 4.4.3 CRT_DOUBLE_TOP This entrypoint changes the current line to double-height top half for VT100 and DT80/1 terminals. 4.4.4 CRT_DOUBLE_BOT This entrypoint changes the current line to double-height bottom half for VT100 and DT80/1 terminals. 4.4.5 CRT_SINGLE_WIDE This entrypoint changes the current line to single-width single-height for VT100 and DT80/1 terminals. SCREEN CONTROL FUNCTIONS Page 4-14 HORIZONTAL AND VERTICAL PITCH COMMANDS 22 Apr 81 4.4.6 CRT_DOUBLE_WIDE This entrypoint changes the current line to double-width single-height for VT100 and DT80/1 terminals. SCREEN CONTROL FUNCTIONS Page 4-15 CHARACTER ATTRIBUTE COMMANDS 22 Apr 81 4.5 CHARACTER ATTRIBUTE COMMANDS This section describes the various character attribute commands which are included within the CRT driver. It should be noted that all of the entrypoints which reference color enhancements are nonfunctional except for terminals having color graphics capability. SCREEN CONTROL FUNCTIONS Page 4-16 CHARACTER ATTRIBUTE COMMANDS 22 Apr 81 4.5.1 CRT_TURN_OFF This entrypoint disables all character attributes and places the terminal in a white character on black background mode. This also takes a color graphics terminal out of any color mode and places it in this standard display mode. 4.5.2 CRT_BOLD This entrypoint enables the BOLD character attribute if it is defined on the current terminal. This makes characters/background appear brighter or more enhanced than in normal display mode. 4.5.3 CRT_UNDER This entrypoint enables the UNDERSCORE character attribute if it is defined on the current terminal. This makes all characters displayed from that point on have an underscore associated with them. 4.5.4 CRT_BLINK This entrypoint enables the BLINK character attribute if it is defined on the current terminal. This makes all characters displayed from that point on blink on and off. 4.5.5 CRT_REVERSE This entrypoint enables the REVERSE VIDEO character attribute if it is defined on the current terminal. This makes the background and foreground color definitions to switch for the characters displayed from that point on. SCREEN CONTROL FUNCTIONS Page 4-17 CHARACTER ATTRIBUTE COMMANDS 22 Apr 81 4.5.6 COLOR SELECTION COMMANDS This section describes the color character attribute commands which are included within the CRT driver. Currently the only color terminal supported by the CRT driver is the ISC 8001, but this will definitely change in the near future. It is for this reason that this color interface is still in a state of design review at present. The final design will include the raw color commands plus an additional high level graphics interface yet to be defined. Note that color commands directed to a black and white terminal or hardcopy device will be ignored. SCREEN CONTROL FUNCTIONS Page 4-18 CHARACTER ATTRIBUTE COMMANDS 22 Apr 81 4.5.6.1 CRT_COLOR(COLOR_MASK) - This entrypoint sets the current active color in either the foreground or background area, depending whether the user has selected the REVERSE VIDEO character attribute. The COLOR_MASK argument determines the color to be selected as the new active foreground or background color. Symbolic offsets for this color definition have yet to be standardized, thus this entrypoint is included for future expansion only at this point. 4.5.6.2 CRT_HUE_BLACK - This entrypoint sets the current active color to BLACK. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.3 CRT_HUE_RED - This entrypoint sets the current active color to RED. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.4 CRT_HUE_GREEN - This entrypoint sets the current active color to GREEN. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.5 CRT_HUE_YELLOW - This entrypoint sets the current active color to YELLOW. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. SCREEN CONTROL FUNCTIONS Page 4-19 CHARACTER ATTRIBUTE COMMANDS 22 Apr 81 4.5.6.6 CRT_HUE_BLUE - This entrypoint sets the current active color to BLUE. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.7 CRT_HUE_MAGENTA - This entrypoint sets the current active color to MAGENTA. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.8 CRT_HUE_CYAN - This entrypoint sets the current active color to CYAN. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. 4.5.6.9 CRT_HUE_WHITE - This entrypoint sets the current active color to WHITE. This will modify the display foreground/background depending on the previous state of the REVERSE VIDEO character attribute. SCREEN CONTROL FUNCTIONS Page 4-20 ERASING COMMANDS 22 Apr 81 4.6 ERASING COMMANDS This section describes the various screen erasing commands which are included within the CRT driver. It should be noted that whenever possible, all the screen erasing commands are simulated on terminals with less functionality, but that in some cases the terminal erasing function cannot be simulated exactly. Users should be aware of this restriction when writing code for pre-ANSI terminals. SCREEN CONTROL FUNCTIONS Page 4-21 ERASING COMMANDS 22 Apr 81 4.6.1 CRT_CLEAR_EOL This entrypoint erases the screen from the current cursor position to the end of the current display line (EOL). Cursor positon is not changed. 4.6.2 CRT_CLEAR_BOL This entrypoint erases the screen from the beginning of the current display line (BOL) to the current cursor position. Cursor position is not changed. 4.6.3 CRT_CLEAR_LINE This entrypoint erases the entire line on which the cursor is positioned. Cursor position is not changed. 4.6.4 CRT_CLEAR_BOP This entrypoint erases the screen from the beginning of the current display screen (BOP) to the current cursor position. Curson position is not changed. 4.6.5 CRT_CLEAR_EOP This entrypoint erases the screen from the current cursor position to the end of the current display screen (EOP). Cursor positon is not changed. 4.6.6 CRT_CLEAR_PAGE This entrypoint erases the entire screen on which the cursor is positoned. Cursor position is not changed. SCREEN CONTROL FUNCTIONS Page 4-22 SPECIAL DISPLAY COMMANDS 22 Apr 81 4.7 SPECIAL DISPLAY COMMANDS This section describes the various special display commands which are included within the CRT driver. It should be noted that these special display commands are purely device specific and are not represented on a broad number of the terminals supported by the CRT driver. SCREEN CONTROL FUNCTIONS Page 4-23 SPECIAL DISPLAY COMMANDS 22 Apr 81 4.7.1 CRT_CLEAR_LEDS This entrypoint turns off the 4 LED display indicators (L1, L2, L3, and L4) which are present on VT100 and DT80/1 terminals. 4.7.2 CRT_SET_LED(LED) This entrypoint turns on a specific LED display indicator (L1, L2, L3, or L4) based on the passed 'LED' argument. A value of 0 turns off all LEDs, and values 1 through 4 correspond to the led indicators L1 through L4. CHAPTER 5 CHARACTER SET SELECTION COMMANDS CHARACTER SET SELECTION COMMANDS Page 5-2 22 Apr 81 This chapter describes the various character set selection and control functions performed by the CRT driver. These character set selection commands enable the user to dynamically select and deselect a variety of character sets based on what is available through the hardware of the current user terminal. CHARACTER SET SELECTION COMMANDS Page 5-3 STANDARD CHARACTER SET COMMANDS 22 Apr 81 5.1 STANDARD CHARACTER SET COMMANDS This section describes the various standard character set selection commands which are available within the CRT driver. It should be noted that many terminals will not support alternate character set selection commands. These commands will be ignored in such cases. CHARACTER SET SELECTION COMMANDS Page 5-4 STANDARD CHARACTER SET COMMANDS 22 Apr 81 5.1.1 USASCII The following entrypoint descriptions deal with selection of United States ASCII character sets (USASCII). USASCII is defined as the standard default character set of the CRT driver. 5.1.1.1 CRT_USASCII, CRT_USASCII_G0 - Selects the USASCII G0 designator character set. 5.1.1.2 CRT_USASCII_G1 - Selects the USASCII G1 designator character set. CHARACTER SET SELECTION COMMANDS Page 5-5 STANDARD CHARACTER SET COMMANDS 22 Apr 81 5.1.2 UNITED KINGDOM (UK) The following entrypoint descriptions deal with selection of United Kingdom character sets (UK). The UK character set differs from the USASCII character set in that the pound sign ('#') has a different graphic designator in the UK character set ('L'). 5.1.2.1 CRT_UK, CRT_UK_G0 - Selects the UK G0 designator character set. 5.1.2.2 CRT_UK_G1 - Selects the UK G1 designator character set. CHARACTER SET SELECTION COMMANDS Page 5-6 STANDARD CHARACTER SET COMMANDS 22 Apr 81 5.1.3 GRAPHICS LINE DRAWING The following entrypoint descriptions deal with selection of graphics line drawing character sets. These character sets enable the user to display rectangles, forms, and other stick figures using special line drawing and graphic symbol characters. When this mode is enabled, the CRT driver graphic symbol entrypoints (CRT_SYM_) are enabled and will display the desired graphic symbol when properly called by the user program. See SPECIAL GRAPHICS SYMBOLS for further information. 5.1.3.1 CRT_GRAPHICS, CRT_GRAPHICS_G0 - Selects the graphics line drawing G0 designator character set. Enables CRT driver graphics symbol entrypoints. 5.1.3.2 CRT_GRAPHICS_G1 - Selects the graphics line drawing G1 designator character set. Enables CRT driver graphics symbol entrypoints. CHARACTER SET SELECTION COMMANDS Page 5-7 NONSTANDARD CHARACTER SET COMMANDS 22 Apr 81 5.2 NONSTANDARD CHARACTER SET COMMANDS This section describes the various nonstandard character set selection commands which are included within the CRT driver. These character set selection commands have yet to be fully defined within the Mostek CRT driver standard, and should therfore be considered reserved for future expansion. CHARACTER SET SELECTION COMMANDS Page 5-8 NONSTANDARD CHARACTER SET COMMANDS 22 Apr 81 5.2.1 ROM1 CHARACTER SET The following entrypoint descriptions deal with selection of characters within the alternate character ROM1. These characters have yet to be defined within this standard. 5.2.1.1 CRT_ROM1, CRT_ROM1_G0 - Selects the alternate character ROM1 G0 designator character set. 5.2.1.2 CRT_ROM1_G1 - Selects the alternate character ROM1 G1 designator character set. CHARACTER SET SELECTION COMMANDS Page 5-9 NONSTANDARD CHARACTER SET COMMANDS 22 Apr 81 5.2.2 ROM2 CHARACTER SET The following entrypoint descriptions deal with selection of characters within the alternate character ROM2 special graphics character set. These characters have yet to be defined within this standard. 5.2.2.1 CRT_ROM2, CRT_ROM2_G0 - Selects the alternate character ROM2 G0 designator character set. 5.2.2.2 CRT_ROM2_G1 - Selects the alternate character ROM2 G1 designator character set. CHAPTER 6 SPECIAL GRAPHICS SYMBOLS SPECIAL GRAPHICS SYMBOLS Page 6-2 22 Apr 81 This chapter describes the various special graphics symbols which are available through single calls to the CRT driver. Most of the symbols are device specific to the VT100 and DT80/1 terminals, but some are available on the other supported terminals. Note that all graphics symbol entrypoints begin with the common designator 'CRT_SYM_' to designate them as graphic symbol entrypoints. WARNING The user must have enabled the special GRAPHICS character set mode with a call to CRT_GRAPHICS before attempting to use these alternate graphics characters. Reference CHARACTER SET SELECTION COMMANDS for character set selection procedures. SPECIAL GRAPHICS SYMBOLS Page 6-3 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1 STANDARD GRAPHICS CHARACTERS This section describes the various standard graphics character entrypoints which are included within the CRT driver. It should be noted that this standard set is all that is actively supported at present SPECIAL GRAPHICS SYMBOLS Page 6-4 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1.1 CRT_SYM_BLANK This entrypoint displays a blank character at the current cursor position. 6.1.2 CRT_SYM_DIAMOND This entrypoint displays a diamond symbol at the current cursor positon. 6.1.3 CRT_SYM_CHECK This entrypoint displays a check board (error indicator) symbol at the current cursor position. 6.1.4 CRT_SYM_HT This entrypoint displays a HT (horizontal tab) symbol at the current cursor position. 6.1.5 CRT_SYM_FF This entrypoint displays a FF (form feed) symbol at the current cursor position. 6.1.6 CRT_SYM_CR This entrypoint displays a CR (carriage return) symbol at the current cursor positon. 6.1.7 CRT_SYM_LF This entrypoint displays a LF (line feed) symbol at the current cursor position. SPECIAL GRAPHICS SYMBOLS Page 6-5 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1.8 CRT_SYM_DEGREE This entrypoint displays a degree symbol at the current cursor position 6.1.9 CRT_SYM_PL_MIN This entrypoint displays a plus/minus (+/-) symbol at the current cursor position 6.1.10 CRT_SYM_NL This entrypoint displays a NL (new line) symbol at the current cursor position. 6.1.11 CRT_SYM_VT This entrypoint displays a VT (vertical tab) symbol at the current cursor position. 6.1.12 CRT_SYM_LRC This entrypoint displays a lower-right corner symbol at the current cursor position. Used to draw rectangle corners. 6.1.13 CRT_SYM_URC This entrypoint displays an upper-right corner symbol at the current cursor position. Used to draw rectangle corners. 6.1.14 CRT_SYM_ULC This entrypoint displays an upper-left corner symbol at the current cursor position. Used to draw rectangle corners. SPECIAL GRAPHICS SYMBOLS Page 6-6 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1.15 CRT_SYM_LLC This entrypoint displays a lower-left corner symbol at the current cursor position. Used to draw rectangle corners. 6.1.16 CRT_SYM_CROSS This entrypoint displays a crossing line symbol at the current cursor position. This symbol is a vertical bar with a horizontal line centered at SCAN line 5. 6.1.17 CRT_SYM_SCAN1 This entrypoint displays a horizontal scan line 1 symbol at the current cursor position. 6.1.18 CRT_SYM_SCAN3 This entrypoint displays a horizontal scan line 3 symbol at the current cursor position. 6.1.19 CRT_SYM_SCAN5 This entrypoint displays a horizontal scan line 5 symbol at the current cursor position. 6.1.20 CRT_SYM_SCAN7 This entrypoint displays a horizontal scan line 7 symbol at the current cursor position. 6.1.21 CRT_SYM_SCAN9 This entrypoint displays a horizontal scan line 9 symbol at the current cursor position. SPECIAL GRAPHICS SYMBOLS Page 6-7 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1.22 CRT_SYM_LEFT_T This entrypoint displays a left "T" symbol at the current cursor position. Used to draw internal rectangles. 6.1.23 CRT_SYM_RIGHT_T This entrypoint displays a right "T" symbol at the current cursor position. Used to draw internal rectangles. 6.1.24 CRT_SYM_LOWER_T This entrypoint displays a bottom (lower) "T" symbol at the current cursor position. Used to draw internal rectangles. 6.1.25 CRT_SYM_UPPER_T This entrypoint displays an top (upper) "T" symbol at the current cursor position. Used to draw internal rectangles. 6.1.26 CRT_SYM_V_BAR This entrypoint displays a vertical bar symbol at the current cursor position. Used to draw rectangles. 6.1.27 CRT_SYM_V_LINE(COUNT) This entrypoint displays a vertical line 'COUNT' lines long using the vertical bar symbol. Used to draw rectangles. 6.1.28 CRT_SYM_LE This entrypoint displays a less-than-or-equal-to symbol at the current cursor position. SPECIAL GRAPHICS SYMBOLS Page 6-8 STANDARD GRAPHICS CHARACTERS 22 Apr 81 6.1.29 CRT_SYM_GE This entrypoint displays a greater-than-or-equal-to symbol at the current cursor position. 6.1.30 CRT_SYM_PI This entrypoint displays the PI (mathematical) symbol at the current cursor position. 6.1.31 CRT_SYM_NE This entrypoint displays the NE (not equal to) symbol at the current cursor position. 6.1.32 CRT_SYM_POUND This entrypoint displays the UK pound sign symbol at the current cursor position. 6.1.33 CRT_SYM_DOT This entrypoint displays a centered dot symbol at the current cursor position. CHAPTER 7 GRAPHICS PLOTTING COMMANDS GRAPHICS PLOTTING COMMANDS Page 7-2 22 Apr 81 This chapter describes the various graphics plotting functions performed by the CRT driver. These plotting functions enable a user to rapidly and efficiently generate semi-graphic or graphic plots on the display surface, and in addition provide a hardware transparent method of producing software for this purpose. The user should note that the origin for all plotted data is (1,1) and is located at the lower-left hand corner of the display surface. The maximum plotting coordinates are determined by the specific terminal to be used. Future enhancements of the CRT driver will enable the user to query the specific plotting limits for the specified terminal. WARNING The user must have enabled the special graphics character set mode with a call to CRT_GRAPHICS before attempting to use these graphics plotting commands. Reference CHARACTER SET SELECTION COMMANDS for further information regarding character set selection procedures. GRAPHICS PLOTTING COMMANDS Page 7-3 BASIC PLOTTING FUNCTIONS 22 Apr 81 7.1 BASIC PLOTTING FUNCTIONS This section describes the basic graphics plotting functions which are included within the CRT driver. These plotting functions will be emulated to the extent that is possible on the various terminals supported by the CRT driver. GRAPHICS PLOTTING COMMANDS Page 7-4 BASIC PLOTTING FUNCTIONS 22 Apr 81 7.1.1 CRT_PLOT(X,Y) This entrypoint enables the specified raster point on the XY plotting surface. The specific limits of the plotting surface are dependent on the type of terminal used. At present no method exists by which a user may interrogate the plotting limits of the current terminal configuration. This restriction will be eliminated in future releases of the CRT driver. GRAPHICS PLOTTING COMMANDS Page 7-5 ADVANCED PLOTTING FUNCTIONS 22 Apr 81 7.2 ADVANCED PLOTTING FUNCTIONS This section describes the various advanced graphics plotting commands which are included within the CRT driver. These graphics plotting commands are currently only supported on the terminals which support advanced graphics features. Support for lower-level terminals will be provided in a later release of the CRT driver. GRAPHICS PLOTTING COMMANDS Page 7-6 ADVANCED PLOTTING FUNCTIONS 22 Apr 81 7.2.1 CRT_PLOT_X_BAR(X_START,Y_START,X_LIMIT) This entrypoint enables the user to display a horizontal bar graph of length X_LIMIT in the right-hand direction from a starting coordinate of (X_START,Y_START). The current foreground color is used in constructing the bar graph. 7.2.2 CRT_PLOT_Y_BAR(X_START,Y_START,Y_LIMIT) This entrypoint enables the user to display a vertical bar graph of length Y_LIMIT in the bottom-up direction from a starting coordinate of (X_START,Y_START). The current foreground color is used in constructing the bar graph. 7.2.3 CRT_PLOT_VECTOR(X_STOP,Y_STOP) This entrypoint enables the user to display a vector from the last displayed point to a new point of (X_STOP,Y_STOP). The last displayed point is obtained from the last call to the CRT_PLOT command or the last call to the CRT_PLOT_VECTOR command. The current foreground color is used in constructing the vector. 7.2.4 CRT_PLOT_LINE(X_START,Y_START,X_STOP,Y_STOP) This entrypoint enables the user to display a line vector from a starting point of (X_START,Y_START) to an ending point of (X_STOP,Y_STOP). The current foreground color is used in constructing the line vector. CHAPTER 8 TERMINAL MODE CONVERSION COMMANDS TERMINAL MODE CONVERSION COMMANDS Page 8-2 22 Apr 81 This chapter describes the various terminal mode conversion commands performed by the CRT driver. These mode conversion commands change basic characteristics in the user terminal. Most of these entrypoints are VT100/DT80 specific. TERMINAL MODE CONVERSION COMMANDS Page 8-3 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1 STANDARD MODE CONVERSION COMMANDS This section describes the standard mode conversion commands which are included within the CRT driver. It should be noted that most of the following mode conversion commands are device specific to the VT100/DT80 terminals. TERMINAL MODE CONVERSION COMMANDS Page 8-4 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.1 LINE MODES 8.1.1.1 CRT_NL_MODE - This entrypoint enables new line mode. If new line mode is enabled, a carriage return received by the user terminal will be interpreted as a carriage return and a line feed. Complement to the CRT_LF_MODE entrypoint. 8.1.1.2 CRT_LF_MODE - This entrypoint enables line feed mode. If line feed mode is enabled, a carriage return received by the user terminal will be interpreted as a carriage return only. Complement to the CRT_NL_MODE entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-5 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.2 CURSOR KEYPAD MODES 8.1.2.1 CRT_CURSOR_APP - This entrypoint enables cursor application keypad mode. This forces the user terminal to associate the application keypad character set with the cursor position keys. Complement to the CRT_CURSOR_KEY entrypoint. 8.1.2.2 CRT_CURSOR_KEY - This entrypoint enables cursor key keypad mode. This forces the user terminal to associate the cursor key character set with the cursor position keys. Complement to the CRT_CURSOR_APP entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-6 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.3 NUMERIC KEYPAD MODES 8.1.3.1 CRT_KEYPAD_APP - This entrypoint enables auxiliary keypad application keypad mode. This forces the user terminal to associate the application keypad character set with the auxiliary numeric keypad keys. Complement to the CRT_KEYPAD_NUM entrypoint. 8.1.3.2 CRT_KEYPAD_NUM - This entrypoint enables auxiliary keypad numeric keypad mode. This forces the user terminal to associate the numeric keypad character set with the auxiliary numeric keypad keys. Complement to the CRT_KEYPAD_APP entrypoint. Keypad numeric mode is the normal power-up state of the terminal. TERMINAL MODE CONVERSION COMMANDS Page 8-7 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.4 TERMINAL EMULATION MODES 8.1.4.1 CRT_ANSI, CRT_VT100 - This entrypoint enables ANSI mode escape sequence recognition. This forces the user terminal to emulate ANSI standards with respect to interpretation of received escape sequences. Complement to the CRT_VT52 entrypoint. 8.1.4.2 CRT_VT52 - This entrypoint enables VT52 mode escape sequence recognition. This forces the user terminal to emulate DEC VT52 standards with respect to interpretation of received escape sequences. Complement to the CRT_ANSI entrypoint. This entrypoint is included for symetry only - it is not compatible with the overall philosophy and structure of the CRT driver. 8.1.4.3 CRT_ISC_8001 - This entrypoint enables ISC_8001 mode control sequence recognition. This forces the user terminal to emulate ISC 8001 standards with respect to interpretation of received control sequences. Complement to the CRT_ANSI entrypoint. This entrypoint is included for symetry only - it s not compatible with the overall philosophy and structure of the CRT driver. TERMINAL MODE CONVERSION COMMANDS Page 8-8 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.5 LINE WIDTH MODES 8.1.5.1 CRT_132_COLUMN - This entrypoint enables 132 column mode for terminals which support this feature. In this mode, 132 columns are displayed in compressed format on a single line. The display is blanked and the cursor homed after execution of this mode conversion command. Complement to the CRT_80_COLUMN entrypoint. 8.1.5.2 CRT_80_COLUMN - This entrypoint enables 80 column mode for terminals which support this feature. In this mode, 80 columns are displayed in normal format on a single line. The display is blanked and the cursor homed after execution of this mode conversion command. Complement to the CRT_132_COLUMN entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-9 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.6 SCROLLING MODES 8.1.6.1 CRT_SMOOTH - This entrypoint enables smooth scrolling mode for terminals which support this feature. In this mode when the display is indexed up or down, the user terminal does so in a smooth fashion at a rate corresponding to approximately 1200 baud. Complement to the CRT_JUMP entrypoint. 8.1.6.2 CRT_JUMP - This entrypoint enables jump scrolling mode for terminals which support this feature. In this mode when the display is indexed up or down, the user terminal does so in the normal fashion (one line at an instant). Complement to the CRT_SMOOTH entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-10 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.7 SCREEN MODES 8.1.7.1 CRT_PAGE_LIGHT - This entrypoint enables reverse video on a screen-wide basis for terminals which support this feature, forcing black characters on a white background to be the standard character attribute for the entire page. Complement to the CRT_PAGE_DARK entrypoint. 8.1.7.2 CRT_PAGE_DARK - This entrypoint disables reverse video on a screen-wide basis for terminals which support this feature, forcing white characters on a black background to be the standard character attribute for the entire page. Complement to the CRT_PAGE_LIGHT entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-11 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.8 CURSOR ORIGIN MODES 8.1.8.1 CRT_RELATIVE - This entrypoint enables relative cursor addressing on a screen-wide basis for terminals which support this feature, forcing the computation of cursor addresses processed by the CRT_MOVE(ROW,COLUMN) entrypoint to be relative from the current cursor position. Complement to the CRT_ABSOLUTE entrypoint. 8.1.8.2 CRT_ABSOLUTE - This entrypoint enables absolute cursor addressing on a screen-wide basis for terminals which support this feature, forcing the computation of cursor addressed processed by the CRT_MOVE(ROW,COLUMN) entrypoint to be absolute with respect to the cursor home (1,1) position at the top left-hand corner of the display surface. TERMINAL MODE CONVERSION COMMANDS Page 8-12 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.9 LINE WRAP MODES 8.1.9.1 CRT_WRAP_ON - This entrypoint enables wraparound mode on a screen-wide basis, forcing output lines longer than the current terminal width to be placed on subsequent rows of the display screen. Complement to the CRT_WRAP_OFF entrypoint. 8.1.9.2 CRT_WRAP_OFF - This entrypoint disables wraparound mode on a screen-wide basis, forcing output lines longer than the current terminal width to overwrite the last column position and not to advance to the next print line on the display screen. TERMINAL MODE CONVERSION COMMANDS Page 8-13 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.10 KEYBOARD REPEAT MODES 8.1.10.1 CRT_REPEAT_ON - This entrypoint enables auto-repeat mode for those terminals which support this feature. In this mode, when a key is depressed for more than 1 second, it automatically repeats a a rate of 1200 baud. Complement to the CRT_REPEAT_OFF entrypoint. 8.1.10.2 CRT_REPEAT_OFF - This entrypoint disables auto-repeat mode for those terminals which support this feature. In this mode, when a key is depressed no auto-repeat feature is activated and only one character key depression is processed by the user terminal. Complement to the CRT_REPEAT_ON entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-14 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.11 VIDEO INTERLACE MODES 8.1.11.1 CRT_RETRACE_ON - This entrypoint enables video interlace mode for those terminals which support this feature. In this mode, the video signal produced by the terminal and displayed on the screen will be interlaced to produce a fuller display with a better graphics rendition. This mode is primarily used when displaying graphics data or when using a video hardcopy device to obtain a line-by-line video dump of the display screen. Complement to the CRT_RETRACE_OFF entrypoint. 8.1.11.2 CRT_RETRACE_OFF - This entrypoint disabled video interlace mode for those terminals which support this feature. In this mode, the video signal produced by the terminal and displayed on the screen will not be interlaced. Complement to the CRT_RETRACE_ON entrypoint. TERMINAL MODE CONVERSION COMMANDS Page 8-15 STANDARD MODE CONVERSION COMMANDS 22 Apr 81 8.1.12 GRAPHICS PROCESSOR MODES 8.1.12.1 CRT_GRAPHICS_ON - This entrypoint enables the graphics processor option for those terminals which support this feature. The CRT driver does not presently support a graphics processor option. Complement to the CRT_GRAPHICS_OFF entrypoint. 8.1.12.2 CRT_GRAPHICS_OFF - This entrypoint disables the graphics processor option for those terminals which support this feature. The CRT driver does not presently support a graphics processor option. Complement to the CRT_GRAPHICS_ON entrypoint. CHAPTER 9 AUXILIARY I/O PORT COMMANDS AUXILIARY I/O PORT COMMANDS Page 9-2 22 Apr 81 This chapter describes the various auxiliary I/O port functions performed by the CRT driver. These auxiliary I/O port commands enable the user to transfer data and CRT driver commands to an auxiliary terminal if the primary terminal is equipped with an auxiliary terminal interface. Thus, a DT80 could be the primary terminal and have a LA120 connected to its auxiliary I/O port. This configuration would permit the user to transfer data and commands both to the DT80 display surface and/or to the LA120 hardcopy unit. CRT driver commands sent to either unit would be interpreted according to the characteristics of the terminal to which they were directed. AUXILIARY I/O PORT COMMANDS Page 9-3 STANDARD I/O PORT COMMANDS 22 Apr 81 9.1 STANDARD I/O PORT COMMANDS This section describes the various standard I/O port commands which are included within the CRT driver. It should be noted that this standard set is all that is actively supported at present. AUXILIARY I/O PORT COMMANDS Page 9-4 STANDARD I/O PORT COMMANDS 22 Apr 81 9.1.1 CRT_PRINT_PAGE This entrypoint forces the primary terminal to transmit the entire contents of its screen buffer to the auxiliary I/O port interface. Program control is halted until the "page print" transfer is complete. 9.1.2 CRT_PRINTER_ON This entrypoint forces the primary terminal to enable the auxiliary I/O port interface and to direct all further received data to the auxiliary I/O port without interpretation until a PRINTER_OFF command is received. At this point the primary terminal is disabled and the auxiliary I/O port is effectively the only active device as far as the VAX/VMS system is concerned. Complement to the CRT_PRINTER_OFF entrypoint. 9.1.3 CRT_PRINTER_OFF This entrypoint forces the primary terminal to disable the auxiliary I/O port interface and to direct all further received data to the primary display area with interpretation. Complement to the CRT_PRINTER_ON entrypoint. CHAPTER 10 DEVICE STATUS REPORT COMMANDS DEVICE STATUS REPORT COMMANDS Page 10-2 22 Apr 81 This chapter describes the various device status report functions performed by the CRT driver. These status report functions enable the user to query the VAX/VMS operating system as to the present terminal configuration as well as direct hardware device queries to the terminal which will respond with a device-specific response as to its present configuration. DEVICE STATUS REPORT COMMANDS Page 10-3 SOFTWARE STATUS REPORTS 22 Apr 81 10.1 SOFTWARE STATUS REPORTS This section describes the various VAX/VMS software status reports which are available within the CRT driver. These status reports enable the user to query/change the current software status of the current terminal as the VAX/VMS operating system sees the device. DEVICE STATUS REPORT COMMANDS Page 10-4 SOFTWARE STATUS REPORTS 22 Apr 81 10.1.1 CRT_IO_STATUS(QUADWORD) This entrypoint enables the user to obtain the quadword I/O status buffer of the last I/O operation to the terminal. This buffer represents the final I/O completion status of the last operation and contains additional information when the CRT_SENSE_MODE and CRT_SET_MODE commands are executed. Reference the VAX/VMS I/O USER'S GUIDE for further information as to the specific contents of the quadword I/O status block returned in argument QUADWORD. Please note that ALL entrypoints to the CRT driver return the status of the last QIO operation as an INTEGER*4 function return value. Thus a typical user program might include the following statements: INTEGER*4 CRT_PRINT INTEGER*4 STATUS STATUS=CRT_INITIALIZE IF (STATUS .NE. %LOC(SS$NORMAL)) GO TO 900 STATUS=CRT_command(arguments) IF (STATUS .EQ. %LOC(SS$DEVCMDERR)) GO TO 900 In this fashion, if the requested CRT driver command fails, the user can check for this condition and process it accordingly. Note that the return status value SS$DEVCMDERR (device command error) is returned if the requested CRT driver function is not available for the current terminal. DEVICE STATUS REPORT COMMANDS Page 10-5 SOFTWARE STATUS REPORTS 22 Apr 81 10.1.2 CRT_SENSE_MODE(CLASS,TYPE,PAGWID,PAGLEN,TRMCHR) This entrypoint returns the current software status of the terminal line as seen by the VAX/VMS operating system as follows: CLASS is the device class of the terminal TYPE is the terminal type mask PAGWID is the page width of the terminal PAGLEN is the page length of the terminal TRMCHR is the terminal characteristics mask Reference the VAX/VMS I/O USER'S GUIDE for further information on how to interpret the above status fields. Complement to the CRT_SET_MODE entrypoint. DEVICE STATUS REPORT COMMANDS Page 10-6 SOFTWARE STATUS REPORTS 22 Apr 81 10.1.3 CRT_TYPEAHEAD(BYTCNT,BYTONE) This entrypoint enables the user to query the status of the typeahead buffer associated with the terminal line. This typeahead buffer is only active if the terminal line is configured with the TYPEAHEAD attribute. The status information returned is as follows: BYTCNT is the number of characters currently in the terminal typeahead buffer BYTONE is the first character in the typeahead buffer. This argument is valid only if BYTCNT > 0. Reference the VAX/VMS I/O USER'S GUIDE for further information on how to interpret the above status fields. DEVICE STATUS REPORT COMMANDS Page 10-7 SOFTWARE STATUS REPORTS 22 Apr 81 10.1.4 CRT_SET_MODE(CLASS,TYPE,PAGWID,PAGLEN,TRMCHR) This entrypoint sets the current software terminal configuration of the terminal line as seen by the VAX/VMS operating system as follows: CLASS is the device class of the terminal TYPE is the terminal type mask PAGWID is the page width of the terminal PAGLEN is the page length of the terminal TRMCHR is the terminal characteristics mask Reference the VAX/VMS I/O USER'S GUIDE for further information on how to interpret the above SET_MODE status fields. Complement to the CRT_SENSE_MODE entrypoint. DEVICE STATUS REPORT COMMANDS Page 10-8 SOFTWARE STATUS REPORTS 22 Apr 81 10.1.5 CRT_ESCAPE_ON This entrypoint enables escape control sequence interpretation and validation for the current terminal line. This is equivalent to reading the current terminal characteristics, and then enabling the TT$MESCAPE function modifier for the current terminal line. Useful in providing software support for the cursor key and application keypad keys, which generate escape sequences when properly configured by the CRT_CURSOR_APP and CRT_KEYPAD_APP entrypoints. Complement to the CRT_ESCAPE_OFF entrypoint. 10.1.6 CRT_ESCAPE_OFF This entrypoint disables escape control sequence interpretation and validation for the current terminal line. This is equivalent to reading the current teminal characteristica, and then disabling the TT$MESCAPE function modifier for the current terminal line. Complement to the CRT_ESCAPE_ON entrypoint. DEVICE STATUS REPORT COMMANDS Page 10-9 DEVICE HARDWARE SPECIFIC STATUS REPORTS 22 Apr 81 10.2 DEVICE HARDWARE SPECIFIC STATUS REPORTS This section describes the various hardware status report queries which are available within the CRT driver. These hardware status reports are hardware-specific in nature and are therefore not supported on most of the devices defined within the CRT driver. DEVICE STATUS REPORT COMMANDS Page 10-10 DEVICE HARDWARE SPECIFIC STATUS REPORTS 22 Apr 81 10.2.1 CRT_ANSWERBACK This entrypoint requests the terminal to transmit its answerback message to the VAX/VMS operating system which will then interpret it as a user reply. It is the duty of the user to correctly read and interpret this message with one of the CRT_READ, CRT_POLL, or CRT_INPUT entrypoints. Page Index-1 22 Apr 81 INDEX CRT_132_COLUMN . . . . . . . . 8-8 CRT_80_COLUMN . . . . . . . . 8-8 CRT_ABSOLUTE . . . . . . . . . 8-11 CRT_ANSI . . . . . . . . . . . 8-7 CRT_ANSWERBACK . . . . . . . . 10-10 CRT_ASCII . . . . . . . . . . 3-7 CRT_BELL . . . . . . . . . . . 3-7 CRT_BLINK . . . . . . . . . . 4-16 CRT_BOLD . . . . . . . . . . . 4-16 CRT_CLEAR_BOL . . . . . . . . 4-21 CRT_CLEAR_BOP . . . . . . . . 4-21 CRT_CLEAR_EOL . . . . . . . . 4-21 CRT_CLEAR_EOP . . . . . . . . 4-21 CRT_CLEAR_LEDS . . . . . . . . 4-23 CRT_CLEAR_LINE . . . . . . . . 4-21 CRT_CLEAR_PAGE . . . . . . . . 4-21 CRT_CLEAR_TAB . . . . . . . . 4-10 CRT_CLEAR_TABS . . . . . . . . 4-10 CRT_CLEAR_VFU . . . . . . . . 4-11 CRT_CLEAR_VFUS . . . . . . . . 4-11 CRT_COLOR . . . . . . . . . . 4-18 CRT_CURSOR_APP . . . . . . . . 8-5 CRT_CURSOR_KEY . . . . . . . . 8-5 CRT_DOUBLE_BOT . . . . . . . . 4-13 CRT_DOUBLE_TOP . . . . . . . . 4-13 CRT_DOUBLE_WIDE . . . . . . . 4-13 CRT_ESCAPE_OFF . . . . . . . . 4-7, 10-8 CRT_ESCAPE_ON . . . . . . . . 4-7, 10-8 CRT_EXIT . . . . . . . . . . . 2-4 CRT_FORM_LENGTH . . . . . . . 4-4 CRT_FORMFEED . . . . . . . . . 3-7 CRT_GRAPHICS . . . . . . . . . 5-6 CRT_GRAPHICS_G0 . . . . . . . 5-6 CRT_GRAPHICS_G1 . . . . . . . 5-6 CRT_GRAPHICS_OFF . . . . . . . 8-15 CRT_GRAPHICS_ON . . . . . . . 8-15 CRT_HOME . . . . . . . . . . . 4-6 CRT_HOME_BOTTOM . . . . . . . 4-6 CRT_HOME_DOWN . . . . . . . . 4-6 CRT_HOME_RIGHT . . . . . . . . 4-6 CRT_HOME_UP . . . . . . . . . 4-6 CRT_HORIZONTAL . . . . . . . . 4-13 CRT_HUE_BLACK . . . . . . . . 4-18 CRT_HUE_BLUE . . . . . . . . . 4-18 CRT_HUE_CYAN . . . . . . . . . 4-19 CRT_HUE_GREEN . . . . . . . . 4-18 CRT_HUE_MAGENTA . . . . . . . 4-19 CRT_HUE_RED . . . . . . . . . 4-18 CRT_HUE_WHITE . . . . . . . . 4-19 Page Index-2 22 Apr 81 CRT_HUE_YELLOW . . . . . . . . 4-18 CRT_INDEX . . . . . . . . . . 4-8 CRT_INDEX_DOWN . . . . . . . . 4-8 CRT_INDEX_NEXT . . . . . . . . 4-8 CRT_INDEX_UP . . . . . . . . . 4-8 CRT_INITIALIZE . . . . . . . . 2-2 CRT_INPUT . . . . . . . . . . 3-4 CRT_IO_STATUS . . . . . . . . 3-4, 10-4 CRT_ISC_8001 . . . . . . . . . 8-7 CRT_JUMP . . . . . . . . . . . 8-9 CRT_KEYPAD_APP . . . . . . . . 8-6 CRT_KEYPAD_NUM . . . . . . . . 8-6 CRT_LARGE . . . . . . . . . . 3-6 CRT_LF_MODE . . . . . . . . . 8-4 CRT_LINEFEED . . . . . . . . . 3-7 CRT_MARGIN . . . . . . . . . . 4-4 CRT_MOVE . . . . . . . . . . . 4-7 CRT_MOVE_DOWN . . . . . . . . 4-7 CRT_MOVE_LEFT . . . . . . . . 4-7 CRT_MOVE_RIGHT . . . . . . . . 4-7 CRT_MOVE_UP . . . . . . . . . 4-7 CRT_NEXT_LINE . . . . . . . . 3-8 CRT_NL_MODE . . . . . . . . . 8-4 CRT_PAGE_DARK . . . . . . . . 8-10 CRT_PAGE_LIGHT . . . . . . . . 8-10 CRT_PLOT . . . . . . . . . . . 7-4 CRT_PLOT_LINE . . . . . . . . 7-6 CRT_PLOT_VECTOR . . . . . . . 7-6 CRT_PLOT_X_BAR . . . . . . . . 7-6 CRT_PLOT_Y_BAR . . . . . . . . 7-6 CRT_POLL . . . . . . . . . . . 3-4 CRT_POSITION . . . . . . . . . 4-7 CRT_PRINT . . . . . . . . . . 3-6 CRT_PRINT_PAGE . . . . . . . . 9-4 CRT_PRINTER_OFF . . . . . . . 9-4 CRT_PRINTER_ON . . . . . . . . 9-4 CRT_READ . . . . . . . . . . . 3-4 CRT_REGION . . . . . . . . . . 4-4 CRT_RELATIVE . . . . . . . . . 8-11 CRT_REPEAT_OFF . . . . . . . . 8-13 CRT_REPEAT_ON . . . . . . . . 8-13 CRT_RESTORE . . . . . . . . . 4-8 CRT_RETRACE_OFF . . . . . . . 8-14 CRT_RETRACE_ON . . . . . . . . 8-14 CRT_RETURN . . . . . . . . . . 3-7 CRT_REVERSE . . . . . . . . . 4-16 CRT_ROM1 . . . . . . . . . . . 5-8 CRT_ROM1_G0 . . . . . . . . . 5-8 CRT_ROM1_G1 . . . . . . . . . 5-8 CRT_ROM2 . . . . . . . . . . . 5-9 CRT_ROM2_G0 . . . . . . . . . 5-9 CRT_ROM2_G1 . . . . . . . . . 5-9 CRT_SENSE_MODE . . . . . . . . 10-4 CRT_SET_LED . . . . . . . . . 4-23 Page Index-3 22 Apr 81 CRT_SET_MODE . . . . . . . . . 10-4 CRT_SET_TAB . . . . . . . . . 4-10 CRT_SET_VFU . . . . . . . . . 4-11 CRT_SINGLE_WIDE . . . . . . . 4-13 CRT_SMOOTH . . . . . . . . . . 8-9 CRT_STORE . . . . . . . . . . 4-8 CRT_SYM_BLANK . . . . . . . . 6-4 CRT_SYM_CHECK . . . . . . . . 6-4 CRT_SYM_CR . . . . . . . . . . 6-4 CRT_SYM_CROSS . . . . . . . . 6-6 CRT_SYM_DEGREE . . . . . . . . 6-4 CRT_SYM_DIAMOND . . . . . . . 6-4 CRT_SYM_DOT . . . . . . . . . 6-8 CRT_SYM_FF . . . . . . . . . . 6-4 CRT_SYM_GE . . . . . . . . . . 6-7 CRT_SYM_HT . . . . . . . . . . 6-4 CRT_SYM_LE . . . . . . . . . . 6-7 CRT_SYM_LEFT_T . . . . . . . . 6-6 CRT_SYM_LF . . . . . . . . . . 6-4 CRT_SYM_LLC . . . . . . . . . 6-5 CRT_SYM_LOWER_T . . . . . . . 6-7 CRT_SYM_LRC . . . . . . . . . 6-5 CRT_SYM_NE . . . . . . . . . . 6-8 CRT_SYM_NL . . . . . . . . . . 6-5 CRT_SYM_PI . . . . . . . . . . 6-8 CRT_SYM_PL_MIN . . . . . . . . 6-5 CRT_SYM_POUND . . . . . . . . 6-8 CRT_SYM_RIGHT_T . . . . . . . 6-7 CRT_SYM_SCAN1 . . . . . . . . 6-6 CRT_SYM_SCAN3 . . . . . . . . 6-6 CRT_SYM_SCAN5 . . . . . . . . 6-6 CRT_SYM_SCAN7 . . . . . . . . 6-6 CRT_SYM_SCAN9 . . . . . . . . 6-6 CRT_SYM_ULC . . . . . . . . . 6-5 CRT_SYM_UPPER_T . . . . . . . 6-7 CRT_SYM_URC . . . . . . . . . 6-5 CRT_SYM_V_BAR . . . . . . . . 6-7 CRT_SYM_V_LINE . . . . . . . . 6-7 CRT_SYM_VT . . . . . . . . . . 6-5 CRT_TAB . . . . . . . . . . . 3-7, 4-10 CRT_TURN_OFF . . . . . . . . . 4-16 CRT_TYPEAHEAD . . . . . . . . 3-4, 10-6 CRT_UK . . . . . . . . . . . . 5-5 CRT_UK_G0 . . . . . . . . . . 5-5 CRT_UK_G1 . . . . . . . . . . 5-5 CRT_UNDER . . . . . . . . . . 4-16 CRT_USASCII . . . . . . . . . 5-4 CRT_USASCII_G0 . . . . . . . . 5-4 CRT_USASCII_G1 . . . . . . . . 5-4 CRT_VERTICAL . . . . . . . . . 4-13 CRT_VFU . . . . . . . . . . . 3-7, 4-11 CRT_VT100 . . . . . . . . . . 8-7 CRT_VT52 . . . . . . . . . . . 8-7 CRT_WRAP_OFF . . . . . . . . . 8-12 Page Index-4 22 Apr 81 CRT_WRAP_ON . . . . . . . . . 8-12 CRT_WRITE . . . . . . . . . . 3-6 Graphics . . . . . . . . . . . 5-6 Usascii . . . . . . . . . . . 5-4 Page Index-5 22 Apr 81 End of Manual Page Index-6 22 Apr 81 End of Manual