	SUBROUTINE CRYPTK (LUN,SIZE,NUMREG,REGISTERS,REG_HERALD,NAME,UNIT)
C
C Version:	'V04-000'
C
C****************************************************************************
C*									    *
C*  COPYRIGHT (c) 1978, 1980, 1982, 1984 BY				    *
C*  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS.		    *
C*  ALL RIGHTS RESERVED.						    *
C* 									    *
C*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED   *
C*  ONLY IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE   *
C*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR  ANY  OTHER   *
C*  COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY   *
C*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE IS  HEREBY   *
C*  TRANSFERRED.							    *
C* 									    *
C*  THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT NOTICE   *
C*  AND  SHOULD  NOT  BE  CONSTRUED AS  A COMMITMENT BY DIGITAL EQUIPMENT   *
C*  CORPORATION.							    *
C* 									    *
C*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY OF ITS   *
C*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.		    *
C* 									    *
C*									    *
C****************************************************************************
C
C
C
C	AUTHOR	BRIAN PORTER		CREATION DATE	18-SEP-1979
C
C
C	Modified by:
C
C	V03-001	SAR0240		Sharon A. Reynolds,	2-Apr-1984
C		Changed references to TOF routine to FRCTOF, function 
C		performed by the routine is the same.
C
C	V02-001	SR0001		Sharon Reynolds, 19-Nov-1980
C		Added a flag to allow the BRIEF module to know that it
C		was called from CRYPTK to fix the problem of the device
C		registers being printed twice on the cryptk report.
C
C**

	INCLUDE 'SRC$:SYECOM.FOR /NOLIST'

	BYTE		LUN

	BYTE		NUMREG

	BYTE		SIZE

	INTEGER*2	UNIT

	INTEGER*4	REGISTERS(0:NUMREG-1)

	INTEGER*4	FIELD

	CHARACTER*(*)	REG_HERALD(0:NUMREG-1)

	CHARACTER*3	NAME




	Cryptk_flag = .true.

	FIELD = LIB$LP_LINES()

	IF ((LINES .EQ. 1)
	1 .OR.
	2 ((FORMS)
	3  .AND. 
	4 (LINES .EQ. (FIELD - 3)))
	5 .OR.
	6 ((.NOT. FORMS) 
	7 .AND. 
	8 (LINES .EQ. 20))) THEN

	IF (FORMS) CALL FRCTOF (LUN)

	IF (SIZE .EQ. 16) THEN

	CALL BRIEF16 (LUN,NUMREG,REGISTERS,REG_HERALD,NAME,UNIT)

	ELSE IF (SIZE .EQ. 32) THEN

	CALL BRIEF32 (LUN,NUMREG,REGISTERS,REG_HERALD,NAME,UNIT)
	ENDIF

	IF (.NOT. FORMS) LINES = 3
	ENDIF

	IF (SIZE .EQ. 16) THEN

	CALL BRIEF16_A (LUN,NUMREG,REGISTERS)

	ELSE IF (SIZE .EQ. 32) THEN

	CALL BRIEF32_A (LUN,NUMREG,REGISTERS)
	ENDIF

	RETURN

	END
