Google
 

Trailing-Edge - PDP-10 Archives - BB-F492Z-DD_1986 - 10,7/703mon/kniprm.mac
There are 2 other files named kniprm.mac in the archive. Click here to see a list.
	UNIVERSAL KNIPRM - KLNI DEFINITIONS	V23
	SUBTTL	WILLIAM C. DAVENPORT/WXD	31-DEC-85


	SEARCH	F,S,ETHPRM,MACSYM
	SALL

;THIS FILE CONTAINS ALL DEFINITIONS FOR THE KLNI

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.

.CPYRT<1985,1986>,.
;COPYRIGHT (C) 1985,1986 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;ALL RIGHTS RESERVED.


	XP	VKNIPR,23	;KNIPRM VERSION NUMBER
	SUBTTL	TABLE OF CONTENTS


;               TABLE OF CONTENTS FOR KNIPRM
;
;
;                        SECTION                                   PAGE
;    1. TABLE OF CONTENTS.........................................   2
;    2. KLNI HARDWARE DEFINITIONS
;         2.1   GENERAL DEFINITIONS...............................   3
;         2.2   MICROCODE VALUES..................................   4
;         2.3   QUEUE BLOCKS......................................   5
;         2.4   BUFFER SEGMENT DESCRIPTOR BLOCK...................   6
;         2.5   COMMAND BLOCK.....................................   7
;         2.6   PORT CONTROL BLOCK................................  11
;         2.7   PROTOCOL TYPE TABLE...............................  14
;         2.8   MULTI-CAST ADDRESS TABLE..........................  15
;         2.9   COUNTERS BLOCK....................................  16
;    3. KLNI SOFTWARE DEFINITIONS
;         3.1   TIMER VALUES......................................  18
;         3.2   PROTOCOL USER BLOCK...............................  19
;         3.3   DIAG. UUO.........................................  20
;         3.4   KNIBT. UUO........................................  21
;    4. THE END...................................................  22
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  GENERAL DEFINITIONS


;MAP INSTRUCTION BIT DEFINITIONS

	NADBTS==^-<17,,777777>	;NON-ADDRESS BITS
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  MICROCODE VALUES


;MICROCODE VERSION RESTRICTIONS

MINUVR==167			;MINIMUM ALLOWABLE MICROCODE VERSION


;MICROCODE TABLE SIZES

MAXPTT==17			;SIZE OF PTT TABLE
MAXMCT==17			;SIZE OF MCAT TABLE
MAXKCB==54			;SIZE OF COUNTERS DATA BUFFER
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  QUEUE BLOCKS


;QUEUE HEADER BLOCK

	PHASE	0		;THESE ARE OFFSETS

.QHIWD:! BLOCK	1		;INTERLOCK WORD
.QHFLI:! BLOCK	1		;FORWARD LINK WORD (FLINK)
.QHBLI:! BLOCK	1		;BACKWARD LINK WORD (BLINK)
.QHELN:! BLOCK	1		;QUEUE ENTRY LENGTH

.QHLEN:!			;LENGTH OF QUEUE HEADER

	DEPHASE


;QUEUE ENTRY BLOCK

	PHASE	0		;THESE ARE OFFSETS

.QEFLI:! BLOCK	1		;FORWARD LINK WORD (FLINK)
.QEBLI:! BLOCK	1		;BACKWARD LINK WORD (BLINK)
.QEVAD:! BLOCK	1		;VIRTUAL ADDRESS OF QUEUE ENTRY

.QELEN:!			;LENGTH OF QUEUE ENTRY HEADER

	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  BUFFER SEGMENT DESCRIPTOR BLOCK


;A BUFFER SEGMENT DESCRIPTOR DESCRIBES A PHYSICALLY CONTIGUOUS
;SECTION OF MEMORY.  SEVERAL BUFFER SEGMENT DESCRIPTORS MAY BE
;LINKED TOGETHER TO DESCRIBE A BUFFER BEING SENT OR RECEIVED.

	PHASE	0		;THESE ARE OFFSETS

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.BSSBA:! BLOCK	1		;PHYSICAL BASE ADDRESS OF SEGMENT
	 BSASBA==000077,,777777		;SEGMENT BASE ADDRESS

