.title get terminal characteristics ; VERB Version 1.0 June 1st, 1985 ; Written by Joe Meadows Jr., with thanks to the ; Fred Hutchinson Cancer Research Center for kindly ; allowing me to use their computing resources. ; ; If you have any questions, comments, ideas, or ; whatever, feel free to contact me via US Mail : ; Joe Meadows Jr. ; 4841 268th Ave. N.E. ; Redmond Wa. 98052 ; or via phone : (206) 827-7296 ; calling sequence ; ret-stat = get_terminal_characteristics( terminal, characteristics ) ; ret-stat is a longword return status from any of the following ; system services : ASSIGN,DASSGN,GETDVI,QIOW ; terminal is the address of a descriptor containing the name of the ; device to get information on ; characteristics is the address of the quadword to return ; the characteristics in. $devdef ; device characteristics $ttdef ; terminal characteristics $dvidef ; device information $dcdef ; device class dvi_list: .word 4,dvi$_devclass ; buffer length, item code .long dev_class ; buffer address .long 0 ; return length (0 = don't bother) dev_class: .long dev_chan: .word ; channel dev_buff: .quad ; device characteristics buffer .entry get_terminal_characteristics,0 ; call getdvi to determine if SYS$INPUT is a terminal $getdviw_s - devnam=@4(ap),itmlst=dvi_list blbs r0,5$ ret ; punt if error ; is it a terminal? 5$: cmpl #dc$_term,dev_class beql 10$ ; branch to 10$ if it is a terminal movl #0,r0 brb 30$ ; no sense in asking if isn't a terminal 10$: $assign_s - devnam=@4(ap),chan=dev_chan blbc r0,30$ $qiow_s chan=dev_chan,func=#io$_sensemode,p1=@8(ap),p2=#8 blbc r0,20$ 20$: $dassgn_s - chan=dev_chan 30$: ret .end