.TITLE $USESB .ENABL LC .MCALL SDAT$,RQST$,GLUN$,DIR$,WTSE$S ; ; ; Written by Rick Webster ; MSDGO, Process Control Applications ; 23-MAR-82 ; Caterpillar Tractor Co. ; ; ; VERSION 01 ; Edit number = 0001 ; File = USESB.MAC ; Edited by: Rick Webster 23-MAR-82 11:56:45 ; ; ;****************************************************************************** ; ; This software is provided on an "as is" basis only. Caterpillar Tractor Co., ; disclaims all warranties on the program, including without limitation, all ; implied warranties of merchantablity and fitness. ; ; Full permission and consent is hereby given to DECUS and to the DECUS ; special interest groups to reproduce, distribute, and publish and permit ; others to reproduce in whole or in part, in any form and without restriction ; this program and any information relating thereto ; ;****************************************************************************** ; ; ; Modifications: ; ; ; ;+ ; **-$USESB-User subroutine for ...HEL for WHO support-** ; ; This is a user subroutine to be called by the ...HEL program. ; It is used with the TERCOM and WHO package submitted on the ; 1979 New Orleans spring DECUS submission by J. Neeland of ; Hughes Research Labs. Most of the following code was included ; in a SLP patch to ...HEL at that time. This got to be cumbersome ; for newer versions of ...HEL so the user subroutine approach is ; now used. The main function of this subroutine is to pass log in ; information to the task TLOGGR ; ; ; Inputs: ; ; R0 - Address of account entry from ...HEL ; ; Outputs: ; ; Log on info is sent to task TLOGGR ;- ; ; Routines called ; ; ; Equated symbols ; LUN1=1 EFN1=1 ; ; Local macros ; ; ; Local data ; SDPB: SDAT$ TLOGGR,MSGBUF,EFN1 ;send login data to tloggr task RQDPB: RQST$ TLOGGR ;request running of task MSGBUF: .WORD 1 ;opcode of 1 to tloggr for logins .BLKW 6 ;12. remaining wds in send buffer LUNBUF: .BLKW 6 ; split in 2 parts for glun$ use too GLUN: GLUN$ LUN1,LUNBUF ;get lun info for the logger task ENTSAV: .WORD 0 GRP: .BYTE 0 MEM: .BYTE 0 UIC: .BLKB 6 .PAGE ; ; ; ; ;send login data to tloggr task ; $USESB::MOV R0,ENTSAV ;save address of account entry MOV ENTSAV,R0 ; point to account file entry ;mlg079 ADD #A.GRP,R0 ; int to group code MOV #UIC,R1 ; get address of uic MOV #6.,R2 ; set count of bytes to move GTUIC: MOVB (R0)+,(R1)+ ; move them DEC R2 ; done? BGT GTUIC ; no, loop MOV #UIC+3,R0 ; get address of member CLRB 3(R0) ; set end of member CALL $COTB ; convert to binary MOVB R1,MEM ; store it MOV #UIC,R0 ; get group code CLRB 3(R0) ; set of group CALL $COTB ; convert to binary MOVB R1,GRP ; store it MOV #MSGBUF+1,R0 ;initialize output buffer pointer DIR$ #GLUN ;get info about the terminal MOVB LUNBUF+G.LUNU,(R0)+ ;copy the unit # into message MOVB LUNBUF+G.LUNA,(R0)+ ; followed by device name MOVB LUNBUF+G.LUNA+1,(R0)+ MOVB GRP,(R0)+ ;get the login uic MOVB MEM,(R0)+ MOV ENTSAV,R3 ;get the login name address ADD #A.LNM,R3 MOV #14.,R2 ;set count of chars to copy CPYNAM: MOVB (R3)+,(R0)+ ;copy them DEC R2 ; until all moved BGT CPYNAM MOV #4,R2 ;copy the login sy: device name MOV ENTSAV,R3 ;get address of device name ADD #A.SYDV,R3 CPYDEV: MOVB (R3)+,(R0)+ DEC R2 BGT CPYDEV DIR$ #SDPB,RET ;send the message, don't worry if anyone ; is there to get it. WTSE$S #EFN1 ;wait till the send completes somehow DIR$ #RQDPB ;request running of logger task RET: CLC RETURN .END