.BSNXT:! BLOCK	1		;PHYSICAL ADDRESS OF NEXT BSD
	 BSNNXT==000077,,777777		;ADDRESS OF NEXT BSD

.BSSGL:! BLOCK	1		;BUFFER SEGMENT LENGTH
	 BSSSGL==000000,,177777		;SEGMENT LENGTH

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

.BSVNB:! BLOCK	1		;VIRTUAL ADDRESS OF NEXT BSD

.BSRWB:! BLOCK	1		;RE-ALIGNED WORD BYTE OFFSET
.BSRWA:! BLOCK	1		;RE-ALIGNED WORD ADDRESS
.BSRWD:! BLOCK	1		;RE-ALIGNED WORD DATA

.BSLEN:!			;LENGTH OF BSD

	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  COMMAND BLOCK


;KLNI COMMAND BLOCK

	PHASE	0		;THESE ARE OFFSETS

.CMPUB:! BLOCK	1		;ADDRESS OF PROTOCOL USER BLOCK
.CMCBA:! BLOCK	1		;CALLBACK ROUTINE ADDRESS
.CMEAB:! BLOCK	1		;ADDRESS OF EA BLOCK

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMCMD:!			;START OF KLNI COMMAND

.CMQUE:! BLOCK	.QELEN		;QUEUE ENTRY WORDS

.CMCSW:! BLOCK	1		;KLNI COMMAND STATUS WORD
	 CMCSTS==776000,,000000		;COMMAND STATUS
		 CMSSND==100			;SEND DATAGRAM FLAG
		 CMSETY==076			;ERROR TYPE
			 CMEEXC==00			;EXCESSIVE COLLISIONS
			 CMECCF==01			;CARRIER CHECK FAILED
			 CMECDF==02			;COLLISION DETECT FAILED
			 CMESHT==03			;SHORT CIRCUIT
			 CMEOPN==04			;OPEN CIRCUIT
			 CMEFTL==05			;FRAME TOO LONG
			 CMERFD==06			;REMOTE FAILURE TO DEFER
			 CMEBCE==07			;BLOCK CHECK ERROR
			 CMEFRE==10			;FRAMING ERROR
			 CMEDOV==11			;DATA OVERRUN
			 CMEUPT==12			;UNRECOGNIZED PROTOCOL TYPE
			 CMEFTS==13			;FRAME TOO SHORT
			 CMESCE==27			;SPURIOUS CHANNEL ERROR
			 CMEWNZ==30			;CHANNEL WORD COUNT NOT ZERO
			 CMEQLV==31			;QUEUE LENGTH VIOLATION
			 CMEIPF==32			;ILLEGAL PLI FUNCTION
			 CMEUCM==33			;UNRECOGNIZED COMMAND
			 CMEBLV==34			;BUFFER LENGTH VIOLATION
			 CMEXBP==36			;TRANSMIT BUFFER PARITY ERROR
			 CMEINT==37			;INTERNAL ERROR
		 CMSERR==001			;ERROR FLAG

				;CONTINUED ON NEXT PAGE
				;CONTINUED FROM PREVIOUS PAGE

	 CMCFLG==001774,,000000		;COMMAND FLAGS
		 CMFCRC==100			;INTERNALLY GENERATED CRC
		 CMFPAD==040			;PAD DATAGRAM
		 CMFBSD==010			;BSD STYLE BUFFERS
		 CMFCLR==002			;CLEAR COUNTERS AFTER READ
		 CMFRSP==001			;COMMAND RESPONSE REQUIRED
	 CMCCMD==000003,,770000		;COMMAND OPCODE
		 CMOXDG==1			;SEND DATAGRAM
		 CMOLDM==2			;LOAD MCAT TABLE
		 CMOLDP==3			;LOAD PTT TABLE
		 CMORCC==4			;READ AND CLEAR COUNTERS
		 CMORDG==5			;RECEIVE DATAGRAM
		 CMOWPL==6			;WRITE PLI
		 CMORPL==7			;READ PLI
		 CMORSA==10			;READ NI STATION ADDRESS
		 CMOWSA==11			;WRITE NI STATION ADDRESS
		 CMOMAX==CMOWSA			;MAXIMUM DEFINED COMMAND OPCODE
	 CMCTDR==000000,,001777		;TIME DOMAIN REFLECTOMETRY VALUE ON ERROR

