;
;  GETJPI  -  for FINGER
;
;    Inputs -
;
;	@4(ap) - Address of PID
;
;    Outputs -
;
;	@8(ap)  - Address for username
;	@12(ap) - Username length
;	@16(ap) - Image name
;	@20(ap) - Terminal name
;	@24(ap) - Terminal name length
;	@28(ap) - Account name
;	@32(ap) - State
;	@36(ap) - Cpu time
;	@40(ap) - Ppgcnt
;	@44(ap) - Gpgcnt
;	@48(ap) - Sts
;	@52(ap) - Owner
;       @56(ap) - Pid
;
	$jpidef
;
	.entry	getjpi,0
;
	moval	8(ap),r0
	movl	(r0)+,unam
	movl	(r0)+,unamln
	movl	(r0)+,imnam
	movl	(r0)+,tnam
	movl	(r0)+,tnamln
	movl	(r0)+,accnt
	movl	(r0)+,state
	movl	(r0)+,cputim
	movl	(r0)+,ppgcnt
	movl	(r0)+,gpgcnt
	movl	(r0)+,sts
	movl	(r0)+,owner
	movl    (r0)+,pid

	$getjpi_s  #5,@4(ap),,getlst,iosb
	blbc	r0,10$
	$waitfr_s  #5
	movzwl	iosb,r0
10$:	ret
;
iosb:	.blkw	4		; IOSB for GETJPI
getlst:	.word	12		; Length of username
	.word	jpi$_username	; Request code
unam:	.blkl	1		; Username address
unamln:	.blkl	1		; Username length address
;
	.word	80		; Length of image name
	.word	jpi$_imagname	; Request code
imnam:	.blkl	1		; Image name address
	.long	0		; Length not needed
;
	.word	4		; Length of state
	.word	jpi$_state	; Request code
state:	.blkl	1		; State address
	.long	0		; Length not needed
;
	.word	4		; Length of ppgcnt
	.word	jpi$_ppgcnt	; Request code
ppgcnt:	.blkl	1		; Ppgcnt address
	.long	0		; Length not needed
;
	.word	4		; Length of gpgcnt
	.word	jpi$_gpgcnt	; Request code
gpgcnt:	.blkl	1		; Gpgcnt address
	.long	0		; Length not needed
;
	.word	4		; Length of cputim
	.word	jpi$_cputim	; Request code
cputim:	.blkl	1		; Cputim address
	.long	0		; Length not needed
;
	.word	6		; Length of terminal name
	.word	jpi$_terminal	; Request code
tnam:	.blkl	1		; Terminal name address
tnamln:	.blkl	1		; Terminal name length
;
	.word	8		; Length of account name
	.word	jpi$_account	; Request code
accnt:	.blkl	1		; Account name address
	.long	0		; Length not needed
;
	.word	4		; Length of sts
	.word	jpi$_sts	; Request code
sts:	.blkl	1		; Sts address
	.long	0		; Length not needed
;
	.word	4		; Length of owner
	.word	jpi$_owner	; Request code
owner:	.blkl	1		; Owner address
	.long	0		; Length not needed
;
	.word	4		; Length of pid
	.word	jpi$_pid	; Request code
pid:	.blkl	1		; Pid address
	.long	0		; Length not needed
;
	.long	jpi$c_listend	; end of list
;
	.end
