.TITLE GETATL - Returns the ATL .LIST MEB ;---------------------------------------------------------------- ; Author: ; M.C.Nelson December 22, 1988 ; ; Fortran Call: ; ; KNT = GETATL( LIST ) ; ; Returns an i*4 array containing the RADIX-50 names of ; the currently active tasks associated with the issuing ; terminal. The list omits the invoking program and CLI's. ; ; Assembler Command Line: ; ; .enable substitution ; MAC LB:[1,1]EXEMC/LIB,LB:[11,10]RSXMC,SY:''getatl/LIST ; ; Linker Command Line: ; ; myprog/cp/fp/pr,myprog=myprog,GETATL,[1,54]RSX11M.STB ; ;---------------------------------------------------------------- .MCALL TCBDF$ TCBDF$ ;DEFINE TCB OFFSETS GETATL::mov 2(R5), addr ;list addr CALL $SWSTK, 95$ ;GO TO KERNEL MODE MOV addr, R0 ;task list address MOV $TKTCB,R1 ;OUR TCB ADDRESS MOV T.UCB(R1),R2 ;OUR TI UCB ADDRESS MOV $ACTHD,R3 ;ACTIVE TASK LIST 10$: TST R3 ;SCAN ACTIVE TASK LIST BEQ 90$ ;IF END OF LIST - RETURN TO USER STATE CMP T.UCB(R3),R2 ;if ti for task is not same as our's BNE 50$ ;skip ahead to the next task header CMP R3,R1 ;if task's tcb is the same as our's BEQ 50$ ;skip ahead to the next task header BIT #T3.CLI,T.ST3(R3) ;If task is a CLI BNE 50$ ;skip ahead to the next task. MOV T.NAM(R3), (R0)+ MOV T.NAM+2(R3), (R0)+ 50$: MOV T.ACTL(R3),R3 ;NEXT IN ACTIVE TASK LIST BR 10$ 90$: sub addr,r0 mov r0, addr RETURN ;RETURN TO USER MODE 95$: mov addr, r0 return addr: .word 0 .end