.CMHLN:!			;LENGTH OF COMMON COMMAND HEADER
.CMLNX==.			;CALCULATE LENGTH OF COMMAND BLOCK

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

	DEPHASE
;SNDDG (1) - SEND DATAGRAM COMMAND

	PHASE	.CMHLN		;FOLLOWING FIXED COMMAND HEADER

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMXDL:! BLOCK	1		;LENGTH OF TEXT DATA
	 CMXXDL==000000,,177777		;TRANSMIT DATAGRAM LENGTH

.CMXPT:! BLOCK	1		;PROTOCOL TYPE CODE
	 CMXXPT==000003,,777760		;TRANSMIT PROTOCOL TYPE

.CMXFQ:! BLOCK	1		;PHYSICAL ADDRESS OF FREE QUEUE HEADER
.CMXDA:! BLOCK	2		;DESTINATION ETHERNET ADDRESS
.CMXBA:! BLOCK	1		;PHYSICAL ADDRESS OF BSD CHAIN

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMXVB:! BLOCK	1		;VIRTUAL ADDRESS OF BSD CHAIN

IFG <.-.CMLNX>,<.CMLNX==.>	;COMPUTE MAXIMUM LENGTH OF COMMAND BLOCK

	DEPHASE


;DGRCV (5) - DATAGRAM RECEIVED COMMAND

	PHASE	.CMHLN		;FOLLOWING FIXED COMMAND HEADER

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMRDL:! BLOCK	1		;LENGTH OF TEXT DATA
	 CMRRDL==000000,,177777		;RECEIVE DATAGRAM LENGTH

.CMRDA:! BLOCK	2		;DESTINATION ETHERNET ADDRESS
.CMRSA:! BLOCK	2		;SOURCE ETHERNET ADDRESS

.CMRPT:! BLOCK	1		;PROTOCOL TYPE CODE
	 CMRRPT==000003,,777760		;RECEIVE PROTOCOL TYPE

.CMRBA:! BLOCK	1		;PHYSICAL ADDRESS OF BSD CHAIN

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMRVB:! BLOCK	1		;VIRTUAL ADDRESS OF BSD CHAIN

IFG <.-.CMLNX>,<.CMLNX==.>	;COMPUTE MAXIMUM LENGTH OF COMMAND BLOCK

	DEPHASE
;RDNSA (10) - READ NI STATION ADDRESS
;WRTNSA (11) - WRITE NI STATION ADDRESS

	PHASE	.CMHLN		;FOLLOWING FIXED COMMAND HEADER

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.CMNEA:! BLOCK	2		;ETHERNET ADDRESS

.CMNSM:! BLOCK	1		;SOFTWARE MODE WORD
	 CMMACE==000000,,000010		;ACCEPT PACKETS WITH CRC ERRORS
	 CMMAAM==000000,,000004		;ACCEPT ALL MULTI-CAST PACKETS
	 CMMH4K==000000,,000002		;H4000 MODE TRANSCEIVER
	 CMMPRM==000000,,000001		;PROMISCUOUS MODE

.CMNSW:! BLOCK	1		;SOFTWARE WORD
				;RDNSA COMMAND
	 CMWUCV==000003,,770000		;KLNI MICROCODE VERSION
	 CMWLMC==000000,,007700		;LENGTH OF MCAT TABLE
	 CMWLPT==000000,,000077		;LENGTH OF PTT TABLE
				;WRTNSA COMMAND
	 CMWERC==000000,,007777		;ERROR RETRY COUNT

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

IFG <.-.CMLNX>,<.CMLNX==.>	;COMPUTE MAXIMUM LENGTH OF COMMAND BLOCK

	DEPHASE


;DEFINE COMMAND BLOCK LENGTH AS LONGEST COMMAND

	PHASE	.CMLNX
.CMLEN:!			;LENGTH OF COMMAND BLOCK
	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  PORT CONTROL BLOCK


