.title SETTYPE - set terminal type field .ident /V2.02/ .sbttl documentation ; ; This sets all terminals to be of a given type. Note that ; it does not actually change any of their characteristics, ; just the "summary" field that has a name associated with ; it. The rest of the information about the terminal is set ; through the SYSGEN /TTY parameters. ; ; Limitations: This program does no ownership checking. All ; terminals, owned, or not, get set to the one type. In short... ; ; This program should be run AT BOOT TIME ONLY! ; ; To compile: ; ; $ MACRO/NODEBUG SETTYPE ; $ LINK/SYSTEM=200/HEADER SETTYPE ; ; Recompilation will be necessary after any major VMS upgrade, ; i.e. from V3.x to V4.x ; ; Author: Eric F. Richards ; Date: 16-Jul-85 ; System: Gould OSD VAX/VMS V4.1 ; ; .sbttl Macros and Setup .link /sys$system:sys.stb/ ; link in system symbol table .library /sys$library:lib/ ; use version-sensitive library .enable suppression ; clean up list files .disable traceback, debug ; and object files $ucbdef ; Unit Control Block offsets $ttyucbdef ; Terminal-specific UCB offsets $dcdef ; Device class codes $ssdef ; System Service codes $prdef ; Privileged register def'ns $ipldef ; Interrupt priority level codes ttytyp = dt$_vt100 ; set all terminals to VT100 .sbttl kernel-mode code .page .psect settype, page, exe, nowrt, pic, shr krncod: .word ^m movl g^sch$gl_curpcb, r4 ; get PCB for locking database jsb g^sch$iolockw ; lock I/O data base for write setipl #ipl$_synch ; raise ipl while mucking clrl r11 ;; init search context loop: jsb g^ioc$scan_iodb ;; get first (next) UCB tstl r10 ;; are we through yet? beql done ;; if so, clean up cmpb #dc$_term, ucb$b_devclass(r10) ;; is this unit a terminal? bneq loop ;; if not, skip this cmpw #ucb$k_tt_length, ucb$w_size(r10) ;; LOCAL terminal? bneq loop ;; if not, skip this movb #ttytyp, ucb$b_devtype(r10) ;; set terminal type movb #ttytyp, ucb$b_tt_detype(r10) ;; set perm terminal type brb loop ;; and continue looping done: jsb g^sch$iounlock ;; unlock I/O database setipl #0 ;; restore user IPL movl #ss$_normal, r0 ; set return status ret ; go back to user mode krnend: assume le 512 ; make sure we don't page assume krncod eq 0 ; must be at psect start .sbttl user-mode code .align quad ; be nice to the code .entry settype, 0 ; main entry $cmkrnl_s routin=b^krncod ; set the termtype ret ; all done .end settype ; that's all, folks!