.title devtyp ; ; function to return the the device type for the particular unit ; ; calling sequence type = devtyp(rab) ; ; where rab is the integer descriptor returned by openf ; ttydevice=1 mbxdevice=2 otherdevice=3 rab=4 .psect st_pure_code rel,con,lcl,exe,nowrt,rd,pic,shr,usr,novec,long .entry devtyp ^m<> movl @rab(ap),r1 movl rab$l_fab(r1),r0 movl fab$l_dev(r0),r1 bbc #dev$v_trm,r1,10$ movl #ttydevice,r0 brb getout 10$: bbc #dev$v_mbx,r1,20$ movl #mbxdevice,r0 brb getout 20$: movl #otherdevice,r0 getout: ret .end