;THE PORT CONTROL BLOCK (PCB) IS THE BASIC MEANS OF COMMUNICATION
;BETWEEN THE KLNI AND THE KLNI DEVICE DRIVER.  IT CONTAINS ALL
;ADDRESSES NEEDED BY THE KLNI AND HEADERS OF SEVERAL QUEUES
;USED IN COMMUNICATIONS BETWEEN THE KLNI AND ITS DRIVER.

	PHASE	0		;THESE ARE OFFSETS

.PBSTS:! BLOCK	1		;KLNI STATUS FLAGS
	 PBSRUN==400000,,000000		;KLNI IS RUNNING
	 PBSONL==200000,,000000		;KLNI IS ONLINE
	 PBSMAI==100000,,000000		;KLNI IS IN MAINTENANCE MODE
	 PBSPRM==040000,,000000		;KLNI IS IN PROMISCUOUS RECEIVE MODE
	 PBSPMM==020000,,000000		;KLNI IS IN PROMISCUOUS MULTI-CAST MODE
	 PBSARD==010000,,000000		;KLNI AUTO-RELOAD DISABLED
	 PBSMOF==004000,,000000		;SET MEMORY OFFLINE IS IN PROGRESS
	 PBSINI==002000,,000000		;INITIALIZE KLNI AFTER MEMORY OFFLINE
	 PBSDMP==000040,,000000		;KLNI DUMP REQUESTED
	 PBSRLD==000020,,000000		;KLNI RELOAD REQUESTED
	 PBSQIO==000010,,000000		;QUEUED I/O REQUEST FLAG
	 PBSCPU==000007,,000000		;CPU NUMBER OF KLNI
	 PBSMJB==000000,,777000		;JOB NUMBER OF MAINTENANCE JOB
	 PBSRJB==000000,,000777		;JOB NUMBER OF KNILDR

.PBUVR:! BLOCK	1		;KLNI MICROCODE VERSION
.PBKSA:! BLOCK	1		;KLNI MICROCODE START ADDRESS
.PBLGO:! BLOCK	1		;ADDRESS OF RH20 CHANNEL LOGOUT AREA
.PBCLI:! BLOCK	1		;CONI AT LAST INTERRUPT
.PBCDB:! BLOCK	1		;ADDRESS OF CHANNEL DATA BLOCK
.PBEKB:! BLOCK	1		;ADDRESS OF ETHSER'S KONTROLLER BLOCK

.PBHEA:! BLOCK	2		;HARDWARE ETHERNET ADDRESS
.PBEAD:! BLOCK	2		;CURRENT ETHERNET ADDRESS

.PBLPT:! BLOCK	1		;LENGTH OF PTT
.PBCPT:! BLOCK	1		;COUNT OF ENTRIES USED IN PTT
.PBVPT:! BLOCK	1		;VIRTUAL ADDRESS OF PTT

.PBLMC:! BLOCK	1		;LENGTH OF MCAT
.PBCMC:! BLOCK	1		;COUNT OF ENTRIES USED IN MCAT
.PBVMC:! BLOCK	1		;VIRTUAL ADDRESS OF MCAT

.PBLCD:! BLOCK	1		;LENGTH OF COUNTERS DATA BUFFER
.PBVCD:! BLOCK	1		;VIRTUAL ADDRESS OF KLNI COUNTERS BUFFER
.PBVCT:! BLOCK	1		;VIRTUAL ADDRESS OF KLNI COUNTERS AREA

				;CONTINUED ON NEXT PAGE
				;CONTINUED FROM PREVIOUS PAGE

