CHAPTER 1 Terminal Driver Modifications This chapter discusses the modifications to the RSX terminal driver required to support the security system (SCLI) for remote dial-up lines. 1.1 Overview The RSX-11 (M and M+) terminal driver unconditionally forces MCR to a terminal being answered on a remote line. While intended to provide a consistent interface to remote terminals, this functionality breaks the security system, which depends upon SCLI owning any protected terminals. Equally unfortunate is the fact that TTDRV does not use the normal SCLI$ mechanism to establish MCR, but instead simply hammers the executive data structures directly. The exec is thus unaware that a port's CLI has changed, and does not in- form SCLI of the action. This prevents SCLI from re-taking the port. Fortunately, a very simple patch to the terminal driver will 'correct' this situation. The remainder of this chapter describes the modification, and includes instruc- tions for making the patch either in the sources or via ZAP to an existing system. 1.2 Modification Details The relevant code is in subroutine MANS (modem answer), in module TTMOD.MAC. This file can be found on the distri- bution kits in [11,10]. MANS is called when a remote line is answered (e.g., carrier detected). Its purpose is to place the terminal in a known (and benign) state. MANS mod- ifies the terminal characteristics words, sets the buffer to 72., and forces the CLI to MCR. It then initiates autobaud (if the terminal is set ABAUD), and returns. The switch to MCR is accomplished by one of two in- structions, depending upon certain SYSGEN conditionals. For MPLUS, this is a BIC instruction, while for M it is a MOV instruction. Both are commented as "SET MCR AS CLI". Terminal Driver Modifications Page 1-2 Comment out these instructions. The driver also resets the lower-case bit, enabling lower-to-upper case conversion. Since SCLI is case- sensitive, we wish the terminal to be left in lowercase mode. This is accomplished by locating the BIC instruction containing "U2.LWC" in the first operand. Remove the refer- ence to "U2.LWC", leaving the other bits intact. NOTE Several other characteristics are set in this code section. Most may be eliminated, if it is de- sired. Examples include U2.CRT, U2.ESC, and S3.8BC. It is also possible to alter the default buffer size. The buffer size must be at least 72. for SCLI to operate properly. 1.3 Source Modification The desired method of modifying the driver is at the source level. UIC [1,101] contains the MPLUS files; [1,102] those for M. These uics contains the modified TTMOD.MAC, an unmodified TTMOD.VGN, and TTMOD.COR. Although M and M+ share the same source module, the up- date versions are different, requiring patch sets in both [1,101] and [1,102]. The patches may have to be manually applied, and new correction files built, for later updates or releases. Both patch sets contain the audit trail "JMB227". The simplest way to apply these patches is to copy the modified TTMOD to [11,10] of the sysgen work disk prior to SYSGEN. Since TTDRV is always re-assembled and built by SYSGEN, this will incorporate the patches. It is also pos- sible to manually assemble TTMOD, and rebuild TTDRV post- SYSGEN. Follow the instructions in the release notes for rebuilding a driver. The database doesn't change, so it is possible to use VMR to UNLoad and LOAd the patched driver without creating a new system image. Terminal Driver Modifications Page 1-3 1.4 Patching TTDRV.TSK It is also possible to apply these patches to TTDRV.TSK using ZAP, or to a running system using OPEN. In order to do this, TTDRV.MAP, plus an assembly listing of TTMOD are required. The patches add no code, and are thus simple to make. Simply comment out the "SET MCR" instruction (all three words!), and alter the bitmask for the BIC instruc- tion. The unmodified bitmask is currently 3047, and the patched value 3046. CONTENTS 1. Terminal Driver Modifications . . . . . . . . . . . 1-1 1.1 Overview . . . . . . . . . . . . . . . . . . . 1-1 1.2 Modification Details . . . . . . . . . . . . . 1-1 1.3 Source Modification . . . . . . . . . . . . . . 1-2 1.4 Patching TTDRV.TSK . . . . . . . . . . . . . . 1-3