.TITLE Carriercheck - Check to see if carrier is on or not... .link "sys$system:sys.stb"/selective_search .library "sys$Library:lib.mlb" $ccbdef $iodef $ssdef $ttdef $ttyucbdef $ucbdef chan: .blkl 1 dev: .ascid "SLIP_DEVICE" ucb: .blkl 1 one: .blkl 1 .macro check, ?l1 blbs r0,l1 $exit_s r0 l1: .endm .entry dtr,^m<> $assign_s devnam=dev,chan=chan check movl chan,r0 jsb g^ioc$verifychan check movl ccb$l_ucb(r1),ucb $cmexec_s routin=dtr_e check $dassgn_s chan=chan bbs #tt$v_ds_carrier,one,30$ $exit_s #^x10000000 30$: $exit_s #ss$_normal .entry dtr_e,^m<> movl ucb,r0 movzbl ucb$b_tt_ds_rcv(r0),one movl #ss$_normal,r0 ret .end dtr ;And here's stuff that doesn't work on a port MultiNet has grabbed... ; ;;;; ;;;; Now let's do some stuff from VMS I/O User's Reference Manual: Part 1 ;;;; Section 8.4.5.2 Read Modem Function Modifier and ;;;; Figure 8-13: Sense mode P1 Block ;;;; ; $qiow_s chan=chan,func=#,p1=buff ; check ;;;; ;;;; Bits 16-23 in the first longword now contain the modem settings... ;;;; We will copy them to bits 24-31 and then clear the DTR setting... ;;;; ; moval buff,r0 ; movzbl 2(r0),r1 ; ashl #-4,r1,r1 ; bicb #tt$m_ds_dtr,r1 ; ashl #4,r1,r1 ; movb r1,2(r0) ; movb #tt$m_ds_dtr,3(r0) ;;;; ;;;; Section 8.4.3.3 Set Modem Function Modifier along with ;;;; Figure 8-8: Set Mode P1 Block ;;;; ; $qiow_s chan=chan,func=#,- ; p1=buff ; check ;already_set: ;