.PBKSC:! BLOCK	1		;COUNT OF TIMES KLNI STARTED
.PBKST:! BLOCK	1		;SYSTEM UPTIME WHEN KLNI LAST STARTED
.PBKAC:! BLOCK	1		;COUNT OF TIMES KLNI KEEP ALIVE FAILED
.PBKAT:! BLOCK	1		;SYSTEM UPTIME OF LAST KLNI KEEP ALIVE FAILURE
.PBKEC:! BLOCK	1		;COUNT OF KLNI ERRORS
.PBKET:! BLOCK	1		;SYSTEM UPTIME OF LAST KLNI ERROR
.PBKHC:! BLOCK	1		;COUNT OF TIMES KLNI HALTED
.PBKHT:! BLOCK	1		;SYSTEM UPTIME WHEN KLNI LAST HALTED
.PBKLC:! BLOCK	1		;COUNT OF TIMES KLNI RELOAD REQUESTED
.PBKLT:! BLOCK	1		;SYSTEM UPTIME WHEN LAST KLNI RELOAD REQUESTED
.PBKQC:! BLOCK	1		;COUNT OF QUEUED I/O COMMANDS QUEUED
.PBKQT:! BLOCK	1		;SYSTEM UPTIME OF LAST QUEUED I/O COMMAND
.PBKFC:! BLOCK	1		;COUNT OF PROTOCOL FREE QUEUE COMMANDS QUEUED
.PBKFT:! BLOCK	1		;SYSTEM UPTIME OF LAST FREE QUEUE COMMAND
.PBKCC:! BLOCK	1		;COUNT OF KLNI COMMANDS QUEUED
.PBKCT:! BLOCK	1		;CPU UPTIME OF LAST KLNI COMMAND
.PBKRC:! BLOCK	1		;COUNT OF KLNI RESPONSES PROCESSED
.PBKRT:! BLOCK	1		;CPU UPTIME OF LAST KLNI RESPONSE

;ERROR INFORMATION

.PBMCE:! BLOCK	1		;COUNT OF MULTICAST CHECKSUM ERRORS
.PBFQE:! BLOCK	1		;COUNT OF FREE QUEUE EMPTY ERRORS
.PBCIB:! BLOCK	1		;COUNT OF INTERLOCKS BROKEN
.PBCLE:! BLOCK	1		;CONI ON LAST ERROR INTERRUPT
.PBCRA:! BLOCK	1		;CRAM ADDRESS FROM LAST ERROR
.PBCRC:! BLOCK	2		;CRAM CONTENTS FROM LAST ERROR
.PBLG0:! BLOCK	1		;CHANNEL LOGOUT WORD 0 FROM LAST ERROR
.PBLG1:! BLOCK	1		;CHANNEL LOGOUT WORD 1 FROM LAST ERROR
.PBLG2:! BLOCK	1		;CHANNEL LOGOUT WORD 2 FROM LAST ERROR
.PBECW:! BLOCK	1		;PORT'S CCW FROM LAST ERROR

				;CONTINUED ON NEXT PAGE
				;CONTINUED FROM PREVIOUS PAGE

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.PBPCB:!

.PBCMQ:! BLOCK	.QHLEN		;COMMAND QUEUE
.PBRSQ:! BLOCK	.QHLEN		;RESPONSE QUEUE
.PBUPQ:! BLOCK	.QHLEN		;UNKNOWN PROTOCOL TYPE QUEUE

.PBRS0:! BLOCK	1		;RESERVED FOR SOFTWARE

.PBPTT:! BLOCK	1		;PHYSICAL ADDRESS OF PTT
.PBMCT:! BLOCK	1		;PHYSICAL ADDRESS OF MCAT

.PBRS1:! BLOCK	1		;RESERVED FOR SOFTWARE

.PBER0:! BLOCK	1		;ERROR WORD 0
	 PBECMD==1B0			;ERROR WHILE READING A COMMAND
	 PBERES==1B3			;ERROR WHILE BUILDING RESPONSE
	 PBEFLI==77777777B35		;FLINK OF QUEUE IN ERROR
.PBER1:! BLOCK	1		;ERROR WORD 1 (API FUNCTION WORD)
.PBER2:! BLOCK	1		;ERROR WORD 2 (CHANNEL LOGOUT WORD 1)
.PBER3:! BLOCK	1		;ERROR WORD 3 (CHANNEL LOGOUT WORD 2)

.PBPBA:! BLOCK	1		;PHYSICAL ADDRESS OF PCB
.PBPIA:! BLOCK	1		;PRIORITY INTERRUPT ASSIGNMENT
.PBRP0:! BLOCK	1		;RESERVED TO KLNI MICROCODE
.PBCCW:! BLOCK	1		;CHANNEL COMMAND WORD

.PBKCB:! BLOCK	1		;PHYSICAL ADDRESS OF KLNI COUNTERS BUFFER

.PBPCL==.-.PBPCB		;LENGTH OF PCB AREA DEFINED BY KLNI MICROCODE

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

.PBLEN:!			;LENGTH OF PORT CONTROL BLOCK

	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  PROTOCOL TYPE TABLE


;THE PROTOCOL TYPE TABLE SPECIFIES A SET OF PROTOCOL TYPES, WITH
;THEIR ASSOCIATED FREE QUEUE POINTERS THAT ARE CONSIDERED ENABLED
;BY THE PORT.
;
;THE PROTOCOL TYPES IN THIS TABLE COME INTO EFFECT ONLY AFTER
;THE EXECUTION OF A LOAD PTT COMMAND.

	PHASE	0		;THESE ARE OFFSETS

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.PTPTY:! BLOCK	1		;PROTOCOL TYPE WORD
	 PTTENA==400000,,000000		;PROTOCOL ENABLED
	 PTTPTY==000003,,777760		;PROTOCOL TYPE CODE

.PTFRQ:! BLOCK	1		;PHYSICAL ADDRESS OF FREE QUEUE HEADER

.PTRS0:! BLOCK	1		;RESERVED TO SOFTWARE

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

.PTPUB==.PTRS0			;ADDRESS OF PROTOCOL USER BLOCK

.PTLEN:!			;LENGTH OF PTT ENTRY

	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  MULTI-CAST ADDRESS TABLE


;THE MCAT IS THE MULTI-CAST ADDRESS TABLE.  THIS TABLE SPECIFIES
;WHICH MULTI-CAST ADDRESSES ARE TO BE ACCEPTED BY THE KLNI
;ADDRESS FILTER.
;
;THE ADDRESSES IN THIS TABLE COME INTO EFFECT ONLY AFTER THE
;EXECUTION OF A LOAD MCAT COMMAND.

	PHASE	0		;THESE ARE OFFSETS

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.MCHAD:! BLOCK	1		;HIGH ORDER MULTI-CAST ADDRESS
	 MCTHAD==777777,,777760		;HIGH ORDER MULTI-CAST ADDRESS

.MCLAD:! BLOCK	1		;LOW ORDER MULTI-CAST ADDRESS
	 MCTLAD==777774,,000000		;LOW ORDER MULTI-CAST ADDRESS
	 MCTENA==000000,,000001		;MULTI-CAST ADDRESS ENABLED

.MCLEN:!			;LENGTH OF MCAT ENTRY

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

	DEPHASE
	SUBTTL	KLNI HARDWARE DEFINITIONS  --  COUNTERS BLOCK


;THE COUNTERS BLOCK CONTAINS ERROR COUNTERS ACCUMULATED BY THE KLNI.
;IT IS UPDATED UPON EXECUTION OF A READ/CLEAR COUNTERS COMMAND.

	PHASE	0		;THESE ARE OFFSETS

;***** START OF WORDS DEFINED BY THE KLNI MICROCODE *****

.KCBYR:! BLOCK	1		;BYTES RECEIVED
.KCBYX:! BLOCK	1		;BYTES TRANSMITTED
.KCDGR:! BLOCK	1		;DATAGRAMS RECEIVED
.KCDGX:! BLOCK	1		;DATAGRAMS TRANSMITTED
.KCMBR:! BLOCK	1		;MULTI-CAST BYTES RECEIVED
.KCMDR:! BLOCK	1		;MULTI-CAST DATAGRAMS RECEIVED
.KCDXD:! BLOCK	1		;DATAGRAMS TRANSMITTED, INITIALLY DEFERRED
.KCDX1:! BLOCK	1		;DATAGRAMS TRANSMITTED, SINGLE COLLISION
.KCDXM:! BLOCK	1		;DATAGRAMS TRANSMITTED, MULTIPLE COLLISIONS
.KCXMF:! BLOCK	1		;TRANSMIT FAILURES
.KCXFM:! BLOCK	1		;TRANSMIT FAILURE BIT MASK
	 CXFCRL==004000			;CARRIER LOST
	 CXFBPE==002000			;BUFFER PARITY ERROR
	 CXFRFD==001000			;REMOTE FAILURE TO DEFER
	 CXFFTL==000400			;FRAME TOO LONG
	 CXFOPN==000200			;OPEN CIRCUIT
	 CXFSHT==000100			;SHORT CIRCUIT
	 CXFCDF==000040			;COLLISION DETECT CHECK FAILED
	 CXFEXC==000020			;EXCESSIVE COLLISIONS
.KCCDF:! BLOCK	1		;COLLISION DETECT CHECK FAILURES
.KCRCF:! BLOCK	1		;RECEIVE FAILURES
.KCRFM:! BLOCK	1		;RECEIVE FAILURE BIT MASK
	 CRFFPE==000400			;FREE LIST PARITY ERROR
	 CRFNFB==000200			;NO FREE BUFFERS
	 CRFFTL==000100			;FRAME TOO LONG
	 CRFFRE==000040			;FRAMING ERROR
	 CRFBCE==000020			;BLOCK CHECK ERROR
.KCFQU:! BLOCK	1		;FREE QUEUE ERRORS, UNKNOWN PROTOCOL QUEUE
.KCFQP:! BLOCK	^D16		;FREE QUEUE ERRORS, INDIVIDUAL PROTOCOL TYPES

				;CONTINUED ON NEXT PAGE
				;CONTINUED FROM PREVIOUS PAGE

.KCUFD:! BLOCK	1		;UNRECOGNIZED FRAME DESTINATION
.KCDOV:! BLOCK	1		;DATA OVERRUN ERRORS
.KCSBU:! BLOCK	1		;UNUSED
.KCFQE:! BLOCK	1		;FREE QUEUE ERRORS, ALL QUEUES
.KCHE1:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH1PRP==777777,,000000		;PLI REGISTER READ PARITY ERRORS
	 CH1PPE==000000,,777777		;PLI PARITY ERRORS
.KCHE2:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH2MPE==777777,,000000		;DATA MOVER PARITY ERRORS
	 CH2CPE==000000,,777777		;CBUS PARITY ERRORS
.KCHE3:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH3EPE==777777,,000000		;EBUS PARITY ERRORS
	 CH3EQP==000000,,777777		;EBUS QUEUE PARITY ERRORS
.KCHE4:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH4CHN==777777,,000000		;CHANNEL ERRORS
	 CH4SCE==000000,,777777		;SPURIOUS CHANNEL ERRORS
.KCHE5:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH5SXA==777777,,000000		;SPURIOUS TRANSMIT ATTENTION ERRORS
	 CH5CRT==000000,,777777		;CBUS REQUEST TIMEOUT ERRORS
.KCHE6:! BLOCK	1		;HARDWARE ERROR COUNTS
	 CH6UBP==777777,,000000		;USER BUFFER PARITY ERRORS
	 CH6XBP==000000,,777777		;TRANSMIT BUFFER PARITY ERRORS
.KCHEX:! BLOCK	3		;RESERVED

.KCLEN:!			;LENGTH OF COUNTERS DATA BUFFER

IF1,<IFN <.KCLEN-MAXKCB>,<PRINTX ?KLNI counters definition is in error>>

;***** END OF WORDS DEFINED BY THE KLNI MICROCODE *****

	DEPHASE
	SUBTTL	KLNI SOFTWARE DEFINITIONS  --  TIMER VALUES


;TIMEOUTS

TIMOUT==^D5000			;INTERLOCK WORD TIMEOUT VALUE
IDLTIM==^D1*^D1000		;KLNI IDLE TIMER (MILLISECONDS)
KAFTIM==^D10*^D1000		;KLNI KEEP ALIVE TIMER (MILLISECONDS)
RLDTIM==^D30*^D1000		;KNILDR KEEP ALIVE TIMER (MILLISECONDS)
UPTTIM==^D5*^D60*^D1000		;KLNI UPTIME TIMER (MILLISECONDS)
	SUBTTL	KLNI SOFTWARE DEFINITIONS  --  PROTOCOL USER BLOCK


;KNISER MAINTAINS A PROTOCOL USER BLOCK FOR EACH PROTOCOL ENABLED
;ON THE KLNI.  THIS BLOCK CONTAINS INFORMATION NEEDED TO PROPERLY
;PROCESS INCOMING DATAGRAMS AND TO INTERFACE WITH ETHSER.

	PHASE	0		;THESE ARE OFFSETS

.PUPTY:! BLOCK	1		;PROTOCOL TYPE CODE (KLNI FORMAT)

.PUSTS:! BLOCK	1		;PROTOCOL STATUS WORD
	 PUSPAD==400000,,000000		;PROTOCOL USES PADDING
	 PUSPTT==000000,,000077		;PTT TABLE INDEX OF THIS PROTOCOL

.PUEPB:! BLOCK	1		;ADDRESS OF ETHSER'S PORTAL BLOCK

.PUFQH:! BLOCK	.QHLEN		;FREE QUEUE HEADER FOR THIS PROTOCOL

.PULEN:!			;LENGTH OF PROTOCOL USER BLOCK

	DEPHASE
	SUBTTL	KLNI SOFTWARE DEFINITIONS  --  DIAG. UUO



;DIAG. ERROR CODES

DIANP%==1			;INSUFFICIENT PRIVILEGES
DIAIA%==2			;ILLEGAL NUMBER OF ARGUMENTS
DIAIC%==3			;ILLEGAL CONTROLLER NUMBER
DIAIU%==4			;ILLEGAL UNIT NUMBER
DIAAA%==5			;SOME UNITS ALREADY ASSIGNED
DIADM%==6			;UNIT NOT IN DIAGNOSTIC MODE
DIAAJ%==7			;UNIT ASSIGNED TO ANOTHER JOB
DIAFC%==10			;NOT ENOUGH FREE CORE
DIAAU%==11			;NO ASSIGNED UNITS
DIACP%==12			;IOWD CROSSES PAGE BOUNDARY
DIAIF%==13			;ILLEGAL FUNCTION
DIAVC%==14			;JOB MUST NOT BE VIRTUAL
DIANC%==15			;NO SUCH CPU
DIANR%==16			;CPU NOT RUNNING
DIABA%==17			;BAD ARGUMENT LIST
DIACI%==20			;NO CI PORT ON SPECIFIED CPU
DIATO%==21			;READ PORT COUNTERS FUNCTION TIMED OUT
DIANK%==22			;NO KLNI PRESENT ON CPU
	SUBTTL	KLNI SOFTWARE DEFINITIONS  --  KNIBT. UUO


;KNIBT. FUNCTION CODES

.KBSTS==1			;CHECK KLNI STATUS
.KBSRJ==2			;SET KLNI RELOAD JOB
.KBSTP==3			;STOP KLNI
.KBSTA==4			;START KLNI
.KBRED==5			;READ KLNI CRAM
.KBWRT==6			;WRITE KLNI CRAM


;KNIBT. FUNCTION .KBSTS STATUS BITS

KS.RUN==400000,,000000		;KLNI IS RUNNING
KS.MAI==200000,,000000		;KLNI IS IN MAINTENANCE MODE
KS.RLD==100000,,000000		;KLNI NEEDS RELOADING
KS.ARD==040000,,000000		;KLNI AUTO-RELOAD IS DISABLED
KS.RRQ==020000,,000000		;KLNI RELOAD REQUESTED BY SYSTEM
KS.DRQ==010000,,000000		;KLNI DUMP REQUESTED BY SYSTEM
KS.RJB==000000,,777777		;JOB NUMBER OF KNILDR


;KNIBT. ERROR CODES

KBPRV%==1			;INSUFFICIENT PRIVILEGES
KBADC%==2			;ADDRESS CHECK
KBIAL%==3			;INVALID ARGUMENT LIST
KBILF%==4			;ILLEGAL FUNCTION
KBICS%==5			;ILLEGAL CPU SPECIFICATION
KBCNA%==6			;CPU NOT AVAILABLE
KBKDE%==7			;KLNI DOESN'T EXIST
KBKMM%==10			;KLNI IS IN MAINTENANCE MODE
KBDNS%==11			;KLNI DID NOT START
KBDNI%==12			;KLNI DID NOT INITIALIZE
KBICA%==13			;INVALID CRAM ADDRESS
KBCRE%==14			;CRAM READ ERROR
KBCWE%==15			;CRAM WRITE ERROR
KBNRJ%==16			;NOT THE RELOAD JOB
	SUBTTL	THE END


	END