Google
 

Trailing-Edge - PDP-10 Archives - klad_sources - klad.sources/klad10.seq
There are no other files named klad10.seq in the archive.
;DFQDJ
                                                                                                                           SEQ 0001





				IDENTIFICATION
				--------------

	PRODUCT CODE:		AH-F601C-DD		

	DIAGNOSTIC CODE:	DFQDJ - (KLAD10)

	PRODUCT NAME:	 	DFQDJC0 KLAD PACK CREATOR

	VERSION:		0.3

	DATE RELEASED:		JUNE 1979

	MAINTAINED BY:		DIAGNOSTIC ENGINEERING

	AUTHOR:			JOHN R. KIRCHOFF

		        COPYRIGHT (C) 1976, 1979

	        DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

	THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR  USE  ONLY  ON  A
	SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION
	OF THE ABOVE COPYRIGHT NOTICE.   THIS  SOFTWARE,  OR  ANY  OTHER
	COPIES  THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE
	TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO
	AGREES  TO  THESE  LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
	SOFTWARE  SHALL  AT   ALL  TIMES  REMAIN  IN  DIGITAL  EQUIPMENT
	CORPORATION.

	THE INFORMATION IN THIS DOCUMENT IS SUBJECT  TO  CHANGE  WITHOUT
	NOTICE  AND  SHOULD  NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
	EQUIPMENT CORPORATION.

	DIGITAL EQUIPMENT CORPORATION ASSUMES NO  RESPONSIBILITY FOR THE
	USE  OR  RELIABILITY  OF  ITS SOFTWARE IN EQUIPMENT WHICH IS NOT
	SUPPLIED BY DIGITAL EQUIPMENT CORPORATION.
					MAINDEC-10-KLAD10.TXT
						PAGE 1                                                                     SEQ 0002

			TABLE OF CONTENTS
			-----------------

1.0	ABSTRACT

2.0	REQUIREMENTS

3.0	PROGRAM PROCEDURES

4.0	PROGRAM LISTINGS
					MAINDEC-10-KLAD10.TXT
						PAGE 2                                                                     SEQ 0003
1.0  ABSTRACT
     --------

	DEFINITION
	==========

	THE "KLAD" DISK PACK IS THE MAIN DIAGNOSTIC AND SYSTEM
	CHECKOUT AND ACCEPTANCE MEDIUM FOR THE DECSYSTEM10 KL10.

	THE "KLAD" PACK CONTAINS THE FOLLOWING SOFTWARE:

	A.  COMPLETE SET OF DIAGNOSTICS FOR DIAGNOSING ANY DECSYSTEM10
	    KL10 CONFIGURATION.

	B.  COMPLETE SYSTEM SOFTWARE REQUIRED FOR LOADING, RUNNING AND
	    CHECKOUT OF THE TOPS-10 SYSTEM.

	USE OF KLAD
	===========

	A.  FAST INSTALLATION GOALS

	B.  REDUCED DIAGNOSIS TIME (LESS MTTR)

	C.  REMOTE DIAGNOSIS (KLINIK = SHARED MANPOWER,RESOURCE POOLING)

	D.  ENSURING REPAIRED SYSTEM IS INTACT

	E.  MAINTAIN MACHINE REV COMPATIBILITY
					MAINDEC-10-KLAD10.TXT
						PAGE 3                                                                     SEQ 0004

2.0	REQUIREMENTS

	THE CREATION OF A KLAD PACK REQUIRES:

	A.  A FORMATTED DISK PACK

	B.  DIAGNOSTIC DISTRIBUTION MAGTAPE

	C.  APPROPRIATE SYSTEM SOFTWARE

	D.  TIMESHARING DECSYSTEM10 WITH PRIVATE RP04/RP06 DISK DRIVE

	E.  STANDALONE KL10 TO VERIFY THE KLAD PACK

3.0	PROGRAM PROCEDURES

	DESCRIBED IN THE "KLAD10.HLP" FILE FOR NOW.  WILL BE IMPROVED
	AS TIME PERMITS.

4.0	PROGRAM LISTINGS
;KLAD10.HLP	VER 0.3		15-JUN-79
                                                                                                                           SEQ 0005
1.  KLAD10 DISK PACK CREATION PROCEDURES

	THE FOLLOWING ASSUMES THAT YOU HAVE ALREADY RESTORED THE
	[6,10] DIAGNOSTIC AREA ON THE KLAD PACK FROM THE DIAGNOSTIC
	DISTRIBUTION MAGTAPE.  IF NOT, DO STEP 2 FIRST.
	ALSO, IF YOUR PACK IS NOT "KLAD", SUBSTITUTE ITS NAME WHERE
	"KLAD" IS USED.

	.LOG 6,11		;LOGIN TO 6,11 AREA
	PASSWORD: KL10

	.MOUNT KLAD		;MOUNT YOUR KLAD PACK
				;MIGHT REQUIRE "OMOUNT" MOUNTING BY
				;OPERATOR.

	.R SETSRC		;SETUP SEARCH LIST

	*C KLAD			;KLAD DISK ONLY
	*C/LIB:[6,10]		;LIBRARY AREA FROM [6,10]
	^C

	.ASSIGN KLAD: DEV	;ASSIGN LOGICAL NAME "DEV" TO "KLAD"

	.RUN WHEEL		;REQUIRES PRIVILIGES TO MAKE KLAD

	.RUN KLAD10		;RUN THE KLAD CREATION PROGRAM

	COMMAND:
	*P1011@			;OR APPROPRIATE COMMAND FILE
	.EXIT			;COMPLETED

	.RUN WHEEL		;RELEASE PRIVILIGES

	.DISMOUNT/REMOVE KLAD	;REMOVE KLAD PACK FROM SYSTEM

	.K/F			;LOGOUT
2.  DIAGNOSTIC DISTRIBUTION MAGTAPE TO KLAD [6,10] RESTORE                                                                 SEQ 0006

	.LOG 6,10		;LOGIN TO 6,10 AREA
	PASSWORD: KL10

	.MOUNT KLAD		;MOUNT YOUR KLAD PACK
				;MIGHT REQUIRE "OMOUNT" MOUNTING BY
				;OPERATOR.

	.R SETSRC		;SETUP SEARCH LIST
	*C KLAD			;KLAD DISK ONLY
	*^C

	.ZERO KLAD:		;CLEAN OUT OLD FILES

	.AS MTA#:		;ASSIGN A MAGTAPE DRIVE
				;MOUNT THE DIAGNOSTIC MAGTAPE

	.REW MTA#:		;REWIND MAGTAPE

	.SET DENSITY MTA#:800 BPI
	.SET BLOCKSIZE MTA#:512 WORDS
	.SKIP MTA#:1 FILE
	.COPY MAGTAP.SAV=MTA#:	;RETRIEVE MAGTAP PROGRAM

	.RUN MAGTAP		;RUN MAGTAP PROGRAM

	DIAGNOSTIC DISTRIBUTION MAGTAPE CREATOR

	MAGTAPE DEVICE - MTA#:
	WHAT DENSITY - 800

	COMMAND - GET		;RETRIEVE ALL PROGRAMS FROM MAGTAPE
	COMMAND - UNLOAD	;UNLOAD MAGTAPE

	.K/F			;LOGOUT, ALL DONE
3.  KLAD10 COMMAND FORMATS:
                                                                                                                           SEQ 0007
    A.  /SWITCH

    B.  /SWITCH:VALUE

    C.  FILENAME.EXT[PPN]/SWITCH:VALUE

    D.  OUTPUT FILENAME.EXT[PPN]=INPUT FILENAME.EXT[PPN]/SWITCH:VALUE

4.  SWITCHES:

    A.  /DEV:DEVICE NAME

	INDICATES ON WHAT DEVICE THE FRONT-END DIRECTORY STRUCTURE
	WILL BE LOCATED.  DEVICE NAME MAY BE LOGICAL, PHYSICAL
	OR A FILE STRUCTURE NAME.

    B.  /CREATE:N

	CREATE A NEW OR SUPERSEDE AN EXISTING FRONT-END
	DIRECTORY WITH N DIRECTORY ENTRIES ALLOCATED.

    C.  FILENAME.EXT/ALLOC:N

	ALLOCATE A DIRECTORY ENTRY WITH N DATA BLOCKS FOR A DUMMY
	FILE SPECIFIED BY FILENAME.  NO DATA IS TRANSFERRED.  N MUST
	BE >0.

    D.  FILENAME.EXT/DELETE

	THE FRONT-END DIRECTORY IS SEARCHED FOR THE FILE SPECIFIED
	BY THE FILENAME.  IF FOUND, THE FILE WILL BE DELETED FROM
	THE FRONT-END DIRECTORY AND THE [6,11] DIRECTORY.
	IF FILE IS NOT FOUND, THE USER WILL BE NOTIFIED.

    E.  FILENAME.EXT[PPN]/BOOT

	WRITE THE -11 BOOTSTRAP PROGRAM SPECIFIED BY THE FILENAME
	TO THE HARDWARE BOOT AREA OF THE DISK.
	FILE MUST BE "KLADBT.BIN".

	:ROM406

	IF THIS SWITCH VALUE IS APPENDED TO THE /BOOT SWITCH THE BOOT
	WILL ALSO BE WRITTEN TO DISK CYLINDER 406 BLOCK 0 TO ALLOW FOR
	THE OLD KL10 BM873 ROM.
    F.  FILENAME.EXT[PPN]/TO11                                                                                             SEQ 0008

	THE FRONT-END DIRECTORY MUST EXIST PRIOR TO THE USE
	OF THIS SWITCH.

	THE -10 DIRECTORY IS SEARCHED FOR THE FILE SPECIFIED BY THE
	FILE NAME.  IF FOUND, THE FILE IS COPIED FROM THE -10 FILE
	SYSTEM TO THE FRONT-END FILE SYSTEM.
	DATA CONVERSION IS PERFORMED UNLESS THE FILE EXTENSION IS
	ONE OF THOSE LISTED UNDER /BINARY SWITCH.

	/ASCII AND /BINARY ARE THE ONLY SWITCHES WHICH MAY
	BE USED WITH /TO11.

    G.  OUTPUT FILENAME.EXT[PPN]=INPUT FILENAME.EXT/TO10

	THE FRONT-END DIRECTORY IS SEARCHED FOR THE INPUT FILE
	SPECIFIED.  IF FOUND, THE INPUT FILE IS COPIED TO THE -10 FILE
	SYSTEM BY THE OUTPUT FILENAME.  DATA CONVERSION IS PERFORMED
	UNLESS THE FILE EXTENSION IS LISTED UNDER /BINARY SWITCH.
	OUTPUT MUST NOT BE TO THE [6,11] AREA.

    H.	FILENAME.EXT[PPN]/REPLACE

	REPLACE FILE IN -11 DIRECTORY WITH A NEW VERSION

    I.  /ASCII

	FORCE DATA CONVERSION FROM 7-BIT BYTES TO 8-BIT BYTES IF USED
	WITH /TO11.  FORCE DATA CONVERSION FROM 8-BIT BYTES TO 7-BIT
	BYTES IF USED WITH /TO10.  THIS SWITCH IS ASSUMED (I.E. DEFAULT)
	UNLESS THE FILE EXTENSION IS ONE OF THOSE LISTED UNDER /BINARY.

    J.  /BINARY

	CANCEL DATA CONVERSION FOR INPUT FILES WHOSE FILE EXTENSION
	IS NOT ONE OF:  .ABS, .BIN, .BIC, .CIL, .LBO, .LDA, .LDR, .LOD,
	.MFD, .OBJ, .SAV, .SYM, .SYS, .UFD.  THIS SWITCH IS ASSUMED FOR
	FILES WITH ABOVE FILE EXTENSIONS.

    K.  /LIST

	THIS SWITCH IS USED TO GET THE FRONT-END DIRECTORY LISTING.

	:SUM

	IF THIS SWITCH IS APPENDED TO THE /LIST SWITCH ONLY THE
	DIRECTORY SUMMARY INFORMATION WILL BE PRINTED.

[END KLAD10.HLP]
DECSYSTEM10 KLAD PACK CREATION PROGRAM HISTORY FILE
MAINDEC-10-KLAD10                                                                                                          SEQ 0009

VERSION 0.3

JUNE 15,1979

VERSION 0.3 CORRECTS A PROBLEM WITH THE BYTE POINTER SIZE USED TO
REFERENCE THE CYLINDER FIELD WHEN DEALING WITH RP06 DISKS.  WAS USING
A 9 BIT FIELD, SHOULD BE A 10 BIT FIELD.
ALSO CORRECTS A PROBLEM WITH THE "/TO10" FILE TRANSFER.

-----------
VERSION 0.2

MARCH 13,1977

VERSION 0.2 UPDATES THE KLAD10 PROGRAM TO ALLOW THE COEXISTANCE OF
RSX-20F AND THE FILES-11 RSX-20F DISK STRUCTURE.

THIS IS NECESSARY WITH THE ADVENT OF TOPS-10/603.

THE KLAD-10 IDENTIFICATION WORDS THAT WERE AT LOCATION 61 & 62 IN THE
TOPS-10 HOME BLOCK WERE MOVED TO WORD 65 AND CHANGED TO "KLAD10" IN
RAD50 WHICH ONLY REQUIRES 1 WORD.  KLDCP VERSION 0.14 HANDLES THIS
CHANGE AND IS REQUIRED FOR VERSION 0.2 KLAD-10 PACKS.  HOWEVER KLDCP
VERSION 0.14 WILL ALSO HANDLE VERSION 0.1 KLAD-10 PACKS.

THE "KLADBT.BIN" KLAD BOOTSTRAP PROGRAM WAS CHANGED TO INCLUDE
ECC CORRECTION CAPABILITY.

-----------
VERSION 0.1

NOVEMBER 17,1976

VERSION 0.1 IS THE FIRST RELEASE OF THE KLAD10 PROGRAM.  THIS PROGRAM
FORMERLY EXISTED AS "PMAKER" FROM "SYSTEM SOFTWARE".

THE PROGRAM WAS COMPLETELY REWRITTEN TO IMPROVE ITS OPERATION AND
EFFICIENCY.
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 1             
                                                                                                                           SEQ 0010




















				   DOCUMENT
				**************
          KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^
				**************

















		    COPYRIGHT 1979
		    DIGITAL EQUIPMENT CORPORATION
		    MAYNARD, MASS. 01754

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 2             
                                                                                                                           SEQ 0011

				 TABLE OF CONTENTS
				*******************


	31	COMMANDS

	62	PMAKER UPDATE INFORMATION

	113	DEFINITIONS

	239	STORAGE AREA DEFINITIONS

	385	INITIALIZATION AND MAIN COMMAND PROCESS

	843	ALLOCATE -11 FILE COMMAND PROCESS

	921	TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE

	1222	TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE

	1336	ASCII AND BINARY FILE TYPE CHECK ROUTINE

	1384	DELETE -11 FILE COMMAND PROCESS ROUTINE

	1424	KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE

	1745	CREATE -11 DIRECTORY ROUTINE

	1796	SPECIFY DEVICE FILE STRUCTURE FOR -11 DIRECTORY

	1888	PROCESSING SUBROUTINES

	2293	ROUTINE TO HANDLE END OF COMMAND PROCESSING

	2401	LIST FRONT-END DIRECTORY

	2635	COMMON ERROR ROUTINE
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 3             
                                                                                                                           SEQ 0012
		1	KLAD10

		14	COPYRIGHT 1976,1977,1979
			DIGITAL EQUIPMENT CORPORATION
			MARLBORO, MASS. 01752

		18	JOHN R. KIRCHOFF

		*****************************************************************
	31	COMMANDS
		*****************************************************************

		34	
			DEV:/DEVICE		;ASSOCIATE "DEV" WITH DEVICE TO BE USED
			
			/CREATE:# (KLADFE.DIR)	;CREATE DIRECTORY FILE
			
			FILE.EXT/ALLOC:#	;ALLOCATE EMPTY -11 FILE
			
			KLADBT.BIN/BOOT		;WRITE SECONDARY BOOTSTRAP
						;"FILE MUST BE "KLADBT.BIN"
			KLADBT.BIN/BOOT:ROM406	;WRITE BOOT BLOCK 0 ALSO AT CYL 406
			
			/LIST			;PRINT -11 DIRECTORY
			/LIST:SUM		;PRINT DIR SUM ONLY
			
			FILE.EXT/TO11		;TRANSFER FILE TO -11
			FILE.EXT=FILE.EXT/TO11
			
			FILE.EXT/REPLACE	;REPLACE EXISTING -11 FILE
			FILE.EXT=FILE.EXT/REPLACE
			
			FILE.EXT=FILE.EXT/TO10	;TRANSFER -11 FILE BACK TO -10
			
			FILE.EXT/DELETE		;DELETE -11 FILE
			
			/ASCII			;EXT OVERRIDE SWITCHES
			/BINARY
			

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 4             
                                                                                                                           SEQ 0013
		*****************************************************************
	62	PMAKER UPDATE INFORMATION
		*****************************************************************

		*****************************************************************
	113	DEFINITIONS
		*****************************************************************

		115	AC USAGE

		135	COMMAND SCANNER AC'S

		145	I/O CHANNELS

		154	OPDEFS

		160	DIRECTORY FILE OFFSETS

		178	HOME BLOCK OFFSETS FOR PDP-11 STRUCTURE

		190	SYMBOL DEFINITIONS

		220	;EXTENDED ENTER BLOCK
			
			0   .RBCNT	;0,,COUNT OF ENTRIES
			1   .RBPPN	;PROJ,PROG #
			2   .RBNAM	;SIXBIT FILE NAME
			3   .RBEXT	;SIXBIT EXT,,18-20 HI DATE,21-35 ACCESS DATE
			4   .RBPRV	;0-8 PROT,9-12 DATA MODE,13-23 CREATE TIME,24-35 CREATE DATE
			5   .RBSIZ
			6   .RBVER
			7   .RBSPL
			10  .RBEST	;0 - EST BLOCKS
			11  .RBALC	;# OF CONTIGUOUS BLOCKS
			12  .RBPOS
			13  .RBTF1
			14  .RBNCA
			15  .RBMTA
			16  .RBDEV
			17  .RBSTS	;FILE STATUS, UFD,,FILE - BIT 22 RP.ABC

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 5             
                                                                                                                           SEQ 0014
		*****************************************************************
	239	STORAGE AREA DEFINITIONS
		*****************************************************************

		242	PURE AREA - THIS AREA WILL NEVER BE CLEARED BY THE SYSTEM

		269	ERROR INTERCEPT CONTROL BLOCK

		276	IMPURE AREA - CLEARED ONCE ONLY WHEN PROGRAM STARTS

		315	COMMAND SPECIFICATION AREA - CLEARED EVERYTIME WHEN 
			A NEW COMMAND IS ENTERED.

		350	PROGRAM CONTROL VARIABLES

		*****************************************************************
	385	INITIALIZATION AND MAIN COMMAND PROCESS
		*****************************************************************

		402	MAIN COMMAND SCANNING LOOP

		439	PROCESS TWO PART COMMANDS

		441	SETUP OUTPUT FILE

		453	SETUP INPUT FILE

		470	DETERMINE PROCESS

		482	PROCESS ONE PART COMMANDS

		521	INDIRECT COMMAND FILE PROCESS

		598	COMMAND PROCESS

		763	COMMAND SWITCH TABLE

		812	COMMAND CHARACTER INPUT ROUTINE

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 6             
                                                                                                                           SEQ 0015
		*****************************************************************
	843	ALLOCATE -11 FILE COMMAND PROCESS
		*****************************************************************

		886	DISK OPEN/ENTER ALLOCATION ROUTINE

		*****************************************************************
	921	TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE
		*****************************************************************

		996	HERE IF ASCII CONVERSION REQUIRED
			INPUT ORDER - A,B,C,D    OUTPUT ORDER - B,A,D,C

		1010	HERE TO OUTPUT A CHARACTER

		1025	GET A CHARACTER FROM -10 FILE

		1042	END OF INPUT FILE

		1054	COMPLETE OUTPUT FILE

		1099	OPEN DEVICE/LOOKUP ON FILE FROM -10

		1136	ENTER FILE ON CHANNEL WC

		1187	OPEN DEVICE/ENTER ON FILE FROM -11

		*****************************************************************
	1222	TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE
		*****************************************************************

		1242	HERE TO FIND -11 FILE IN FRONT-END DIRECTORY

		1275	HERE CONVERT FROM 8-BIT TO 7-BIT ASCII

		1294	GET A 36-BIT WORD FROM -11 FILE

		*****************************************************************
	1336	ASCII AND BINARY FILE TYPE CHECK ROUTINE
		*****************************************************************

		1366	TABLE OF NON-ASCII EXTENSIONS

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 7             
                                                                                                                           SEQ 0016
		*****************************************************************
	1384	DELETE -11 FILE COMMAND PROCESS ROUTINE
		*****************************************************************

		*****************************************************************
	1424	KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE
		*****************************************************************

		1466	BOOT BINARY LOAD ROUTINE

		1503	GET -11 DATA WORDS

		1568	WRITE OUT SECONDARY BOOTSTRAP, BLOCKS 1-3

		1602	WRITE BOOT BLOCK 0 ONTO DISK BLOCK 0

		1650	WRITE BOOT BLOCK 0 INTO "KLADBT.ZRO"

		1714	BOOT ERROR MESSAGES

		*****************************************************************
	1745	CREATE -11 DIRECTORY ROUTINE
		*****************************************************************

		*****************************************************************
	1796	SPECIFY DEVICE FILE STRUCTURE FOR -11 DIRECTORY
		*****************************************************************

		*****************************************************************
	1888	PROCESSING SUBROUTINES
		*****************************************************************

		1891	LOGPHY - ROUTINE TO CONVERT A LOGICAL BLOCK ADDRESS TO
				   A PHYSICAL BLOCK ADDRESS. THE CYLINDER, TRACK,
				   AND SECTOR NUMBERS ARE STORED IN THREE LOCATIONS:
				   CYLADD, TRKADD, AND SCTADD.
			
			 CALL:	MOVE T1,LOGICAL BLOCK ADDRESS
					GO	LOGPHY
					RETURN WITH CYLADD, TRKADD, AND SCTADD SET UP

		1911	INITIALIZE HI-CORE FOR DIRECTORY STORAGE

		1935	OPNHOM - ROUTINE TO OPEN THE DISK ON CHANNEL 'HOM'

		1946	RADHOM - ROUTINE TO READ A BLOCK ON CHANNEL 'HOM'

		1961	WRTHOM - ROUTINE TO WRITE A BLOCK ON CHANNEL 'HOM'

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 8             
                                                                                                                           SEQ 0017
		1975	OPNDIR - ROUTINE TO OPEN THE DISK ON CHANNEL 'DIR'

		1986	RADDIR - ROUTINE TO READ A BLOCK ON CHANNEL 'DIR'
				NEED MAINT BIT TO UPDATE FROM OLD KLADS

		2003	OPWCDP - ROUTINE TO OPEN IN DUMP MODE TO WRITE

		2014	OPNDAT - ROUTINE TO OPEN THE DISK ON CHANNEL 'DAT'

		2027	OPRCDP - ROUTINE TO OPEN IN DUMP MODE TO READ

		2037	GETBLK - ROUTINE TO GET THE LOGICAL BLOCK NUMBER OF THE
				   FIRST BLOCK OF A FILE IN THE TOPS-10 FILE SYSTEM.
			
			CALL:		GO	GETBK1
					OR
					GO	GETBK2
					RETURN WITH BLOCK # IN T1

		2077	PHYLOG - PHYSICAL TO LOGICAL BLOCK ADDRESS CONVERSION ROUTINE
				CONVERT PHYSICAL ADDR TO LOGICAL ADDR
				FOR DIRECTORY FILE

		2095	COVERT -  CONVERT PHY ADDR(FROM DIR FILE) TO LOG ADDR FOR DATA FILE

		2109	VINPUT - FE FILE VERIFICATION ROUTINE

		2149	SRHDIR - SEARCH FOR AVAILABLE ENTRY IN DIRECTORY FILE

		2185	DIRETY - CREATE A -11 DIRECTORY ENTRY 

		2214	SIXR50 - SIXBIT TO RAD50 (-11 STYLE) CONVERSION ROUTINE
			
			CALL WITH 3 SIXBIT CHARACTERS IN RH OF A
			RETURN WITH RADIX 50 (-11 STYLE) IN A
			ALL BAD CHARACTER CODED AS 35'S, THE UNDEFINDED CHAR

		2252	R50SIX - RAD50 (-11 STYLE) TO SIXBIT CONVERSION ROUTINE
			
			CALL WITH RADIX 50 (-11 STYLE) IN A
			RETURN WITH 3 SIXBIT CHARACTERS IN RH OF A

KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^               DECDOC VER  00.24   15-JUN-79 10:28:14   PAGE 9             
                                                                                                                           SEQ 0018
		*****************************************************************
	2293	ROUTINE TO HANDLE END OF COMMAND PROCESSING
		*****************************************************************

		2296	WRITE OUT DIRECTORY, "KLADFE.DIR"

		2334	GET DISK DIRECTORY ADDRESS, PUT IN HOME BLOCK

		2358	WRITE OUT HOME BLOCK #1

		2364	HERE TO UPDATE AND WRITE OUT HOME BLOCK # 10

		2395	CLOSE ALL FILES AND GET OUT

		*****************************************************************
	2401	LIST FRONT-END DIRECTORY
		*****************************************************************

		2451	PNTDIR -  PRINT ONE ENTRY FROM -11 DIRECTORY

		2501	DO THE CONVERSION AND PRINT

		2520	PRINT FILE SIZE IN TERMS OF BLOCK #

		2547	PRINT DATE IN THE FORM OF DD-MON-YR

		2584	PRINT FRONT-END DIRECTORY TO TTY

		2595	PRINT MONTH

		2606	THE ACTUAL PRINT ROUTINE TO SEND MESSAGE TO TTY

		*****************************************************************
	2635	COMMON ERROR ROUTINE
		*****************************************************************
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 1
KLAD10	MAC	15-Jun-79 10:26	                                                                                           SEQ 0019

     1					;*KLAD10
     2
     3			000003		DECVER=003
     4			000000		MCNVER=000
     5
     6						XLIST
     7						LIST
     8						LALL
     9
    10					NAME	\MCNVER,\DECVER^
    11
    12					TITLE	KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3^
    13
    14					;*COPYRIGHT 1976,1977,1979
    15					;*DIGITAL EQUIPMENT CORPORATION
    16					;*MARLBORO, MASS. 01752
    17
    18					;*JOHN R. KIRCHOFF
    19
    20						SEARCH	UUOSYM,MACTEN
    21
    22	000134					LOC	134		;.JBINT
    23	000134	000000	000160		0,,INTLOC			;ERROR INTERCEPT BLOCK ADDRESS
    24
    25	000137					LOC	137
    26	000137	000000	000003		MCNVER,,DECVER
    27
    28						SALL
    29
    30						NOSYM
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 2
KLAD10	MAC	15-Jun-79 10:26		COMMANDS                                                                           SEQ 0020

    31					SUBTTL	COMMANDS
    32
    33					COMMENT	%
    34
    35					DEV:/DEVICE		;ASSOCIATE "DEV" WITH DEVICE TO BE USED
    36
    37					/CREATE:# (KLADFE.DIR)	;CREATE DIRECTORY FILE
    38
    39					FILE.EXT/ALLOC:#	;ALLOCATE EMPTY -11 FILE
    40
    41					KLADBT.BIN/BOOT		;WRITE SECONDARY BOOTSTRAP
    42								;"FILE MUST BE "KLADBT.BIN"
    43					KLADBT.BIN/BOOT:ROM406	;WRITE BOOT BLOCK 0 ALSO AT CYL 406
    44
    45					/LIST			;PRINT -11 DIRECTORY
    46					/LIST:SUM		;PRINT DIR SUM ONLY
    47
    48					FILE.EXT/TO11		;TRANSFER FILE TO -11
    49					FILE.EXT=FILE.EXT/TO11
    50
    51					FILE.EXT/REPLACE	;REPLACE EXISTING -11 FILE
    52					FILE.EXT=FILE.EXT/REPLACE
    53
    54					FILE.EXT=FILE.EXT/TO10	;TRANSFER -11 FILE BACK TO -10
    55
    56					FILE.EXT/DELETE		;DELETE -11 FILE
    57
    58					/ASCII			;EXT OVERRIDE SWITCHES
    59					/BINARY
    60
    61					%
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 3
KLAD10	MAC	15-Jun-79 10:26		PMAKER UPDATE INFORMATION                                                          SEQ 0021

    62					SUBTTL	PMAKER UPDATE INFORMATION
    63
    64					;
    65					; UPDATED OCTOBER 25,1976
    66					;
    67					; ACQUIRE PROGRAM FROM SYSTEMS PROGRAMMING
    68					; NAME CHANGED TO KLAD10 TO DISAVOW THE QUILTY
    69					; ------------------------------------------------
    70
    71					; UPDATED FEB 3, 1975
    72					;
    73					; FIX BLOCK # PROBLEM WHEN WRITTEN TO LOW AREA.
    74					;
    75					; UPDATED FEB 12, 1975
    76					;
    77					; ADD FILE STATUS WORD TO TELL MONITOR NOT TO RECOMPUTE CHECK
    78					; SUM FOR FILE WRITTEN FROM -11.
    79					; ALSO ADD TRDSW TO TAKE CARE WRITTEN WORD COUNT FOR ASCII FILE.
    80					;
    81					; UPDATED MARCH 12, 1975
    82					;
    83					; CHANGE COMMAND SCAN MECHANISM AS A RESULT OF BUG-FIXING
    84					; EFFECTED IN SCAN BY P. CONKLIN.
    85					; ADD BUFFER RECLAIM CAPABILITY AFTER PROCESSING EACH COMMAND.
    86					; FIX /ALLOC SUCH THAT FILE GENERATED BY -11 (USING SPACE
    87					; ALLOCATED BY /ALLOC) MAY BE COPIED TO -10 DIRECTORY.
    88					; USE DSKCHR TO INSURE DISK CONTROLLER IS INDEED AN RP04 CTRLER.
    89					;
    90					; UPDATED JANUARY 15,  1976
    91					;
    92					; ADD OUTPUT SPEC FOR /TO11 AND /TO10 SWITCHES.
    93					; ADD LIBRARY MODE OF OPERATION SUCH THAT INPUT DATA CAN BE
    94					; COPIED TO OUTPUT AREA WHICH IS UNDER DIFFERENT PPN'S, AS A
    95					; RESULT OF THIS CHANGE PIP OPERATION IS NO LONGER REQUIRED.
    96					; /BOOT1 SWITCH WILL CAUSE THE SECONDARY BOOTSTRAP TO BE COPIED
    97					; TO BOTH ABSOLUTE BLOCK #0 (CYLINDER #0) AND BLOCKS #0 - 5
    98					; OF MAINTENANCE CYLINDER (CYLINDER #406).
    99					; ADD /LIST SWITCH TO PROVIDE CAPABILITY TO LIST FRONT-END
   100					; DIRECTORY.  NOTE THAT THE FRONT-END DIRECTORY WILL ALSO
   101					; INCLUDE THOSE FILES WHICH ARE LOCATED IN THE CYLINDERS
   102					; FROM 0 TO 399.
   103					; INDEX FILE IS NO LONGER CREATED FOR THE FRONT-END
   104					; DIRECTORY BECAUSE KLDCP CAN NOT USE IT.
   105					;
   106					;1	MAKE RP06 KLADS - PROBLEM IS THAT YOU CAN'T USE MAINT CYL BIT
   107					;	IN SUSET.UUO AND NOT GO TO MAINT CYLS
   108					;	AREAS AFFECTED:OVER,AHEAD,CTLROK,RADDIR,WRTDIR,RADDAT,WRTDAT
   109					;	LABELS ADDED:MNTBIT
   110					;
   111					;2;2	ADD ^C INTERCEPT FOR PROPER TERMINATION
   112					;	LABELS ADDED:INTLOC
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 4
KLAD10	MAC	15-Jun-79 10:26		DEFINITIONS                                                                        SEQ 0022

   113					SUBTTL	DEFINITIONS
   114
   115					;*AC USAGE
   116
   117			000000		T0=0
   118			000001		T1=1
   119			000002		T2=2
   120			000003		T3=3
   121			000004		T4=4
   122			000005		T5=5
   123			000006		T6=6
   124			000007		T7=7
   125			000010		T10=10
   126			000016		T16=16
   127			000011		A=11
   128			000012		B=12
   129			000013		C=13
   130			000014		D=14
   131			000015		E=15
   132
   133			000017		P=17
   134
   135					;*COMMAND SCANNER AC'S
   136
   137			000001		ACDEV=1		;DEVICE
   138			000002		ACFILE=2	;FILE NAME
   139			000003		ACEXT=3		;FILE EXTENSION
   140			000004		ACDEL=4		;DELIMITER
   141			000005		ACPNTR=5	;GENERATION POINTER
   142			000006		ACPPN=6		;PROJ,PROG #
   143			000007		FR=7		;FLAG REGISTER (LH)
   144
   145					;*I/O CHANNELS
   146
   147			000001		DAT=1	;GENERAL DATA CHANNEL
   148			000002		RC=2	;READ CHANNEL
   149			000003		WC=3	;WRITE CHANNEL
   150			000004		DIR=4	;DIRECTORY CHANNEL
   151			000005		HOM=5	;HOME BLOCK CHANNEL
   152			000006		$CHN=6	;COMMAND FILE CHANNEL
   153
   154					;*OPDEFS
   155
   156		260740	000000		OPDEF	GO	[PUSHJ	P,]
   157		263740	000000		OPDEF	RTN	[POPJ	P,]
   158		261740	000000		OPDEF	PUT	[PUSH	P,]
   159		262740	000000		OPDEF	GET	[POP	P,]
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 5
KLAD10	MAC	15-Jun-79 10:26		DEFINITIONS                                                                        SEQ 0023

   160					;*DIRECTORY FILE OFFSETS
   161
   162			000000		DIR0==0		;FILE NAME IN -11 RAD50
   163			000001		DIR1==1		;LH=FILE EXT IN -11 RAD50
   164							;RH=CREATION DATE (16-BIT SMITHSONIAN DATE)
   165			000002		DIR2==2		;PHYSICAL BLOCK NUMBER (PBN)
   166			000003		DIR3==3		;NO. OF WORDS ALLOCATED FOR A FILE
   167							;LH=MOST SIGNIFICANT 16 BITS
   168							;RH=LEAST SIGNIFICANT 16 BITS
   169			000004		DIR4==4		;NO. OF WORDS WRITTEN FOR A FILE
   170							;LH=MOST SIGNIFICANT 16 BITS
   171							;RH=LEAST SIGINIFICANT 16 BITS
   172			000005		DIR5==5		;LH= -11 LOADING ADDR (IF P.I.C.= 177777)
   173							;RH= -11 EXECUTION START ADDR (1 = NOT STARTABLE)
   174			000006		DIR6==6		;LH=FILE TYPE AND FILE STATUS
   175							;RH=CHECKSUM OF ALL DATA WORDS WRITTEN IN FILE
   176			000007		DIR7=7		;RESERVED, MUST BE WRITTEN AS ZERO
   177
   178					;*HOME BLOCK OFFSETS FOR PDP-11 STRUCTURE
   179
   180			000061		WORD61==61	;RESERVED FOR RSX-20F FILES-11
   181			000062		WORD62==62	; "
   182			000063		WORD63==63	; "
   183			000064		WORD64==64	; "
   184
   185			000065		WORD65==65	;"KLAD10" IN PDP-11 RAD50, PACK IDENTIFIER
   186			000066		WORD66==66	;PBN OF DIRECTORY FILE
   187			000067		WORD67==67	;LH=NCB OF DIRECTORY FILE
   188
   189							;WORD 70 TO WORD 104 RESERVED.
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 6
KLAD10	MAC	15-Jun-79 10:26		DEFINITIONS                                                                        SEQ 0024

   190					;*SYMBOL DEFINITIONS
   191
   192			000001		ZESIZE==1			;SIZE OF BOOTSTRAP AREA(CYLINDER 0)
   193			000003		BTSIZE==3			;SIZE OF BOOTSTRAP FILE
   194			000020		BLKSIZ==20			;SIZE OF LOOKUP/ENTER BLOCKS
   195
   196					RADIX	10
   197			000001		HMBK01==1+20*0+380*0		;HOME BLOCK #1
   198									;1=SECTOR NUMBER
   199									;0=TRACK NUMBER
   200									;0=CYLINDER NUMBER
   201			000012		HMBK10==10+20*0+380*0		;HOME BLOCK #10
   202			455250		LOGBLK==0+20*0+380*406		;BEGINNING OF MAINTENANCE CYLINDER
   203
   204					RADIX	8
   205			002543		TO10IC==HEAD10+.BFCTR		;-10 INPUT RING BUF BYTE COUNT
   206			002542		TO10IP==HEAD10+.BFPTR		;-10 INPUT RING BUF BYTE PTR
   207			002571		TO10OC==HEDBLK+.BFCTR		;-10 OUTPUT RING BUF BYTE COUNT
   208			002570		TO10OP==HEDBLK+.BFPTR		;-10 OUTPUT RING BUF BYTE PTR
   209			000274		PHYDEV==DATDEV+.DCUPN		;PHY UNIT FOR DATA FILE(0-399)
   210			000256		DSKUPN==DIRDEV+.DCUPN		;PHY UNIT FOR FILE IN 406-409
   211			002560		E10ALC==ENTBLK+.RBALC		;# OF BLOCKS TO ALLOCATE
   212			002566		E10STS==ENTBLK+.RBSTS		;FILE STATUS WORD
   213			002532		E11ALC==LOOK10+.RBALC		;# OF BLOCKS TO ALLOCATE
   214			002540		E11STS==LOOK10+.RBSTS		;FILE STATUS WORD
   215
   216			200000		SU.SOT=200000			;SUSET. OUTPUT BIT
   217			010000		CTYPF=10000			;SET IF ANY CHARS TYPED FOR A COMMAND
   218
   219					COMMENT	%
   220					;EXTENDED ENTER BLOCK
   221
   222					0   .RBCNT	;0,,COUNT OF ENTRIES
   223					1   .RBPPN	;PROJ,PROG #
   224					2   .RBNAM	;SIXBIT FILE NAME
   225					3   .RBEXT	;SIXBIT EXT,,18-20 HI DATE,21-35 ACCESS DATE
   226					4   .RBPRV	;0-8 PROT,9-12 DATA MODE,13-23 CREATE TIME,24-35 CREATE DATE
   227					5   .RBSIZ
   228					6   .RBVER
   229					7   .RBSPL
   230					10  .RBEST	;0 - EST BLOCKS
   231					11  .RBALC	;# OF CONTIGUOUS BLOCKS
   232					12  .RBPOS
   233					13  .RBTF1
   234					14  .RBNCA
   235					15  .RBMTA
   236					16  .RBDEV
   237					17  .RBSTS	;FILE STATUS, UFD,,FILE - BIT 22 RP.ABC
   238					%
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 7
KLAD10	MAC	15-Jun-79 10:26		STORAGE AREA DEFINITIONS                                                           SEQ 0025

   239					SUBTTL	STORAGE AREA DEFINITIONS
   240					;	========================
   241
   242					;*PURE AREA - THIS AREA WILL NEVER BE CLEARED BY THE SYSTEM
   243
   244			002734		HOLD==^D1500		;THRESHOLD COUNT FOR FRONT-END DIRECTORY
   245			000020		BDF==^D16		;NO. OF DIRFIL ENTRIES PER BLOCK
   246			000010		HALF==BDF/2		;NO. OF -10 WORDS PER ENTRY
   247			000000		PRIME==0		;RELATIVE BLOCK OF PRIME RIB FOR USETI
   248			000315		HOMCLP== HOMBUF+20	;ADDRESS POINTER FOR RETRIEVAL PTRS
   249			000316		HOMBPC== HOMBUF+21	;BLOCKS PER CLUSTER
   250
   251	000140	777600	000274		HOMLST:	IOWD ^D128,HOMBUF	;COMMAND LIST FOR HOME BLOCK
   252	000141	000000	000000			0
   253	000142	777600	002315		DIRLST:	IOWD ^D128,DIRBUF	;COMMAND LIST FOR DIRECTORY BLOCK
   254	000143	000000	000000			0
   255	000144	777600	002115		DATLST:	IOWD ^D128,DATBUF	;COMMAND LIST FOR DATA BLOCK
   256	000145	000000	000000			0
   257	000146	777600	000474		H10LST:	IOWD ^D128,HOMB10	;COMMAND LIST FOR HOME BLK #10
   258	000147	000000	000000			0
   259	000150	777600	000674		BOTLST:	IOWD	^D128,B11STR	;COMMAND LIST FOR BOOT BLOCK
   260	000151	000000	000000			0
   261
   262	000152	0 114 113 0 105 106 	KLFEDD:	BYTE	(2)0 (8)"L" (8)"K" (2)0 (8)"E" (8)"F"
   263	000153	0 104 104 0 123 103 		BYTE	(2)0 (8)"D" (8)"D" (2)0 (8)"S" (8)"C"
   264	000154	0 040 040 0 040 040 		BYTE	(2)0 (8)" " (8)" " (2)0 (8)" " (8)" "
   265	000155	0 111 104 0 107 101 	DIAGNO:	BYTE	(2)0 (8)"I" (8)"D" (2)0 (8)"G" (8)"A"
   266	000156	0 117 116 0 124 123 		BYTE	(2)0 (8)"O" (8)"N" (2)0 (8)"T" (8)"S"
   267	000157	0 103 111 0 123 040 		BYTE	(2)0 (8)"C" (8)"I" (2)0 (8)"S" (8)" "
   268
   269					;*ERROR INTERCEPT CONTROL BLOCK
   270
   271	000160	000003	005312		INTLOC:	XWD	3,ENDALL	;SEND ^C PROCESSING TO CLEAN-UP
   272	000161	000000	000002			XWD	0,ER.ICC	;SET TO INTERCEPT ^C
   273	000162					BLOCK	2		;REQUIRED BY SYSTEM
   274
   275					; END OF PURE AREA
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 8
KLAD10	MAC	15-Jun-79 10:26		STORAGE AREA DEFINITIONS                                                           SEQ 0026

   276					;*IMPURE AREA - CLEARED ONCE ONLY WHEN PROGRAM STARTS
   277
   278	000164				START:
   279	000164				PDLIST:	BLOCK	40	;PUSH DOWN LIST
   280
   281	000224				FILNAM:	BLOCK	1	;CONTAINS FILE NAME IN -11 RAD50
   282	000225				EXTION:	BLOCK	1	;CONTAIN EXTENSION IN -11 RAD50
   283	000226				FILLOG:	BLOCK	1	;CURRENT LOG ADDR FOR REGULAR FILE
   284	000227				DIRLOG:	BLOCK	1	;CURRENT LOG ADR FOR DIRECTORY FILE
   285	000230				DIRFST:	BLOCK	1	;1ST LOG ADR FOR DIRECTORY FILE
   286	000231				CYLADD:	BLOCK	1	;CYLINDER
   287	000232				TRKADD:	BLOCK	1	;TRACK
   288	000233				SCTADD:	BLOCK	1	;SECTOR
   289	000234				FILNCB:	BLOCK	1	;NCB FOR REGULAR FILE
   290	000235				DIRNCB:	BLOCK	1	;NCB OF DIRECTORY FILE
   291	000236				NWORDS:	BLOCK	1	;# OF 11-WORDS IN FILE
   292	000237				DIRSW:	BLOCK	1	;DIRECTORY SWITCH
   293	000240				DEVSW:	BLOCK	1	;INDICATE DEVICE SPECIFIED
   294
   295	000241				DIRDEV:	BLOCK	16	;DEVICE INFORMATION FOR DIR FILE
   296	000257				DATDEV:	BLOCK	16	;DEVICE INFORMATION FOR DATA FILE
   297	000275				HOMBUF:	BLOCK	60	;BUFFER CONTAINS HOME BLOCK # 1
   298	000355				HOMBF1:	BLOCK	120	;REST OF HOME BLOCK # 1
   299	000475				HOMB10:	BLOCK	60	;BUFFER CONTAINS HOME BLOCK # 10
   300	000555				HOMBF2:	BLOCK	24	;THIS PART USED BY KLAD10
   301			000600		ENDHOM=.-1		;LENGTH
   302	000601					BLOCK	74	;REST OF HOME BLOCK # 10
   303
   304	000675				B11STR:	BLOCK	^D128*4	;BOOT BUILD AREA
   305
   306	001675				MNTBIT:	BLOCK	1	;MAINT CYL BIT, ON IF RP04
   307
   308	001676				CMDCNT:	BLOCK	1	;COMMAND LINE COUNT
   309
   310	001677				$CCLF:	BLOCK	1
   311	001700				$CMNTF:	BLOCK	1
   312	001701				$LISTF:	BLOCK	1
   313
   314					; END OF IMPURE AREA
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 9
KLAD10	MAC	15-Jun-79 10:26		STORAGE AREA DEFINITIONS                                                           SEQ 0027

   315					;*COMMAND SPECIFICATION AREA - CLEARED EVERYTIME WHEN 
   316					;*A NEW COMMAND IS ENTERED.
   317
   318	001702				O.STR:			;START OF OUTPUT SPEC STORAGE
   319	001702				O.DEV:	BLOCK	1	;DEVICE
   320	001703				O.NAM1:	BLOCK	1	;NAME
   321	001704				O.EXT:	BLOCK	1	;EXT
   322	001705				O.PRT:	BLOCK	1	;PROTECTION
   323	001706				O.PPN:	BLOCK	1	;PROJ,PROG #
   324	001707				O.DATE:	BLOCK	1	;CREATION DATE
   325	001710				O.TIME:	BLOCK	1	;CREATION TIME
   326	001711				O.VER:	BLOCK	1	;VERSION NUMBER
   327
   328	001712				I.STR:			;START OF INPUT SPEC STORAGE
   329	001712				I.DEV:	BLOCK	1	;DEVICE
   330	001713				I.NAM1:	BLOCK	1	;NAME
   331	001714				I.EXT:	BLOCK	1	;EXT
   332	001715				I.PPN:	BLOCK	1	;PROJ,PROG #
   333
   334	001716				GETBUF:	BLOCK	^D128	;A DEDICATED BUFFER
   335
   336	002116				DATBUF:	BLOCK	^D128	;BUFFER CONTAINING REGULAR DATA BLOCK
   337			002315		DATEND=.-1
   338
   339	002316				DIRBUF:	BLOCK	^D128	;BUFFER CONTAINING DIRECTORY BLOCK
   340			002515		ENDBLK=.-1
   341
   342	002516				OPEN10:	BLOCK	3	;-10 OPEN BLOCK
   343	002521				LOOK10:	BLOCK	BLKSIZ	 ;-10 LOOKUP BLOCK
   344	002541				HEAD10:	BLOCK	3	;-10 BUFFER HEADER
   345	002544				OPNBLK:	BLOCK	3	;-10 OUTPUT OPEN BLOCK
   346	002547				ENTBLK:	BLOCK	BLKSIZ	;-10 ENTER BLOCK
   347	002567				HEDBLK:	BLOCK	3	;-10 OUTPUT BUFFER HEADER
   348
   349	002572				CMDBUF:	BLOCK	^D30	;COMMAND LINE BUFFER
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 10
KLAD10	MAC	15-Jun-79 10:26		STORAGE AREA DEFINITIONS                                                           SEQ 0028

   350					;*PROGRAM CONTROL VARIABLES
   351
   352	002630				AREASW:	BLOCK	1	;INDICATE /AREA SW IS USED
   353	002631				DONESW:	BLOCK	1	;MEANS WHOLE FILE IS READ FROM -11
   354	002632				EOFSW:	BLOCK	1	;MEANS EOF IS DETECTED IN -10 FILE
   355	002633				EOLSW:	BLOCK	1	;END OF COMMAND LINE
   356	002634				EXTSW:	BLOCK	1	;ASCII CONVERSION SW
   357	002635				ROM406:	BLOCK	1	;WRITE BOOT BLOCK 0 ALSO AT CYL 406
   358	002636				ALOSW:	BLOCK	1	;ALLOCATION SW
   359	002637				HADSW:	BLOCK	1	;HAD BLOCK SW
   360	002640				TRDSW:	BLOCK	1	;INDICATE THIS IS THIRD CHAR.
   361	002641				FSTSW:	BLOCK	1	;INDICATE 1ST CHAR OR 36-BIT
   362	002642				PRNTSW:	BLOCK	1	;TO CONTROL CR,LF, WHEN PRINTING -11 DIR
   363	002643				RADIX:	BLOCK	1	;USED BY /LIST
   364	002644				DIRSUM:	BLOCK	1	;GIVE DIR SUM ONLY
   365	002645				JBFFWC:	BLOCK	1	;SAVE BUF RING ADR ON WC CHL
   366	002646				JBFFRC:	BLOCK	1	;SAVE BUF RING ADR ON RC CHL
   367
   368	002647				S.SWH:			;START OF SWITCHES
   369	002647				S.ALO:	BLOCK	1	;FILESPEC/ALLOC:N
   370	002650				S.ELN:	BLOCK	1	;FILESPEC/TO11
   371	002651				S.TEN:	BLOCK	1	;FILESPEC/TO10
   372	002652				S.REP:	BLOCK	1	;FILESPEC/REPLACE
   373	002653				S.DEL:	BLOCK	1	;FILESPEC/DELETE
   374	002654				S.BIN:	BLOCK	1	;FILESPEC/BINARY
   375	002655				S.ASC:	BLOCK	1	;FILESPEC/ASCII
   376	002656				S.ARE:	BLOCK	1	;FILESPEC/AREA:HI OR LOW
   377	002657				S.MOD:	BLOCK	1	;/MODE:DIAG OR SYSTEM
   378	002660				S.BT1:	BLOCK	1	;FILESPEC/BOOT - SECONDARY BOOTSTRAP
   379	002661				S.DEV:	BLOCK	1	;/DEVICE:FILE STRUCTURE
   380	002662				S.CRE:	BLOCK	1	;/CREATE:N
   381	002663				S.LST:	BLOCK	1	;/LIST -11 DIRECTORY
   382			002663		ALL=.-1
   383
   384					; END OF COMMAND SPECIFICATION AREA
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 11
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0029

   385					SUBTTL	INITIALIZATION AND MAIN COMMAND PROCESS
   386
   387	002664	047 00 0 00 000000 	KLAD10:	RESET
   388	002665	402 00 0 00 000164 		SETZM	START		;ZERO IMPURE/CMD AREA
   389	002666	200 01 0 00 005773 		MOVE	T1,[START,,START+1]
   390	002667	251 01 0 00 002663 		BLT	T1,ALL
   391
   392	002670	200 17 0 00 005774 		MOVE	P,[-40,,PDLIST] ;INIT PUSH LIST
   393	002671	205 01 0 00 100000 		MOVSI	T1,100000	;SET MAINT CYL BIT FOR RP04 DEFAULT
   394	002672	202 01 0 00 001675 		MOVEM	T1,MNTBIT
   395
   396	002673	402 00 0 00 001677 		SETZM	$CCLF#		;CLEAR INDIRECT COMMAND FLAG
   397						OUTSTR	[ASCIZ	"
   398					DECSYSTEM10 RP04/RP06 KLAD PACK CREATION PROGRAM, VER 0.2
   399
   400	002674	051 03 0 00 005775 	COMMAND"]
   401
   402					;*MAIN COMMAND SCANNING LOOP
   403
   404	002675	402 00 0 00 001702 	SCAN:	SETZM	O.STR		;CLEAR COMMAND AREA
   405	002676	200 01 0 00 006014 		MOVE	T1,[O.STR,,O.STR+1]
   406	002677	251 01 0 00 002663 		BLT	T1,ALL
   407
   408	002700	350 00 0 00 001676 		AOS	CMDCNT		;COUNT COMMANDS
   409	002701	200 01 0 00 006015 		MOVE	T1,[POINT 7,CMDBUF]
   410	002702	202 01 0 00 005761 		MOVEM	T1,CMDPTR#	;SETUP COMMAND STORAGE POINTER
   411	002703	332 00 0 00 001677 		SKIPE	$CCLF		;PROCESSING INDIRECT FILE ?
   412	002704	254 00 0 00 002710 		JRST	.+4		;YES
   413	002705	051 13 0 00 000000 		TTCALL	13,0		;CLEAR ^O
   414	002706	255 00 0 00 000000 		JFCL
   415						OUTSTR	[ASCIZ/
   416	002707	051 03 0 00 006016 	*/]				;PROMPT OPERATOR
   417	002710	402 00 0 00 001700 		SETZM	$CMNTF#
   418
   419	002711	260 17 0 00 003077 		GO	NAME1		;GET FIRST HALF OF COMMAND
   420	002712	603 07 0 00 010000 		TLNE	FR,CTYPF	;ANY COMMAND TYPED AT ALL ?
   421	002713	254 00 0 00 002717 		JRST	.+4		;YES
   422	002714	302 13 0 00 000032 		CAIE	C,32		;^Z, COMPLETE & EXIT
   423	002715	254 00 0 00 002675 		JRST	SCAN		;NO
   424	002716	254 00 0 00 005312 		JRST	ENDALL
   425
   426	002717	332 00 0 00 005764 		SKIPE	INDIRECT	;INDIRECT SET ?
   427	002720	254 00 0 00 003007 		JRST	$CCL		;YES, GO SETUP COMMAND FILE
   428
   429	002721	302 13 0 00 000075 		CAIE	C,"="
   430	002722	306 13 0 00 000137 		CAIN	C,"_"
   431	002723	254 00 0 00 002731 		JRST	SCAN2P		;DO 2 PART COMMANDS
   432
   433	002724	307 13 0 00 000015 		CAIG	C,15
   434	002725	254 00 0 00 002757 		JRST	SCAN1P
   435	002726	306 13 0 00 000033 		CAIN	C,33
   436	002727	254 00 0 00 002757 		JRST	SCAN1P		;DO 1 PART COMMANDS
   437
   438	002730	254 00 0 00 005751 		JRST	KEYERR		;COMMAND ERROR
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 12
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0030

   439					;*PROCESS TWO PART COMMANDS
   440
   441					;*SETUP OUTPUT FILE
   442
   443	002731	336 00 0 00 000001 	SCAN2P:	SKIPN	ACDEV		;ASSUME "DEV" IF NOT SPECIFIED
   444	002732	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'
   445	002733	202 01 0 00 001702 		MOVEM	ACDEV,O.DEV
   446
   447	002734	202 02 0 00 001703 		MOVEM	ACFILE,O.NAM1	;SETUP FILE NAME
   448
   449	002735	202 03 0 00 001704 		MOVEM	ACEXT,O.EXT	;SETUP FILE EXTENSION
   450
   451	002736	202 06 0 00 001706 		MOVEM	ACPPN,O.PPN	;SETUP PROJ,PROG #
   452
   453					;*SETUP INPUT FILE
   454
   455	002737	260 17 0 00 003077 		GO	NAME1		;GET INPUT DESCRIPTOR
   456
   457	002740	607 07 0 00 010000 		TLNN	FR,CTYPF	;ANY TYPED ?
   458	002741	254 00 0 00 005714 		JRST	FLSPER		;NO, ERROR
   459
   460	002742	336 00 0 00 000001 	SCAN3P:	SKIPN	ACDEV		;ASSUME "DEV" IF NOT SPECIFIED
   461	002743	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'
   462	002744	202 01 0 00 001712 		MOVEM	ACDEV,I.DEV
   463
   464	002745	202 02 0 00 001713 		MOVEM	ACFILE,I.NAM1	;SETUP FILE NAME
   465
   466	002746	202 03 0 00 001714 		MOVEM	ACEXT,I.EXT	;SETUP FILE EXTENSION
   467
   468	002747	202 06 0 00 001715 		MOVEM	ACPPN,I.PPN	;SETUP PROJ,PROG #
   469
   470					;*DETERMINE PROCESS
   471
   472	002750	332 00 0 00 002650 		SKIPE	S.ELN		;/TO11 SWITCH ?
   473	002751	254 00 0 00 003461 		JRST	TOELVN		;YES, TRANSFER FILE TO -11
   474
   475	002752	332 00 0 00 002652 		SKIPE	S.REP		;/REPLACE SWITCH ?
   476	002753	254 00 0 00 003461 		JRST	TOELVN		;YES, REPLACE -11 FILE
   477
   478	002754	332 00 0 00 002651 		SKIPE	S.TEN		;/TO10 SWITCH ?
   479	002755	254 00 0 00 003777 		JRST	TOTEN		;YES, RETURN FILE TO -10
   480
   481	002756	254 00 0 00 005751 		JRST	KEYERR		;COMMAND ERROR
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 13
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0031

   482					;*PROCESS ONE PART COMMANDS
   483
   484	002757	332 00 0 00 002647 	SCAN1P:	SKIPE	S.ALO		;/ALLOCATE SWITCH ?
   485	002760	254 00 0 00 003377 		JRST	ALO		;YES, ALLOC -11 EMPTY FILE
   486
   487	002761	332 00 0 00 002650 		SKIPE	S.ELN		;/TO11 SWITCH ?
   488	002762	254 00 0 00 003000 		JRST	TOELV1		;YES, TRANSFER FILE TO -11
   489
   490	002763	332 00 0 00 002652 		SKIPE	S.REP		;/REPLACE SWITCH ?
   491	002764	254 00 0 00 003000 		JRST	TOELV1		;YES, REPLACE -11 FILE
   492
   493	002765	332 00 0 00 002653 		SKIPE	S.DEL		;/DELETE SWITCH ?
   494	002766	254 00 0 00 004153 		JRST	DELETE		;YES, DELETE -11 FILE
   495
   496	002767	332 00 0 00 002663 		SKIPE	S.LST		;/LIST SWITCH ?
   497	002770	254 00 0 00 005416 		JRST	LSTDIR		;YES, LIST -11 DIRECTORY
   498
   499	002771	332 00 0 00 002662 		SKIPE	S.CRE		;/CREATE SWITCH ?
   500	002772	254 00 0 00 004536 		JRST	DIR11		;YES, CREATE -11 DIRECTORY
   501
   502	002773	332 00 0 00 002661 		SKIPE	S.DEV		;/DEVICE SWITCH ?
   503	002774	254 00 0 00 004576 		JRST	DEVSTR		;YES, ASSOCIATE "DEV" WITH STRUCTURE
   504
   505	002775	332 00 0 00 002660 		SKIPE	S.BT1		;/BOOT1 SWITCH ?
   506	002776	254 00 0 00 004205 		JRST	BOOT1		;YES, WRITE SECONDARY BOOTSTRAP
   507
   508	002777	254 00 0 00 005751 		JRST	KEYERR		;COMMAND ERROR
   509
   510	003000	336 00 0 00 000001 	TOELV1:	SKIPN	ACDEV		;ASSUME "DEV" IF NOT SPECIFIED
   511	003001	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'
   512	003002	202 01 0 00 001702 		MOVEM	ACDEV,O.DEV
   513
   514	003003	202 02 0 00 001703 		MOVEM	ACFILE,O.NAM1	;SETUP FILE NAME
   515
   516	003004	202 03 0 00 001704 		MOVEM	ACEXT,O.EXT	;SETUP FILE EXTENSION
   517
   518	003005	402 00 0 00 001706 		SETZM	O.PPN
   519
   520	003006	254 00 0 00 002742 		JRST	SCAN3P		;/TO11, INPUT & OUTPUT FILE SAME NAME
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 14
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0032

   521					;*INDIRECT COMMAND FILE PROCESS
   522
   523	003007	332 00 0 00 001677 	$CCL:	SKIPE	$CCLF		;ALREADY DOING INDIRECT ?
   524	003010	254 00 0 00 003063 		JRST	CTLSER		;YES, COMMAND ERROR
   525
   526	003011	476 00 0 00 001677 		SETOM	$CCLF		;SET COMMAND FILE PROCESS FLAG
   527
   528	003012	332 00 0 00 002663 		SKIPE	S.LST		;/LIST SWITCH ?
   529	003013	476 00 0 00 001701 		SETOM	$LISTF		;YES, LIST COMMAND FILE AS PROCESSED
   530
   531	003014	336 00 0 00 000001 		SKIPN	ACDEV		;ANY DEVICE SPECIFIED ?
   532	003015	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'	;NO, ASSUME "DEV"
   533	003016	202 01 0 00 003066 		MOVEM	ACDEV,CCLBLK+1
   534
   535	003017	202 02 0 00 003073 		MOVEM	ACFILE,CCLDIR	;SETUP FILE NAME
   536
   537	003020	336 00 0 00 000003 		SKIPN	ACEXT		;ANY EXTENSION SPECIFIED ?
   538	003021	205 03 0 00 435544 		MOVSI	ACEXT,'CMD'	;NO, ASSUME "CMD"
   539	003022	202 03 0 00 003074 		MOVEM	ACEXT,CCLDIR+1
   540
   541	003023	202 06 0 00 003076 		MOVEM	ACPPN,CCLDIR+3	;SETUP PPN
   542
   543	003024	201 00 0 00 003070 		MOVEI	$IBF
   544	003025	202 00 0 00 003067 		MOVEM	CCLBLK+2
   545
   546	003026	050 06 0 00 003065 		OPEN	$CHN,CCLBLK	;OPEN COMMAND CHANNEL
   547	003027	254 00 0 00 003061 		 JRST	$ERR
   548
   549	003030	064 06 0 00 000001 		INBUF	$CHN,1		;ONE BUFFER
   550
   551	003031	076 06 0 00 003073 		LOOKUP	$CHN,CCLDIR	;FIND COMMAND FILE
   552	003032	254 00 0 00 003061 		 JRST	$ERR		;NOT FOUND
   553
   554	003033	200 00 0 00 000000*		MOVE	.JBFF		;SAVE FIRST FREE FOR RECLAIM
   555	003034	202 00 0 00 005772 		MOVEM	$SJBFF#
   556
   557	003035	254 00 0 00 002675 		JRST	SCAN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 15
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0033

   558	003036	373 00 0 00 003072 	$CCLIN:	SOSLE	$IBF+2		;ANY CHARS AVAILABLE ?
   559	003037	254 00 0 00 003045 		JRST	$CCLI1		;YES
   560
   561	003040	056 06 0 00 000000 		IN	$CHN,		;NO, INPUT A BUFFER
   562	003041	254 00 0 00 003045 		 JRST	$CCLI1		;OK
   563
   564	003042	063 06 0 00 740000 		STATZ	$CHN,740000	;NO, CHECK STATUS
   565	003043	254 00 0 00 003061 		 JRST	$ERR		;ERROR
   566	003044	254 00 0 00 005312 		 JRST	ENDALL		;END-OF-FILE
   567
   568	003045	134 13 0 00 003071 	$CCLI1:	ILDB	C,$IBF+1	;GET CHAR
   569
   570	003046	332 00 0 00 001701 		SKIPE	$LISTF#		;LISTING COMMAND FILE ?
   571	003047	051 01 0 00 000013 		OUTCHR	C		;YES
   572
   573	003050	306 13 0 00 000012 		CAIN	C,12		;LF, CLEAR COMMENT FLAG
   574	003051	402 00 0 00 001700 		SETZM	$CMNTF
   575	003052	306 13 0 00 000014 		CAIN	C,14		;F/F, CLEAR COMMENT FLAG
   576	003053	402 00 0 00 001700 		SETZM	$CMNTF
   577
   578	003054	306 13 0 00 000073 		CAIN	C,";"		;SEMICOLON, SET COMMENT FLAG
   579	003055	476 00 0 00 001700 		SETOM	$CMNTF
   580
   581	003056	332 00 0 00 001700 		SKIPE	$CMNTF		;PROCESSING COMMENT ?
   582	003057	254 00 0 00 003036 		JRST	$CCLIN		;YES
   583
   584	003060	254 00 0 00 003353 		JRST	TTYIN1		;NO, RETURN TO CHAR PROCESS
   585
   586	003061				$ERR:	OUTSTR	[ASCIZ/
   587	003061	051 03 0 00 006017 	COMMAND FILE ERROR/]
   588	003062	047 00 0 00 000012 		EXIT
   589
   590	003063				CTLSER:	OUTSTR	[ASCIZ/
   591					?COMMAND CHARACTER ERROR
   592	003063	051 03 0 00 006024 	/]
   593	003064	254 00 0 00 005730 		JRST	WHTFIL		;PRINT ERRONEOUS COMMAND
   594
   595	003065				CCLBLK:	BLOCK	3
   596	003070				$IBF:	BLOCK	3
   597	003073				CCLDIR:	BLOCK	4
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 16
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0034

   598					;*COMMAND PROCESS
   599
   600	003077	403 01 0 00 000004 	NAME1:	SETZB	ACDEV,ACDEL	;CLEAR NAME RETURN REGISTERS
   601	003100	403 02 0 00 000003 		SETZB	ACFILE,ACEXT
   602	003101	403 06 0 00 005764 		SETZB	ACPPN,INDIRECT#	;INIT PPN TO [0,0]
   603	003102	621 07 0 00 010000 		TLZ	FR,CTYPF	;CLEAR COMMAND TYPED FLAG
   604
   605	003103	205 05 0 00 440600 	NAME3:	MOVSI	ACPNTR,(POINT 6,0) ;SET POINTER
   606	003104	400 00 0 00 000000 		SETZ			;SIXBIT NAME STORED IN AC0
   607
   608	003105	260 17 0 00 003350 	GETIOC:	GO	TTYIN		;GET INPUT CHAR
   609
   610	003106	302 13 0 00 000100 		CAIE	C,"@"
   611	003107	254 00 0 00 003112 		JRST	.+3
   612	003110	476 00 0 00 005764 		SETOM	INDIRECT	;INDIRECT COMMAND FILE
   613	003111	254 00 0 00 003105 		JRST	GETIOC
   614
   615	003112	302 13 0 00 000032 	GETIC1:	CAIE	C,32		;EOF TERMINATES COMMAND
   616	003113	307 13 0 00 000015 		CAIG	C,15
   617	003114	254 00 0 00 003146 		JRST	TERM		;OR CR,LF,FF,VT
   618	003115	306 13 0 00 000033 		CAIN	C,33
   619	003116	254 00 0 00 003146 		JRST	TERM		;OR ALTMODE
   620
   621	003117	302 13 0 00 000075 		CAIE	C,"="		;EQUALS OR BACKARROW
   622	003120	306 13 0 00 000137 		CAIN	C,"_"
   623	003121	254 00 0 00 003146 		JRST	TERM		;FINISHES FIRST PART OF COMMAND
   624
   625	003122	661 07 0 00 010000 		TLO	FR,CTYPF	;SET COMMAND TYPED FLAG
   626
   627	003123	306 13 0 00 000057 		CAIN	C,"/"		;IS THERE A SWITCH ?
   628	003124	254 00 0 00 003223 		JRST	GETSW		;YES
   629
   630	003125	306 13 0 00 000072 		CAIN	C,":"
   631	003126	254 00 0 00 003142 		JRST	DEVICE		;DEVICE SPECIFIED
   632
   633	003127	306 13 0 00 000056 		CAIN	C,"."
   634	003130	254 00 0 00 003143 		JRST	NAME2		;FILE NAME SPECIFIED
   635
   636	003131	306 13 0 00 000133 		CAIN	C,"["
   637	003132	254 00 0 00 003156 		JRST	GETPPN		;PROJ,PROG # START
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 17
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0035

   638	003133	301 13 0 00 000101 		CAIL	C,"A"		;ALL OTHER CHARS SHOULD BE ALPHANUMERIC
   639	003134	303 13 0 00 000132 		CAILE	C,"Z"		;FOR FILE NAMES
   640						JRST	[CAIL	C,"0"
   641							 CAILE	C,"9"
   642							 JRST	CTLSER	;NOT ALPHANUMERIC, COMMAND ERROR
   643	003135	254 00 0 00 006032 			 JRST	.+1]
   644	003136	640 13 0 00 000040 		TRC	C,40		;CONVERT TO SIXBIT
   645	003137	603 05 0 00 770000 		TLNE	ACPNTR,770000
   646	003140	136 13 0 00 000005 		IDPB	C,ACPNTR	;STORE UP TO SIX BYTES
   647	003141	254 00 0 00 003105 		JRST	GETIOC
   648
   649	003142	334 01 0 00 000000 	DEVICE:	SKIPA	ACDEV,0		;DEVICE NAME
   650
   651	003143	200 02 0 00 000000 	NAME2:	MOVE	ACFILE,0	;FILE NAME
   652	003144	200 04 0 00 000013 		MOVE	ACDEL,C		;SET DELIMITER
   653	003145	254 00 0 00 003103 		JRST	NAME3		;GET NEXT SYMBOL
   654
   655	003146	322 04 0 00 003151 	TERM:	JUMPE	ACDEL,.+3	;IF NO PREVIOUS DELIMITER
   656	003147	302 04 0 00 000072 		CAIE	ACDEL,":"	;OR IF PREVIOUS DELIMTER ":"
   657	003150	254 00 0 00 003152 		JRST	TERM1
   658	003151	200 02 0 00 000000 		MOVE	ACFILE,0	;SET FILE NAME
   659
   660	003152	302 04 0 00 000056 	TERM1:	CAIE	ACDEL,"."	;IF PERIOD
   661	003153	263 17 0 00 000000 		RTN
   662	003154	510 03 0 00 000000 		HLLZ	ACEXT,0		;SET EXTENSION
   663	003155	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 18
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0036

   664	003156	260 17 0 00 003167 	GETPPN:	GO	GETOCT		;BUILD THE PROJ,PROG #
   665	003157	302 13 0 00 000054 		CAIE	C,","
   666	003160	254 00 0 00 003063 		JRST	CTLSER		;ERROR, COMMA SEPARATES [P,P]
   667
   668	003161	514 06 0 00 000011 		HRLZ	ACPPN,A		;PUT PROJ # IN LEFT HALF
   669
   670	003162	260 17 0 00 003167 		GO	GETOCT
   671	003163	302 13 0 00 000135 		CAIE	C,"]"
   672	003164	254 00 0 00 003063 		JRST	CTLSER		;ERROR, BRACKET ENDS [P,P]
   673	003165	540 06 0 00 000011 		HRR	ACPPN,A		;PUT PROG # IN RIGHT HALF
   674
   675	003166	254 00 0 00 003105 		JRST	GETIOC
   676
   677	003167	201 11 0 00 000000 	GETOCT:	MOVEI	A,0		;BUILD AN OCTAL NUMBER
   678	003170	260 17 0 00 003350 	GETOC1:	GO	TTYIN
   679	003171	301 13 0 00 000060 	GETOC2:	CAIL	C,"0"
   680	003172	303 13 0 00 000067 		CAILE	C,"7"
   681	003173	263 17 0 00 000000 		RTN			;RETURN ON NON-OCTAL CHAR
   682
   683	003174	242 11 0 00 000003 		LSH	A,3
   684	003175	271 11 0 13 777720 		ADDI	A,-"0"(C)
   685	003176	254 00 0 00 003170 		JRST	GETOC1
   686
   687	003177	201 00 0 00 000000 	GETDEC:	MOVEI	0,0		;BUILD A DECIMAL NUMBER
   688	003200	260 17 0 00 003350 	GETDE1:	GO	TTYIN
   689	003201	301 13 0 00 000060 	GETDE2:	CAIL	C,"0"
   690	003202	303 13 0 00 000071 		CAILE	C,"9"
   691	003203	263 17 0 00 000000 		RTN			;RETURN ON NON-DECIMAL CHAR
   692
   693	003204	221 00 0 00 000012 		IMULI	0,^D10
   694	003205	271 00 0 13 777720 		ADDI	0,-"0"(C)
   695	003206	254 00 0 00 003200 		JRST	GETDE1
   696
   697	003207	205 05 0 00 440600 	GETSIX:	MOVSI	ACPNTR,(POINT 6,0)
   698	003210	403 00 0 00 000011 		SETZB	0,A
   699	003211	260 17 0 00 003350 	GETSI1:	GO	TTYIN
   700	003212	301 13 0 00 000101 	GETSI2:	CAIL	C,"A"
   701	003213	303 13 0 00 000132 		CAILE	C,"Z"
   702						JRST	[CAIL	C,"0"
   703							 CAILE	C,"9"
   704							 JRST	GETSI3
   705	003214	254 00 0 00 006036 			 JRST	.+1]
   706	003215	640 13 0 00 000040 		TRC	C,40
   707	003216	603 05 0 00 770000 		TLNE	ACPNTR,770000
   708	003217	136 13 0 00 000005 		IDPB	C,ACPNTR
   709	003220	254 00 0 00 003211 		JRST	GETSI1
   710	003221	200 11 0 00 000000 	GETSI3:	MOVE	A,0
   711	003222	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 19
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0037

   712	003223	261 17 0 00 000000 	GETSW:	PUT	0
   713	003224	261 17 0 00 000011 		PUT	A
   714	003225	260 17 0 00 003207 		GO	GETSIX		;GET SIXBIT SWITCH NAME
   715	003226	322 00 0 00 003063 		JUMPE	0,CTLSER	;ERROR IF NO WORD IN 0
   716	003227	202 13 0 00 005767 		MOVEM	C,SAVSWC#	;SAVE TERMINATOR
   717
   718	003230	205 11 0 00 777763 		MOVSI	A,-SWTLEN
   719	003231	201 13 0 00 000077 		MOVEI	C,77		;SETUP MASK
   720	003232	612 00 0 00 000013 		TDNE	0,C		;SKIP IF ALL MASKED BITS ARE ZERO
   721	003233	254 00 0 00 003237 		JRST	.+4		;NO, COMPLETE MASK
   722	003234	242 13 0 00 000006 		LSH	C,6		;SHIFT MASK BITS LEFT
   723	003235	660 13 0 00 000077 		TRO	C,77		;SET FIRST SIX AGAIN
   724	003236	254 00 0 00 003232 		JRST	.-4
   725	003237	242 13 0 00 777772 		LSH	C,-6		;SHIFT OUT LAST 6 BITS
   726	003240	452 13 0 00 005762 		SETCAM	C,COMPRS#	;COMPLIMENT MASK BITS
   727	003241	400 14 0 00 000000 		SETZ	D,		;CLEAR MATCH COUNTER
   728
   729	003242	200 13 0 11 003277 		MOVE	C,SWTBL(A)	;GET A WORD FROM TABLE
   730	003243	404 13 0 00 005762 		AND	C,COMPRS	;STRIP UNTYPED POSITIONS
   731	003244	316 00 0 00 000013 		CAMN	0,C		;SEARCH SWITCH TABLE
   732	003245	260 17 0 00 003273 		GO	SETSW		;SET CONTROL SWITCH
   733	003246	253 11 0 00 003242 		AOBJN	A,.-4
   734	003247	302 14 0 00 000001 		CAIE	D,1		;ONLY ONE MATCH ?
   735	003250	254 00 0 00 005751 		JRST	KEYERR		;OR NOT FOUND, COMMAND ERROR
   736
   737	003251	200 13 0 00 005767 		MOVE	C,SAVSWC
   738	003252	302 13 0 00 000072 		CAIE	C,":"		;SWITCH END WITH COLON ?
   739	003253	254 00 0 00 003270 		JRST	GETSW1		;NO
   740
   741	003254	332 00 0 00 002657 		SKIPE	S.MOD		;/MODE: ?
   742	003255	254 00 0 00 003314 		JRST	GETMOD		;YES
   743	003256	332 00 0 00 002656 		SKIPE	S.ARE		;/AREA: ?
   744	003257	254 00 0 00 003323 		JRST	GETARE		;YES
   745	003260	332 00 0 00 002661 		SKIPE	S.DEV		;/DEV: ?
   746	003261	254 00 0 00 003332 		JRST	GETDEV		;YES
   747	003262	332 00 0 00 002660 		SKIPE	S.BT1		;/BOOT: ?
   748	003263	254 00 0 00 003336 		JRST	GETBT1		;YES
   749	003264	332 00 0 00 002663 		SKIPE	S.LST		;/LIST: ?
   750	003265	254 00 0 00 003343 		JRST	GETLST		;YES
   751
   752	003266	260 17 0 00 003177 		GO	GETDEC		;NO, MUST BE DECIMAL ARGUMENT
   753	003267	202 00 0 15 002647 		MOVEM	0,S.SWH(E)	;SAVE AS SWITCH ARGUMENT
   754
   755	003270	262 17 0 00 000011 	GETSW1:	GET	A
   756	003271	262 17 0 00 000000 		GET	0
   757	003272	254 00 0 00 003106 		JRST	GETIOC+1
   758
   759	003273	476 00 0 11 002647 	SETSW:	SETOM	S.SWH(A)	;SET CONTROL SWITCH FLAG
   760	003274	200 15 0 00 000011 		MOVE	E,A
   761	003275	350 00 0 00 000014 		AOS	D		;COUNT MATCHES
   762	003276	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 20
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0038

   763					;*COMMAND SWITCH TABLE
   764
   765	003277	41 54 54 57 43 00 	SWTBL:	SIXBIT/ALLOC/
   766	003300	64 57 21 21 00 00 		SIXBIT/TO11/
   767	003301	64 57 21 20 00 00 		SIXBIT/TO10/
   768	003302	62 45 60 54 41 43 		SIXBIT/REPLAC/
   769	003303	44 45 54 45 64 45 		SIXBIT/DELETE/
   770	003304	42 51 56 41 62 71 		SIXBIT/BINARY/
   771	003305	41 63 43 51 51 00 		SIXBIT/ASCII/
   772	003306	41 62 45 41 00 00 		SIXBIT/AREA/
   773	003307	55 57 44 45 00 00 		SIXBIT/MODE/
   774	003310	42 57 57 64 00 00 		SIXBIT/BOOT/
   775	003311	44 45 66 51 43 45 		SIXBIT/DEVICE/
   776	003312	43 62 45 41 64 45 		SIXBIT/CREATE/
   777	003313	54 51 63 64 00 00 		SIXBIT/LIST/
   778			000015		SWTLEN=.-SWTBL
   779
   780	003314	402 00 0 00 002657 	GETMOD:	SETZM	S.MOD
   781	003315	260 17 0 00 003207 		GO	GETSIX		;/MODE:
   782	003316	316 00 0 00 006042 		CAMN	0,[SIXBIT/DIAG/]
   783	003317	254 00 0 00 003270 		JRST	GETSW1
   784	003320	316 00 0 00 006043 		CAMN	0,[SIXBIT/SYSTEM/]
   785	003321	254 00 0 00 003270 		JRST	GETSW1
   786	003322	254 00 0 00 005751 		JRST	KEYERR		;NEITHER, ERROR
   787
   788	003323	402 00 0 00 002656 	GETARE:	SETZM	S.ARE
   789	003324	260 17 0 00 003207 		GO	GETSIX		;/AREA:
   790	003325	316 00 0 00 006044 		CAMN	0,[SIXBIT/HIGH/]
   791	003326	254 00 0 00 003270 		JRST	GETSW1
   792	003327	316 00 0 00 006045 		CAMN	0,[SIXBIT/LOW/]
   793	003330	254 00 0 00 003270 		JRST	GETSW1
   794	003331	254 00 0 00 005751 		JRST	KEYERR		;NEITHER, ERROR
   795
   796	003332	260 17 0 00 003207 	GETDEV:	GO	GETSIX		;/DEV:
   797	003333	322 00 0 00 005751 		JUMPE	0,KEYERR	;NO DEVICE GIVEN, ERROR
   798	003334	202 00 0 00 002661 		MOVEM	0,S.DEV		;SAVE SPECIFIED DEVICE
   799	003335	254 00 0 00 003270 		JRST	GETSW1
   800
   801	003336	260 17 0 00 003207 	GETBT1:	GO	GETSIX		;/BOOT:
   802	003337	312 00 0 00 006046 		CAME	0,[SIXBIT/ROM406/]
   803	003340	254 00 0 00 005751 		JRST	KEYERR
   804	003341	476 00 0 00 002635 		SETOM	ROM406		;"ROM406" - WRITE BOOT 0 ALSO AT CYL 406
   805	003342	254 00 0 00 003270 		JRST	GETSW1
   806
   807	003343	260 17 0 00 003207 	GETLST:	GO	GETSIX		;/LIST:
   808	003344	312 00 0 00 006047 		CAME	0,[SIXBIT/SUM/]
   809	003345	254 00 0 00 005751 		JRST	KEYERR
   810	003346	476 00 0 00 002644 		SETOM	DIRSUM		;"SUM" - GIVE DIRECTORY SUM ONLY
   811	003347	254 00 0 00 003270 		JRST	GETSW1
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 21
KLAD10	MAC	15-Jun-79 10:26		INITIALIZATION AND MAIN COMMAND PROCESS                                            SEQ 0039

   812					;*COMMAND CHARACTER INPUT ROUTINE
   813
   814	003350	332 00 0 00 001677 	TTYIN:	SKIPE	$CCLF		;PROCESSING COMMAND FILE ?
   815	003351	254 00 0 00 003036 		JRST	$CCLIN		;YES
   816
   817	003352	051 04 0 00 000013 		INCHWL	C		;GET A CHAR
   818
   819	003353	136 13 0 00 005761 	TTYIN1:	IDPB	C,CMDPTR	;PUT CHAR IN COMMAND BUFFER
   820	003354	322 13 0 00 003350 		JUMPE	C,TTYIN		;FLUSH NULLS
   821	003355	306 13 0 00 000015 		CAIN	C,15
   822	003356	254 00 0 00 003350 		JRST	TTYIN		;FLUSH CR
   823
   824	003357	302 13 0 00 000176 		CAIE	C,176		;CHANGE ALL ALTMODES TO NEW
   825	003360	306 13 0 00 000175 		CAIN	C,175
   826	003361	201 13 0 00 000033 		MOVEI	C,33
   827
   828	003362	301 13 0 00 000141 		CAIL	C,"A"+40
   829	003363	303 13 0 00 000172 		CAILE	C,"Z"+40
   830	003364	254 00 0 00 003366 		JRST	.+2
   831	003365	620 13 0 00 000040 		TRZ	C,40		;CHANGE LOWER TO UPPER CASE
   832	003366	302 13 0 00 000040 		CAIE	C," "
   833	003367	306 13 0 00 000011 		CAIN	C,"	"
   834	003370	254 00 0 00 003350 		JRST	TTYIN		;FLUSH SPACES AND TABS
   835
   836	003371	302 13 0 00 000032 		CAIE	C,32		;IF LINE TEMINATOR
   837	003372	307 13 0 00 000015 		CAIG	C,15
   838	003373	476 00 0 00 002633 		SETOM	EOLSW		;SET END OF LINE SWITCH
   839	003374	306 13 0 00 000033 		CAIN	C,33
   840	003375	476 00 0 00 002633 		SETOM	EOLSW
   841
   842	003376	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 22
KLAD10	MAC	15-Jun-79 10:26		ALLOCATE -11 FILE COMMAND PROCESS                                                  SEQ 0040

   843					SUBTTL	ALLOCATE -11 FILE COMMAND PROCESS
   844
   845	003377	336 00 0 00 000237 	ALO:	SKIPN	DIRSW		;DOES DIRECTORY EXIST ?
   846	003400	254 00 0 00 005665 		JRST	DIRERR		;NO
   847
   848	003401	337 00 0 00 002647 		SKIPG	S.ALO		;ALLOCATION = 0 ?
   849	003402	254 00 0 00 005751 		JRST	KEYERR		;YES, ERROR
   850
   851	003403	336 00 0 00 000001 		SKIPN	ACDEV		;ASSUME "DEV" IF NOT SPECIFIED
   852	003404	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'
   853	003405	202 01 0 00 001702 		MOVEM	ACDEV,O.DEV
   854
   855	003406	202 02 0 00 001703 		MOVEM	ACFILE,O.NAM1	;SETUP FILE NAME
   856
   857	003407	202 03 0 00 001704 		MOVEM	ACEXT,O.EXT	;SETUP FILE EXTENSION
   858
   859	003410	202 06 0 00 001706 		MOVEM	ACPPN,O.PPN	;SETUP PROJ,PROG #
   860
   861	003411	260 17 0 00 003432 		GO	OPNALO		;OPEN FILE, ALLOCATE N BLOCKS
   862	003412	254 00 0 00 005720 		 JRST	ENTERR
   863
   864	003413	070 03 0 00 000004 		CLOSE	WC,CL.DLL	;CLOSE FILE, KEEP ALL BLOCKS
   865
   866	003414	260 17 0 00 005024 		GO	GETBK1		;GET LOGICAL BLOCK # OF FILE
   867
   868	003415	260 17 0 00 004700 		GO	LOGPHY		;CONVERT LOGICAL BLK # TO TRK,SCT,CYL
   869
   870	003416	260 17 0 00 005136 		GO	SRHDIR		;FIND 1ST AVAILABLE DIR BLOCK
   871	003417	254 00 0 00 005726 		 JRST	DIRFUL		;DIRECTORY FULL
   872
   873	003420	260 17 0 00 005170 		GO	DIRETY		;CREATE A DIRECTORY ENTRY
   874
   875	003421	047 01 0 00 000014 		DATE	T1,		;GET TODAY'S DATE
   876	003422	202 01 0 00 001707 		MOVEM	T1,O.DATE
   877	003423	260 17 0 00 005203 		GO	ALNSET		;PUT IN FILE NAME,EXT,DATE
   878
   879	003424	200 11 0 00 002647 		MOVE	A,S.ALO		;GET # OF BLOCKS
   880	003425	221 11 0 00 000400 		IMULI	A,^D256		;CONVERT TO -11 WORDS
   881	003426	137 11 0 00 006050 		DPB	A,[POINT 16,DIR3(T7),35]
   882	003427	242 11 0 00 777760 		LSH	A,-^D16
   883	003430	137 11 0 00 006051 		DPB	A,[POINT 16,DIR3(T7),17]
   884
   885	003431	254 00 0 00 002675 		JRST	SCAN		;DONE
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 23
KLAD10	MAC	15-Jun-79 10:26		ALLOCATE -11 FILE COMMAND PROCESS                                                  SEQ 0041

   886					;*DISK OPEN/ENTER ALLOCATION ROUTINE
   887
   888	003432	200 01 0 00 001702 	OPNALO:	MOVE	T1,O.DEV	;SETUP DEVICE
   889	003433	202 01 0 00 002517 		MOVEM	T1,OPEN10+1
   890
   891	003434	050 03 0 00 002516 		OPEN	WC,OPEN10	;OPEN WRITE CHANNEL
   892	003435	263 17 0 00 000000 		 RTN			;ERROR
   893
   894	003436	200 01 0 00 001703 		MOVE	T1,O.NAM1	;SETUP FILE NAME
   895	003437	202 01 0 00 002523 		MOVEM	T1,LOOK10+.RBNAM
   896
   897	003440	200 01 0 00 001704 		MOVE	T1,O.EXT	;SETUP FILE EXT
   898	003441	202 01 0 00 002524 		MOVEM	T1,LOOK10+.RBEXT
   899
   900	003442	200 01 0 00 001706 		MOVE	T1,O.PPN	;SETUP PROJ,PROG #
   901	003443	336 00 0 00 000001 		SKIPN	T1
   902	003444	200 01 0 00 006052 		MOVE	T1,[6,,11]	;DEFAULT PPN IS 6,11
   903	003445	202 01 0 00 002522 		MOVEM	T1,LOOK10+.RBPPN
   904
   905	003446	201 01 0 00 000577 		MOVEI	T1,577		;SET PROTECTION TO 577
   906	003447	137 01 0 00 006053 		DPB	T1,[POINT 9,LOOK10+.RBPRV,8]
   907
   908	003450	201 01 0 00 000017 		MOVEI	T1,17		;SETUP EXTENDED ENTER
   909	003451	202 01 0 00 002521 		MOVEM	T1,LOOK10
   910
   911	003452	201 01 0 00 060000 		MOVEI	T1,RP.ABC!RP.NFS ;BIT 22 FOR BAD CHECKSUM
   912	003453	202 01 0 00 002540 		MOVEM	T1,E11STS
   913
   914	003454	331 01 0 00 002647 		SKIPL	T1,S.ALO
   915	003455	202 01 0 00 002532 		MOVEM	T1,E11ALC	;SET BLOCKS ALLOCATED
   916
   917	003456	077 03 0 00 002521 		ENTER	WC,LOOK10	;ENTER FILE
   918	003457	263 17 0 00 000000 		 RTN
   919
   920	003460	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 24
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0042

   921					SUBTTL	TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE
   922
   923	003461	336 00 0 00 000237 	TOELVN:	SKIPN	DIRSW		;DOES DIRECTORY EXIST ?
   924	003462	254 00 0 00 005665 		JRST	DIRERR		;NO, ERROR
   925
   926	003463	332 00 0 00 002651 		SKIPE	S.TEN		;/TO10 SW SHOULD NOT BE SET
   927	003464	254 00 0 00 005710 		JRST	ILLSW
   928	003465	336 00 0 00 001713 		SKIPN	I.NAM1		;INPUT FILE SPECIFIED ?
   929	003466	254 00 0 00 005714 		JRST	FLSPER		;NO
   930
   931	003467	336 00 0 00 001703 		SKIPN	O.NAM1		;OUTPUT FILE SPECIFIED ?
   932	003470	254 00 0 00 005714 		JRST	FLSPER		;NO
   933
   934	003471	336 00 0 00 002652 		SKIPN	S.REP		;/REPLACE SWITCH ?
   935	003472	254 00 0 00 003477 		JRST	.+5		;NO
   936	003473	260 17 0 00 005101 		GO	VINPUT		;YES, DOES FILE EXIST IN F-E DIR ?
   937	003474	336 00 0 00 002636 		SKIPN	ALOSW
   938	003475	254 00 0 00 005724 		JRST	NOFL11		;NO, ERROR
   939	003476	402 00 0 07 000000 		SETZM	(T7)		;YES, CLEAR CURRENT ENTRY
   940
   941	003477	260 17 0 00 004113 		GO	SEARCH		;SEARCH EXT FOR "BIN" OR "ASCII"
   942
   943	003500	260 17 0 00 003655 		GO	OPNTEN		;OPEN INPUT FILE
   944	003501	254 00 0 00 005716 		JRST	LUKERR		;FILE NOT FOUND
   945
   946	003502	200 01 0 00 002527 		MOVE	T1,LOOK10+.RBVER ;USE INPUT VERSION AS OUTPUT VERSION
   947	003503	202 01 0 00 001711 		MOVEM	T1,O.VER
   948
   949	003504	201 01 0 00 000577 		MOVEI	T1,577		;SET PROTECTION TO 577
   950	003505	202 01 0 00 001705 		MOVEM	T1,O.PRT
   951
   952	003506	135 01 0 00 006054 		LDB	T1,[POINT 11,LOOK10+.RBPRV,23]
   953	003507	202 01 0 00 001710 		MOVEM	T1,O.TIME	;USE INPUT TIME AND DATE AS OUTPUT
   954
   955	003510	135 01 0 00 006055 		LDB	T1,[POINT 3,LOOK10+.RBEXT,20]
   956	003511	137 01 0 00 006056 		DPB	T1,[POINT 3,O.DATE,23]
   957	003512	135 01 0 00 006057 		LDB	T1,[POINT 12,LOOK10+.RBPRV,35]
   958	003513	137 01 0 00 006060 		DPB	T1,[POINT 12,O.DATE,35]
   959
   960	003514	200 01 0 00 002526 		MOVE	T1,LOOK10+.RBSIZ ;GET FILE SIZE IN WORDS
   961
   962	003515	336 00 0 00 002634 		SKIPN	EXTSW		;ASCII FILE ?
   963	003516	254 00 0 00 003523 		JRST	.+5		;NO, INPUT & OUTPUT SAME SIZE
   964									;ASCII, -11 FILE NEEDS MORE ROOM
   965	003517	221 01 0 00 000005 		IMULI	T1,5		;5=# OF ASCII CHAR IN -10
   966	003520	231 01 0 00 000004 		IDIVI	T1,4		;4=# OF ASCII CHAR IN -11
   967	003521	332 00 0 00 000002 		SKIPE	T2		;SKIP IF REMAINDER = 0
   968	003522	271 01 0 00 000001 		ADDI	T1,1		;ROUND UP OTHERWISE
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 25
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0043

   969	003523	231 01 0 00 000200 		IDIVI	T1,^D128	;DIVIDE BY BLOCK SIZE
   970	003524	332 00 0 00 000002 		SKIPE	T2		;REMAINDER ZERO ?
   971	003525	271 01 0 00 000001 		ADDI	T1,1		;NO, ROUND UP
   972	003526	202 01 0 00 000234 		MOVEM	T1,FILNCB	;SAVE AS FILE # OF CONSEC BLKS
   973	003527	202 01 0 00 002647 		MOVEM	T1,S.ALO	;ALSO AS BLKS TO BE ALLOCATED
   974
   975	003530	260 17 0 00 003705 		GO	ETER10		;ENTER FILE NAME
   976	003531	254 00 0 00 005720 		 JRST	ENTERR		;ERROR
   977
   978	003532	402 00 0 00 002632 		SETZM	EOFSW		;INIT EOF SW
   979	003533	402 00 0 00 002637 		SETZM	HADSW		;INIT HAD BLOCK SW
   980	003534	402 00 0 00 000236 		SETZM	NWORDS		;CLEAR # OF WORDS WRITTEN
   981	003535	476 00 0 00 002640 		SETOM	TRDSW		;SET THIRD CHAR SW
   982	003536	476 00 0 00 002641 		SETOM	FSTSW		;SET 1ST CHAR SW
   983
   984	003537	200 11 0 00 006061 		MOVE	A,[POINT 8,T2,17]
   985	003540	200 12 0 00 006062 		MOVE	B,[POINT 8,T2,9]
   986	003541	200 13 0 00 006063 		MOVE	C,[POINT 8,T2,35]
   987	003542	200 14 0 00 006064 		MOVE	D,[POINT 8,T2,27]
   988
   989	003543	260 17 0 00 003574 	LOOP1:	GO	GET10		;GET A CHARACTER FROM -10
   990
   991	003544	335 00 0 00 002632 		SKIPGE	EOFSW		;HIT EOF?
   992	003545	402 00 0 00 002641 		SETZM	FSTSW		;YES
   993	003546	331 00 0 00 002634 		SKIPL	EXTSW		;NO CONVERSION IF EXTSW=0
   994	003547	254 00 0 00 003563 		JRST	PUTWRD		;NO CONVERSION
   995
   996					;*HERE IF ASCII CONVERSION REQUIRED
   997					;*INPUT ORDER - A,B,C,D    OUTPUT ORDER - B,A,D,C
   998
   999	003550	400 02 0 00 000000 		SETZ	T2,
  1000	003551	137 03 0 00 000011 		DPB	T3,A		;PUT CHAR # 1 INTO WORD
  1001	003552	260 17 0 00 003574 		GO	GET10		;GO GET SECOND CHARACTER
  1002	003553	335 00 0 00 002632 		SKIPGE	EOFSW		;HIT EOF?
  1003	003554	402 00 0 00 002640 		SETZM	TRDSW		;YES, RESET 3RD CHAR SW
  1004	003555	137 03 0 00 000012 		DPB	T3,B		;PUT CHAR # 2 INTO WORD
  1005	003556	260 17 0 00 003574 		GO	GET10		;GO GET CHAR # 3
  1006	003557	137 03 0 00 000013 		DPB	T3,C		;PUT CHAR # 3 INTO WORD
  1007	003560	260 17 0 00 003574 		GO	GET10		;GO GET FOURTH CHARACTER
  1008	003561	137 03 0 00 000014 		DPB	T3,D		;PUT CHAR # 4 IN WORD
  1009	003562	200 03 0 00 000002 		MOVE	T3,T2		;COPY FINISHED WORD
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 26
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0044

  1010					;*HERE TO OUTPUT A CHARACTER
  1011
  1012	003563	260 17 0 00 003646 	PUTWRD:	GO	PUT10		;PUT WORD INTO BUFFER
  1013
  1014	003564	201 01 0 00 000001 		MOVEI	T1,1		;GET # OF -11 WORDS
  1015	003565	332 00 0 00 002640 		SKIPE	TRDSW		;GOT THIRD CHAR?
  1016	003566	201 01 0 00 000002 		MOVEI	T1,2		;YES, SO TWO -11 WD
  1017
  1018	003567	332 00 0 00 002641 		SKIPE	FSTSW		;EOF AT 1ST CHAR?
  1019	003570	272 01 0 00 000236 		ADDM	T1,NWORDS	;ADD TO TOTAL WORD COUNT
  1020	003571	331 00 0 00 002632 		SKIPL	EOFSW		;EOF DETECTED?
  1021	003572	254 00 0 00 003543 		JRST	LOOP1		;NO, GO GET NEXT CHAR
  1022
  1023	003573	254 00 0 00 003616 		JRST	EOF		;YES, GO CLOSE FILE
  1024
  1025					;*GET A CHARACTER FROM -10 FILE
  1026
  1027	003574	332 00 0 00 002632 	GET10:	SKIPE	EOFSW		;HAVE WE HIT EOF YET ?
  1028	003575	254 00 0 00 003602 		JRST	GET10Z		;YES, CLEAR CHARACTER
  1029
  1030	003576	375 00 0 00 002543 	CHKCNT:	SOSGE	TO10IC		;BYTE COUNT=0?
  1031	003577	254 00 0 00 003604 		JRST	IN10		;YES
  1032
  1033	003600	134 03 0 00 002542 		ILDB	T3,TO10IP	;GET BUFFER PTR
  1034	003601	263 17 0 00 000000 		RTN			;RETURN, BUFFER FULL
  1035
  1036	003602	400 03 0 00 000000 	GET10Z:	SETZ	T3,
  1037	003603	263 17 0 00 000000 		RTN
  1038
  1039	003604	056 02 0 00 000000 	IN10:	IN	RC,
  1040	003605	254 00 0 00 003574 		JRST	GET10
  1041
  1042					;*END OF INPUT FILE
  1043
  1044	003606	062 02 0 00 000013 	COMEND:	GETSTS	RC,C		;GET ERROR STATUS
  1045	003607	602 13 0 00 740000 		TRNE	C,74B23		;SEE IF ANY ERRORS
  1046	003610	254 00 0 00 005704 		  JRST	RADERR		;YES, ISSUE READ ERROR
  1047
  1048	003611	606 13 0 00 020000 		TRNN	C,1B22		;SEE IF END OF FILE
  1049	003612	254 04 0 00 003612 		  HALT .		;SHOULD NEVER HAPPEN
  1050
  1051	003613	476 00 0 00 002632 		SETOM	EOFSW		;INDICATE EOF IS DETECTED
  1052	003614	402 00 0 00 000003 		SETZM	T3		;ZERO THE CHARACTER
  1053	003615	263 17 0 00 000000 		RTN			;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 27
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0045

  1054					;*COMPLETE OUTPUT FILE
  1055
  1056	003616	070 02 0 00 000000 	EOF:	CLOSE	RC,		;CLOSE RC CHANNEL
  1057	003617	071 02 0 00 000000 		RELEAS	RC,
  1058	003620	200 01 0 00 002646 		MOVE	T1,JBFFRC
  1059	003621	202 01 0 00 003033*		MOVEM	T1,.JBFF	;RECLAIM BUF SPACE
  1060
  1061	003622	070 03 0 00 000004 		CLOSE	WC,CL.DLL	;CLOSE WC CHANNEL, KEEP ALL BLOCKS
  1062	003623	071 03 0 00 000000 		RELEAS	WC,
  1063
  1064	003624	260 17 0 00 005033 		GO	GETBK2		;GET 1ST BLOCK # FROM -10
  1065	003625	202 01 0 00 000226 		MOVEM	T1,FILLOG	;SAVE IT
  1066
  1067	003626	260 17 0 00 005136 	UPDATE:	GO	SRHDIR			;FIND 1ST AVILABLE ENTRY
  1068	003627	254 00 0 00 005726 		  JRST	DIRFUL			;DIR FILE FULL
  1069
  1070	003630	200 01 0 00 000226 		MOVE	T1,FILLOG		;GET 1ST BLK NO. FOR THIS FILE
  1071	003631	260 17 0 00 004700 		GO	LOGPHY			;CONVERT IT INTO PHY ADDR
  1072
  1073	003632	260 17 0 00 005170 		GO	DIRETY			;ENTER IT INTO DIR FILE
  1074
  1075	003633	260 17 0 00 005203 		GO	ALNSET			;USE OUTPUT FILE
  1076
  1077	003634	200 02 0 00 000234 		MOVE	T2,FILNCB		;GET BLOCK COUNT
  1078	003635	221 02 0 00 000400 		IMULI	T2,^D256		;CONVERT IT INTO -11 WORDS
  1079	003636	137 02 0 00 006050 		DPB	T2,[POINT 16,DIR3(T7),35]
  1080	003637	242 02 0 00 777760 		LSH	T2,-<^D16>		;GET HIGH-ORDER PART
  1081	003640	137 02 0 00 006051 		DPB	T2,[POINT 16,DIR3(T7),17] ;SAVE IT AS WORD ALLOCATED
  1082
  1083	003641	200 02 0 00 000236 	WTDIR4:	MOVE	T2,NWORDS		;GET # OF WORDS WRITTEN
  1084	003642	137 02 0 00 006065 		DPB	T2,[POINT 16,DIR4(T7),35]
  1085	003643	242 02 0 00 777760 		LSH	T2,-<^D16>		;GET HIGH-ORDER PART
  1086	003644	137 02 0 00 006066 		DPB	T2,[POINT 16,DIR4(T7),17] ;SAVE IT AS WORD WRITTEN
  1087
  1088	003645	254 00 0 00 002675 		JRST	SCAN			;DONE
  1089
  1090	003646	377 00 0 00 002571 	PUT10:	SOSG	TO10OC			;DECREMENT BYTE COUNT
  1091	003647	254 00 0 00 003652 		JRST	PUTBUF			;NO MORE ROOM
  1092
  1093	003650	136 03 0 00 002570 	PUTNXT:	IDPB	T3,TO10OP		;PUT WORD IN BUFFER
  1094	003651	263 17 0 00 000000 		RTN
  1095
  1096	003652	057 03 0 00 000000 	PUTBUF:	OUT	WC,			;EMPTY BUFFER
  1097	003653	254 00 0 00 003650 		JRST	PUTNXT
  1098	003654	254 00 0 00 005702 		JRST	WRTERR
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 28
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0046

  1099					;*OPEN DEVICE/LOOKUP ON FILE FROM -10
  1100
  1101	003655	201 01 0 00 002541 	OPNTEN:	MOVEI	T1,HEAD10	;SETUP -10 BUFFER HEADER
  1102	003656	552 01 0 00 002520 		HRRZM	T1,OPEN10+2
  1103
  1104	003657	200 01 0 00 001712 		MOVE	T1,I.DEV	;SETUP DEVICE
  1105	003660	202 01 0 00 002517 		MOVEM	T1,OPEN10+1
  1106
  1107	003661	201 01 0 00 000000 		MOVEI	T1,.IOASC	;ASCII MODE
  1108	003662	336 00 0 00 002634 		SKIPN	EXTSW		;DO CONVERSION ?
  1109	003663	201 01 0 00 000014 		MOVEI	T1,.IOBIN	;NO, GET BINARY MODE
  1110	003664	202 01 0 00 002516 		MOVEM	T1,OPEN10	;PUT MODE IN OPEN BLOCK
  1111
  1112	003665	050 02 0 00 002516 		OPEN	RC,OPEN10	;OPEN READ CHANNEL
  1113	003666	263 17 0 00 000000 		  RTN			;ERROR, RETURN
  1114
  1115	003667	200 01 0 00 003621*		MOVE	T1,.JBFF	;GET RING BUF ADR
  1116	003670	202 01 0 00 002646 		MOVEM	T1,JBFFRC	;SAVE IT
  1117
  1118	003671	064 02 0 00 000024 		INBUF	RC,^D20		;SETUP 20 INPUT BUFFERS
  1119
  1120	003672	200 01 0 00 001713 		MOVE	T1,I.NAM1	;SETUP FILE NAME
  1121	003673	202 01 0 00 002523 		MOVEM	T1,LOOK10+.RBNAM
  1122
  1123	003674	200 01 0 00 001714 		MOVE	T1,I.EXT	;SETUP FILE EXT
  1124	003675	202 01 0 00 002524 		MOVEM	T1,LOOK10+.RBEXT
  1125
  1126	003676	200 01 0 00 001715 		MOVE	T1,I.PPN	;SETUP PROJ,PROG #
  1127	003677	202 01 0 00 002522 		MOVEM	T1,LOOK10+.RBPPN
  1128
  1129	003700	201 01 0 00 000017 		MOVEI	T1,17
  1130	003701	202 01 0 00 002521 		MOVEM	T1,LOOK10
  1131
  1132	003702	076 02 0 00 002521 		LOOKUP	RC,LOOK10	;LOOKUP ON FILE FROM -10
  1133	003703	254 00 0 00 005722 		  JRST	NOFL10		;NO FILE FOUND IN -10 DIR
  1134
  1135	003704	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 29
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0047

  1136					;*ENTER FILE ON CHANNEL WC
  1137
  1138	003705	205 01 0 00 002567 	ETER10:	MOVSI	T1,HEDBLK	;SETUP BUFFER HEADER
  1139	003706	202 01 0 00 002546 		MOVEM	T1,OPNBLK+2
  1140	003707	200 01 0 00 001702 		MOVE	T1,O.DEV	;SETUP DEVICE
  1141	003710	202 01 0 00 002545 		MOVEM	T1,OPNBLK+1
  1142	003711	201 01 0 00 000014 		MOVEI	T1,.IOBIN	;BINARY MODE
  1143	003712	202 01 0 00 002544 		MOVEM	T1,OPNBLK
  1144
  1145	003713	050 03 0 00 002544 		OPEN	WC,OPNBLK	;OPEN WRITE CHANNEL
  1146	003714	263 17 0 00 000000 		 RTN			;ERROR
  1147
  1148	003715	065 03 0 00 000024 		OUTBUF	WC,^D20		;SETUP 20 OUTPUT BUFFERS
  1149
  1150	003716	200 01 0 00 001703 		MOVE	T1,O.NAM1	;SETUP FILE NAME
  1151	003717	202 01 0 00 002551 		MOVEM	T1,ENTBLK+.RBNAM
  1152
  1153	003720	200 01 0 00 001704 		MOVE	T1,O.EXT	;SETUP FILE EXT
  1154	003721	202 01 0 00 002552 		MOVEM	T1,ENTBLK+.RBEXT
  1155
  1156	003722	200 01 0 00 001706 		MOVE	T1,O.PPN	;SETUP PROJ,PROG #
  1157	003723	336 00 0 00 000001 		SKIPN	T1
  1158	003724	200 01 0 00 006052 		MOVE	T1,[6,,11]	;DEFAULT PPN IS 6,11
  1159	003725	202 01 0 00 002550 		MOVEM	T1,ENTBLK+.RBPPN
  1160
  1161	003726	200 01 0 00 001705 		MOVE	T1,O.PRT	;SETUP PROTECTION
  1162	003727	137 01 0 00 006067 		DPB	T1,[POINT 9,ENTBLK+.RBPRV,8]
  1163
  1164	003730	135 01 0 00 006056 		LDB	T1,[POINT 3,O.DATE,23]	;SETUP TIME AND DATE
  1165	003731	137 01 0 00 006070 		DPB	T1,[POINT 3,ENTBLK+.RBEXT,20]
  1166	003732	135 01 0 00 006060 		LDB	T1,[POINT 12,O.DATE,35]
  1167	003733	137 01 0 00 006071 		DPB	T1,[POINT 12,ENTBLK+.RBPRV,35]
  1168	003734	200 01 0 00 001710 		MOVE	T1,O.TIME
  1169	003735	137 01 0 00 006072 		DPB	T1,[POINT 11,ENTBLK+.RBPRV,23]
  1170
  1171	003736	200 01 0 00 001711 		MOVE	T1,O.VER	;SETUP VERSION
  1172	003737	202 01 0 00 002555 		MOVEM	T1,ENTBLK+.RBVER
  1173
  1174	003740	201 01 0 00 000017 		MOVEI	T1,17		;SET # OF WORDS IN EXTENDED ENTER
  1175	003741	202 01 0 00 002547 		MOVEM	T1,ENTBLK
  1176
  1177	003742	201 01 0 00 060000 		MOVEI	T1,RP.ABC!RP.NFS ;BIT 22 FOR BAD CHECKSUM
  1178	003743	202 01 0 00 002566 		MOVEM	T1,E10STS	;TELL MON NOT TO CHECK IT
  1179
  1180	003744	200 01 0 00 002647 		MOVE	T1,S.ALO	;SET BLOCKS ALLOCATED
  1181	003745	202 01 0 00 002560 		MOVEM	T1,E10ALC
  1182
  1183	003746	077 03 0 00 002547 		ENTER	WC,ENTBLK
  1184	003747	263 17 0 00 000000 		  RTN			;ERROR RETURN
  1185
  1186	003750	254 00 0 00 005077 		JRST	CPOPJ1		;GIVE SKIP (GOOD) RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 30
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE TO -11 COMMAND PROCESS ROUTINE                                       SEQ 0048

  1187					;*OPEN DEVICE/ENTER ON FILE FROM -11
  1188
  1189	003751	205 01 0 00 002567 	OPNELN:	MOVSI	T1,HEDBLK	;SETUP BUFFER HEADER
  1190	003752	202 01 0 00 002546 		MOVEM	T1,OPNBLK+2
  1191
  1192	003753	200 01 0 00 001702 		MOVE	T1,O.DEV	;SETUP DEVICE
  1193	003754	202 01 0 00 002545 		MOVEM	T1,OPNBLK+1
  1194
  1195	003755	201 01 0 00 000000 		MOVEI	T1,.IOASC	;SETUP MODE
  1196	003756	336 00 0 00 002634 		SKIPN	EXTSW
  1197	003757	201 01 0 00 000014 		MOVEI	T1,.IOBIN
  1198	003760	202 01 0 00 002544 		MOVEM	T1,OPNBLK
  1199
  1200	003761	050 03 0 00 002544 		OPEN	WC,OPNBLK	;OPEN WRITE CHANNEL
  1201
  1202	003762	200 01 0 00 003667*		MOVE	T1,.JBFF	;SAVE FIRST FREE
  1203	003763	202 01 0 00 002645 		MOVEM	T1,JBFFWC
  1204
  1205	003764	065 03 0 00 000012 		OUTBUF	WC,^D10		;SETUP TEN OUTPUT BUFFERS
  1206
  1207	003765	200 01 0 00 001703 		MOVE	T1,O.NAM1	;SETUP FILE NAME
  1208	003766	202 01 0 00 002547 		MOVEM	T1,ENTBLK
  1209
  1210	003767	200 01 0 00 001704 		MOVE	T1,O.EXT	;SETUP FILE EXT
  1211	003770	202 01 0 00 002550 		MOVEM	T1,ENTBLK+1
  1212
  1213	003771	402 00 0 00 002551 		SETZM	ENTBLK+2
  1214
  1215	003772	200 01 0 00 001706 		MOVE	T1,O.PPN	;SETUP OUTPUT PROJ,PROG #
  1216	003773	202 01 0 00 002552 		MOVEM	T1,ENTBLK+3
  1217
  1218	003774	077 03 0 00 002547 		ENTER	WC,ENTBLK	;ENTER FILE INTO SYSTEM
  1219	003775	263 17 0 00 000000 		 RTN			;ERROR
  1220
  1221	003776	254 00 0 00 005077 		JRST	CPOPJ1		;SKIP RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 31
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE                                  SEQ 0049

  1222					SUBTTL	TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE
  1223					;	=================================================
  1224
  1225	003777	336 00 0 00 000237 	TOTEN:	SKIPN	DIRSW		;CHECK IF DIR. EXISTS
  1226	004000	254 00 0 00 005665 		  JRST	DIRERR		;-11 DIR DOES NOT EXIST
  1227
  1228	004001	332 00 0 00 002650 		SKIPE	S.ELN		;TEST /TO11 SWITCH
  1229	004002	254 00 0 00 005710 		  JRST	ILLSW		;ILLEGAL COMBINATION
  1230
  1231	004003	336 00 0 00 001713 		SKIPN	I.NAM1		;INPUT NAME SPECIFIED?
  1232	004004	254 00 0 00 005714 		  JRST	FLSPER		;ERROR
  1233
  1234	004005	336 00 0 00 001703 		SKIPN	O.NAM1		;OUTPUT NAME SPECIFIED ?
  1235	004006	254 00 0 00 005714 		 JRST	FLSPER		;ERROR
  1236
  1237	004007	336 01 0 00 001706 		SKIPN	T1,O.PPN
  1238	004010	254 00 0 00 005753 		 JRST	MSGERR
  1239	004011	316 01 0 00 006052 		CAMN	T1,[6,,11]
  1240	004012	254 00 0 00 005753 		 JRST	MSGERR		;CAN'T WRITE /TO10 INTO 6,11
  1241
  1242					;*HERE TO FIND -11 FILE IN FRONT-END DIRECTORY
  1243
  1244	004013	402 00 0 00 002632 		SETZM	EOFSW		;INIT EOF SW
  1245	004014	402 00 0 00 002637 		SETZM	HADSW		;INIT HAD SW
  1246	004015	402 00 0 00 002631 		SETZM	DONESW
  1247	004016	402 00 0 00 000226 		SETZM	FILLOG		;INIT FIL LOG ADR PTR
  1248
  1249	004017	260 17 0 00 005101 		GO	VINPUT		;VERIFY INPUT FILESPEC
  1250
  1251	004020	336 00 0 00 002636 		SKIPN	ALOSW		;SKIP IF FILE NAME FOUND
  1252	004021	254 00 0 00 005724 		  JRST	NOFL11		;NO FILE IN -11 DIR
  1253
  1254	004022	260 17 0 00 005016 		GO	OPRCDP		;OPEN RC DUMP MODE
  1255	004023	254 00 0 00 005712 		  JRST	OPNERR		;OPEN FAIL
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 32
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE                                  SEQ 0050

  1256	004024	260 17 0 00 004113 		GO	SEARCH		;YES, DO CONVERSION IF NEEDED
  1257
  1258	004025	260 17 0 00 003751 		GO	OPNELN		;OPEN/ENTER FILE TO -10
  1259	004026	254 00 0 00 005720 		  JRST	ENTERR		;OPEN/ENTER FAIL
  1260
  1261	004027	201 14 0 00 000200 		MOVEI	D,200		;INIT WORD COUNT
  1262	004030	201 16 0 00 002116 		MOVEI	T16,DATBUF	;INIT BUF ADDR
  1263	004031	200 12 0 00 000234 		MOVE	B,FILNCB	;GET # OF -11 WORDS
  1264	004032	200 11 0 00 000226 		MOVE	A,FILLOG	;GET 1ST LOGICAL BLOCK # FOR THE FILE
  1265	004033	370 00 0 00 000011 		SOS	A
  1266
  1267	004034	335 00 0 00 002631 	LOOP2:	SKIPGE	DONESW
  1268	004035	254 00 0 00 004104 		JRST	DONE		;GO CLOSE FILE
  1269
  1270	004036	260 17 0 00 004053 		GO	GET11		;GET A CHAR FROM -11 FILE
  1271
  1272	004037	336 00 0 00 002634 		SKIPN	EXTSW		;NO CONVERSION IF EXTSW=0
  1273	004040	254 00 0 00 004051 		JRST	DOPUT		;NO CONVERSION
  1274
  1275					;*HERE CONVERT FROM 8-BIT TO 7-BIT ASCII
  1276
  1277	004041	200 02 0 00 000003 		MOVE	T2,T3		;COPY THE FOUR CHARACTERS
  1278	004042	135 03 0 00 006061 		LDB	T3,[POINT 8,T2,17];CONVERT CHAR #A
  1279
  1280	004043	260 17 0 00 003646 		GO	PUT10
  1281
  1282	004044	135 03 0 00 006062 		LDB	T3,[POINT 8,T2,9];CONVERT CHAR #B
  1283
  1284	004045	260 17 0 00 003646 		GO	PUT10
  1285
  1286	004046	135 03 0 00 006063 		LDB	T3,[POINT 8,T2,35];CONVERT CHAR #C
  1287
  1288	004047	260 17 0 00 003646 		GO	PUT10
  1289
  1290	004050	135 03 0 00 006064 		LDB	T3,[POINT 8,T2,27];CONVERT CHAR #D
  1291
  1292	004051	260 17 0 00 003646 	DOPUT:	GO	PUT10
  1293	004052	254 00 0 00 004034 		JRST	LOOP2		;GET NEXT WORD
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 33
KLAD10	MAC	15-Jun-79 10:26		TRANSFER FILE BACK TO -10 COMMAND PROCESS ROUTINE                                  SEQ 0051

  1294					;*GET A 36-BIT WORD FROM -11 FILE
  1295
  1296	004053	301 14 0 00 000200 	GET11:	CAIL	D,200		;DATA LEFT IN BUFFER ?
  1297	004054	254 00 0 00 004064 		JRST	IN11		;NO, GET NEXT ONE
  1298
  1299	004055	200 03 0 16 000000 		MOVE	T3,(T16)	;GET ONE BYTE
  1300	004056	271 16 0 00 000001 		ADDI	T16,1		;UPDATE BUF ADR POINTER
  1301	004057	271 14 0 00 000001 		ADDI	D,1		;ADD 1 TO COUNTER
  1302	004060	275 12 0 00 000002 		SUBI	B,2		;DECREMENT -11 WORDS READ
  1303	004061	327 12 0 00 004063 		JUMPG	B,GOBACK	;IF MORE LEFT, RETURN
  1304
  1305	004062	476 00 0 00 002631 		SETOM	DONESW		;NONE LEFT, SET DONE SWITCH
  1306
  1307	004063	263 17 0 00 000000 	GOBACK:	RTN			;RETURN
  1308
  1309	004064	271 11 0 00 000001 	IN11:	ADDI	A,1		;READ NEXT BLK
  1310	004065	200 03 0 00 000011 		MOVE	T3,A		;GET BLK ADDR FROM A
  1311	004066	402 00 0 00 000001 		SETZM	T1		;ZERO T1
  1312	004067	301 03 0 00 455250 		CAIL	T3,LOGBLK	;READING FROM HI CYLINDER?
  1313	004070	200 01 0 00 001675 		MOVE	T1,MNTBIT	;YES, MAINT CYL IF NEEDED
  1314	004071	201 02 0 00 000002 		MOVEI	T2,RC		;GET CHANNEL
  1315	004072	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)];PUT CHANNEL IN ARG REG.
  1316	004073	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)];PUT BLK NO. IN ARG REG
  1317
  1318	004074	047 01 0 00 000146 		SUSET.	T1,
  1319	004075	254 00 0 00 005661 		  JRST	SUPERR		;ABORT DUE TO ERROR
  1320
  1321	004076	056 02 0 00 000144 		IN	RC,DATLST	;INPUT 1 BUFFER
  1322	004077	254 00 0 00 004101 		JRST	DO11
  1323	004100	254 00 0 00 003606 		 JRST	COMEND		;CHECK IF EOF IS ENCOUNTERED
  1324
  1325	004101	402 00 0 00 000014 	DO11:	SETZM	D		;ZERO D
  1326	004102	201 16 0 00 002116 		MOVEI	T16,DATBUF	;RE-INITIALIZE BUFFER POINTER
  1327	004103	254 00 0 00 004053 		JRST	GET11
  1328
  1329	004104	070 02 0 00 000000 	DONE:	CLOSE	RC,
  1330	004105	071 02 0 00 000000 		RELEAS	RC,
  1331	004106	070 03 0 00 000000 		CLOSE	WC,
  1332	004107	071 03 0 00 000000 		RELEAS	WC,
  1333	004110	200 01 0 00 002645 		MOVE	T1,JBFFWC
  1334	004111	202 01 0 00 003762*		MOVEM	T1,.JBFF	;RECLAIM BUF SPACE
  1335	004112	254 00 0 00 002675 		JRST	SCAN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 34
KLAD10	MAC	15-Jun-79 10:26		ASCII AND BINARY FILE TYPE CHECK ROUTINE                                           SEQ 0052

  1336					SUBTTL	ASCII AND BINARY FILE TYPE CHECK ROUTINE
  1337					;	========================================
  1338
  1339	004113	332 00 0 00 002654 	SEARCH:	SKIPE	S.BIN		;/BINARY SW SET?
  1340	004114	254 00 0 00 004131 		JRST	OFF		;YES
  1341
  1342	004115	332 00 0 00 002655 		SKIPE	S.ASC		;/ASCII SW SET?
  1343	004116	254 00 0 00 004125 		JRST	ON		;YES
  1344
  1345	004117	402 00 0 00 002634 		SETZM	EXTSW		;INIT EXT SW
  1346	004120	510 01 0 00 001714 		HLLZ	T1,I.EXT	;GET COPY OF .EXT
  1347	004121	205 02 0 00 777762 		MOVSI	T2,-EXTLEN	;POINT TO FILEXT TABLE
  1348
  1349	004122	312 01 0 02 004135 	LOOP:	CAME	T1,FILEXT(T2)	;SEE IF CORRECT EXT
  1350	004123	253 02 0 00 004122 		AOBJN	T2,LOOP		;LOOP TO MATCH
  1351
  1352	004124	321 02 0 00 004130 		JUMPL	T2,FOUND	;EXT MATCHED
  1353
  1354	004125	476 00 0 00 002634 	ON:	SETOM	EXTSW		;TURN ON SW
  1355	004126	332 00 0 00 002654 		SKIPE	S.BIN		;/BINARY SW ALSO SET?
  1356	004127	254 00 0 00 005710 		  JRST	ILLSW		;YES, IT IS AN ERROR
  1357
  1358	004130	263 17 0 00 000000 	FOUND:	RTN			;RETURN
  1359
  1360	004131	402 00 0 00 002634 	OFF:	SETZM	EXTSW		;TURN OFF SW
  1361	004132	332 00 0 00 002655 		SKIPE	S.ASC		;/ASCII SW ALSO SET?
  1362	004133	254 00 0 00 005710 		  JRST	ILLSW		;YES, ERROR
  1363
  1364	004134	263 17 0 00 000000 		RTN			;RETURN
  1365
  1366					;*TABLE OF NON-ASCII EXTENSIONS
  1367					; ----- -- --------- ----------
  1368
  1369	004135	41 42 63 00 00 00 	FILEXT:	SIXBIT	/ABS/
  1370	004136	42 51 56 00 00 00 		SIXBIT	/BIN/
  1371	004137	42 51 43 00 00 00 		SIXBIT	/BIC/
  1372	004140	43 51 54 00 00 00 		SIXBIT	/CIL/
  1373	004141	54 42 57 00 00 00 		SIXBIT	/LBO/
  1374	004142	54 44 41 00 00 00 		SIXBIT	/LDA/
  1375	004143	54 44 62 00 00 00 		SIXBIT	/LDR/
  1376	004144	54 57 44 00 00 00 		SIXBIT	/LOD/
  1377	004145	55 46 44 00 00 00 		SIXBIT	/MFD/
  1378	004146	57 42 52 00 00 00 		SIXBIT	/OBJ/
  1379	004147	63 41 66 00 00 00 		SIXBIT	/SAV/
  1380	004150	63 71 55 00 00 00 		SIXBIT	/SYM/
  1381	004151	63 71 63 00 00 00 		SIXBIT	/SYS/
  1382	004152	65 46 44 00 00 00 		SIXBIT	/UFD/
  1383			000016		EXTLEN=.-FILEXT
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 35
KLAD10	MAC	15-Jun-79 10:26		DELETE -11 FILE COMMAND PROCESS ROUTINE                                            SEQ 0053

  1384					SUBTTL	DELETE -11 FILE COMMAND PROCESS ROUTINE
  1385					;	=======================================
  1386
  1387	004153	336 00 0 00 000237 	DELETE:	SKIPN	DIRSW		;DOES DIRECTORY EXIST ?
  1388	004154	254 00 0 00 005665 		JRST	DIRERR		;NO
  1389
  1390	004155	336 00 0 00 000001 		SKIPN	ACDEV
  1391	004156	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'
  1392	004157	202 01 0 00 001712 		MOVEM	ACDEV,I.DEV	;SETUP DEVICE
  1393
  1394	004160	202 02 0 00 001713 		MOVEM	ACFILE,I.NAM1	;SETUP NAME
  1395	004161	202 03 0 00 001714 		MOVEM	ACEXT,I.EXT	;SETUP EXT
  1396
  1397	004162	200 06 0 00 006075 		MOVE	ACPPN,[6,11]
  1398	004163	202 06 0 00 001715 		MOVEM	ACPPN,I.PPN	;SETUP 6,11 AREA
  1399
  1400	004164	260 17 0 00 005101 		GO	VINPUT		;DOES FILE EXIST IN F-E DIRECTORY ?
  1401	004165	336 00 0 00 002636 		SKIPN	ALOSW
  1402	004166	254 00 0 00 005724 		JRST	NOFL11		;NO
  1403	004167	402 00 0 07 000000 		SETZM	(T7)		;YES, CLEAR ENTRY, DELETE FILE
  1404
  1405	004170	260 17 0 00 003655 		GO	OPNTEN		;FIND FILE IN 6,11 AREA
  1406	004171	254 00 0 00 005716 		JRST	LUKERR		;NOT FOUND
  1407
  1408	004172	070 02 0 00 000000 		CLOSE	RC,
  1409
  1410	004173	055 02 0 00 004201 		RENAME	RC,DELNAM	;DELETE FILE OUT OF EXISTANCE
  1411	004174	254 00 0 00 005706 		JRST	DELERR		;ERROR
  1412
  1413	004175	071 02 0 00 000000 		RELEAS	RC,
  1414
  1415	004176	200 01 0 00 002646 		MOVE	T1,JBFFRC
  1416	004177	202 01 0 00 004111*		MOVEM	T1,.JBFF
  1417
  1418	004200	254 00 0 00 002675 		JRST	SCAN
  1419
  1420	004201	000000	000000		DELNAM:	0
  1421	004202	000000	000000			0
  1422	004203	000000	000000			0
  1423	004204	000000	000000			0
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 36
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0054

  1424					SUBTTL	KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE
  1425					;	==============================================
  1426
  1427			000005		FB=T5
  1428			000006		BC=T6
  1429			000007		BYTE=T7
  1430
  1431	004205	336 00 0 00 000237 	BOOT1:	SKIPN	DIRSW		;DOES DIRECTORY EXIST ?
  1432	004206	254 00 0 00 005665 		 JRST	DIRERR		;NO
  1433
  1434	004207	336 00 0 00 000001 		SKIPN	ACDEV
  1435	004210	205 01 0 00 444566 		MOVSI	ACDEV,'DEV'	;SETUP DEVICE
  1436	004211	202 01 0 00 001712 		MOVEM	ACDEV,I.DEV
  1437
  1438	004212	312 02 0 00 006076 		CAME	ACFILE,[SIXBIT/KLADBT/]
  1439	004213	254 00 0 00 004534 		JRST	WRNGBT		;WRONG BOOT FILE
  1440	004214	202 02 0 00 001713 		MOVEM	ACFILE,I.NAM1	;SETUP FILE NAME
  1441
  1442	004215	202 03 0 00 001714 		MOVEM	ACEXT,I.EXT	;SETUP FILE EXT
  1443
  1444	004216	202 06 0 00 001715 		MOVEM	ACPPN,I.PPN	;SETUP PROJ,PROG #
  1445
  1446	004217	402 00 0 00 002634 		SETZM	EXTSW		;BINARY MODE
  1447
  1448	004220	260 17 0 00 003655 		GO	OPNTEN		;LOOKUP BOOT FILE
  1449	004221	254 00 0 00 005716 		 JRST	LUKERR		;FILE NOT FOUND
  1450
  1451	004222	260 17 0 00 004233 		GO	BOOTLD		;LOAD BOOT INTO CORE IMAGE
  1452
  1453	004223	260 17 0 00 004346 		GO 	BOOTWT		;WRITE BLKS 1-3 INTO BOOT FILE
  1454
  1455	004224	260 17 0 00 004374 		GO	BOOTW0		;WRITE BLK 0 INTO KLAD BLOCK 0
  1456
  1457	004225	201 00 0 00 000001 		MOVEI	1		;ALLOCATE 1 BLOCK FOR "RSXBT.ZRO"
  1458	004226	202 00 0 00 002647 		MOVEM	S.ALO
  1459
  1460	004227	200 02 0 00 006077 		MOVE	ACFILE,[SIXBIT/RSXBT/]
  1461	004230	200 03 0 00 006100 		MOVE	ACEXT,[SIXBIT/ZRO/]
  1462
  1463	004231	403 01 0 00 000006 		SETZB	ACDEV,ACPPN
  1464
  1465	004232	254 00 0 00 003377 		JRST	ALO		;ALLOCATE, THEN RETURN TO SCAN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 37
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0055

  1466					;*BOOT BINARY LOAD ROUTINE
  1467
  1468	004233	402 00 0 00 000675 	BOOTLD:	SETZM	B11STR		;CLEAR BOOT CORE IMAGE STORAGE
  1469	004234	200 01 0 00 006101 		MOVE	T1,[B11STR,,B11STR+1]
  1470	004235	251 01 0 00 001674 		BLT	T1,B11STR+777
  1471
  1472	004236	402 00 0 00 002632 		SETZM	EOFSW
  1473	004237	476 00 0 00 000005 		SETOM	FB
  1474	004240	260 17 0 00 004325 	B11LP:	GO	G11BYT		;GET 8 BIT -11 BYTE
  1475	004241	254 00 0 00 004514 		JRST	EOFERR		;ILLEGAL EOF
  1476
  1477	004242	322 07 0 00 004240 		JUMPE	BYTE,B11LP	;DISCARD NULLS
  1478	004243	306 07 0 00 000377 		CAIN	BYTE,377
  1479	004244	254 00 0 00 004240 		JRST	B11LP		;DISCARD DELETES
  1480
  1481	004245	302 07 0 00 000001 		CAIE	BYTE,1		;VERIFY CONSTANT 1
  1482	004246	254 00 0 00 004516 		JRST	C1ERR		;JUNK, MAYBE NOT A BIN FILE
  1483
  1484	004247	202 07 0 00 005756 		MOVEM	BYTE,B11SUM#	;INIT CHECKSUM
  1485
  1486	004250	260 17 0 00 004325 		GO	G11BYT		;VERIFY CONSTANT 0
  1487	004251	254 00 0 00 004514 		JRST	EOFERR
  1488	004252	332 00 0 00 000007 		SKIPE	BYTE
  1489	004253	254 00 0 00 004520 		JRST	C0ERR		;JUNK
  1490
  1491	004254	260 17 0 00 004314 		GO	G11WD		;GET BYTE COUNT
  1492	004255	322 01 0 00 004530 		JUMPE	T1,ZBCNT	;ZERO BYTE COUNT ?
  1493
  1494	004256	201 06 0 01 777772 	B11LPA:	MOVEI	BC,-6(T1)	;GET DATA BYTE COUNT
  1495	004257	321 06 0 00 004522 		JUMPL	BC,LT6ERR	;LESS THAN 6 ?
  1496
  1497	004260	260 17 0 00 004314 		GO	G11WD		;GET LOAD ADDRESS
  1498	004261	202 01 0 00 005755 		MOVEM	T1,ADR11#
  1499	004262	322 06 0 00 005100 		JUMPE	BC,CPOPJ	;BC=6='S -11 START BLOCK
  1500
  1501	004263	200 16 0 00 005755 		MOVE	T16,ADR11	;SETUP BOOT CORE IMAGE
  1502	004264	242 16 0 00 777776 		LSH	T16,-2		;STORE ADDRESS
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 38
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0056

  1503					;*GET -11 DATA WORDS
  1504
  1505	004265	303 16 0 00 000777 	B11DATA:CAILE	T16,777		;EXCEEDED CORE IMAGE SIZE ?
  1506	004266	254 00 0 00 004512 		JRST	TOOBIG		;YES, BOOT FILE TOO BIG
  1507
  1508	004267	260 17 0 00 004325 		GO	G11BYT		;GET -11 BYTE
  1509	004270	254 00 0 00 004514 		JRST	EOFERR
  1510
  1511	004271	200 02 0 00 005755 		MOVE	T2,ADR11	;GET -11 ADDRESS
  1512	004272	405 02 0 00 000003 		ANDI	T2,3		;TWO LO BITS INDICATE POSITION
  1513	004273	137 07 0 02 004302 		DPB	BYTE,B11PNT(T2)	;TO STORE IN -10 WORD
  1514
  1515	004274	306 02 0 00 000003 		CAIN	T2,3		;DONE 4 BYTES TO -10 ?
  1516	004275	350 00 0 00 000016 		AOS	T16		;YES, ADVANCE TO NEXT -10 WORD
  1517	004276	350 00 0 00 005755 		AOS	ADR11		;ADVANCE -11 ADDRESS
  1518	004277	367 06 0 00 004265 		SOJG	BC,B11DATA	;LOOP TILL -11 BLOCK DONE
  1519
  1520	004300	260 17 0 00 004306 		GO	CK11SUM		;VERIFY CHECKSUM
  1521
  1522	004301	254 00 0 00 004240 		JRST	B11LP		;GET NEXT BLOCK
  1523
  1524	004302	22 10 0 16 000675 	B11PNT:	POINT	8,B11STR(T16),17
  1525	004303	32 10 0 16 000675 		POINT	8,B11STR(T16),9
  1526	004304	00 10 0 16 000675 		POINT	8,B11STR(T16),35
  1527	004305	10 10 0 16 000675 		POINT	8,B11STR(T16),27
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 39
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0057

  1528	004306	260 17 0 00 004325 	CK11SUM:GO	G11BYT		;GET CHECKSUM BYTE
  1529	004307	254 00 0 00 004514 		JRST	EOFERR
  1530
  1531	004310	200 01 0 00 005756 		MOVE	T1,B11SUM	;VERIFY CHECKSUM RESULT
  1532	004311	606 01 0 00 000377 		TRNN	T1,377		;SHOULD BE 8 BITS OF 0
  1533	004312	263 17 0 00 000000 		RTN
  1534	004313	254 00 0 00 004524 		JRST	CKSERR		;CHECKSUM ERROR
  1535
  1536	004314	260 17 0 00 004325 	G11WD:	GO	G11BYT		;GET RH BYTE
  1537	004315	254 00 0 00 004514 		JRST	EOFERR
  1538	004316	202 07 0 00 005757 		MOVEM	BYTE,BYTESV#
  1539
  1540	004317	260 17 0 00 004325 		GO	G11BYT		;GET LH BYTE
  1541	004320	254 00 0 00 004514 		JRST	EOFERR
  1542
  1543	004321	200 01 0 00 000007 		MOVE	T1,BYTE
  1544	004322	242 01 0 00 000010 		LSH	T1,8		;POSITION LH BYTE
  1545	004323	434 01 0 00 005757 		IOR	T1,BYTESV	;INCLUDE RH BYTE
  1546	004324	263 17 0 00 000000 		RTN
  1547
  1548	004325	350 00 0 00 000005 	G11BYT:	AOS	FB		;ADVANCE FILE BYTE
  1549	004326	405 05 0 00 000003 		ANDI	FB,3		;(MOD 4)
  1550	004327	326 05 0 00 004337 		JUMPN	FB,G11BY2	;IF NOT NEW WORD, JUST FETCH BYTE
  1551	004330	260 17 0 00 003574 		GO	GET10		;GET NEXT 36 BIT WORD
  1552	004331	332 00 0 00 002632 		SKIPE	EOFSW		;END OF FILE ?
  1553	004332	263 17 0 00 000000 		RTN			;YES
  1554
  1555	004333	202 03 0 00 005760 	G11BY1:	MOVEM	T3,CHRSAV#
  1556	004334	607 03 0 00 600000 		TLNN	T3,(6B2)	;TEST FOR JUNK IN EITHER HALF
  1557	004335	602 03 0 00 600000 		TRNE	T3,6B20
  1558	004336	254 00 0 00 004526 		JRST	JNKERR
  1559
  1560	004337	135 07 0 05 004342 	G11BY2:	LDB	BYTE,PTRTAB(FB)	;GET PROPER 8 BIT BYTE
  1561	004340	272 07 0 00 005756 		ADDM	BYTE,B11SUM	;ADD TO CHECKSUM
  1562	004341	254 00 0 00 005077 		JRST	CPOPJ1		;SKIP RETURN
  1563
  1564	004342	22 10 0 00 005760 	PTRTAB:	POINT	8,CHRSAV,17	;8 BIT BYTE PICKUP POINTERS
  1565	004343	32 10 0 00 005760 		POINT	8,CHRSAV,9
  1566	004344	00 10 0 00 005760 		POINT	8,CHRSAV,35
  1567	004345	10 10 0 00 005760 		POINT	8,CHRSAV,27
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 40
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0058

  1568					;*WRITE OUT SECONDARY BOOTSTRAP, BLOCKS 1-3
  1569
  1570	004346	205 01 0 00 444566 	BOOTWT:	MOVSI	T1,'DEV'	;SETUP DEVICE
  1571	004347	202 01 0 00 001702 		MOVEM	T1,O.DEV
  1572
  1573	004350	200 01 0 00 001713 		MOVE	T1,I.NAM1	;SETUP FILE NAME
  1574	004351	202 01 0 00 001703 		MOVEM	T1,O.NAM1
  1575
  1576	004352	200 01 0 00 006102 		MOVE	T1,[SIXBIT/RIM/]
  1577	004353	202 01 0 00 001704 		MOVEM	T1,O.EXT	;SETUP FILE EXT
  1578
  1579	004354	402 00 0 00 001706 		SETZM	O.PPN		;CLEAR PPN
  1580
  1581	004355	201 01 0 00 000577 		MOVEI	T1,577		;SET PROTECTION 577
  1582	004356	202 01 0 00 001705 		MOVEM	T1,O.PRT
  1583
  1584	004357	201 01 0 00 000003 		MOVEI	T1,3		;ALLOCATE 3 BLOCKS
  1585	004360	202 01 0 00 002647 		MOVEM	T1,S.ALO
  1586
  1587	004361	260 17 0 00 003705 		GO	ETER10		;ENTER FILE
  1588	004362	254 00 0 00 004532 		 JRST	EBOTER
  1589
  1590	004363	201 16 0 00 000600 		MOVEI	T16,^D128*3	;SETUP FOR OUTPUT
  1591	004364	201 07 0 00 001075 		MOVEI	T7,B11STR+^D128	;BLOCKS 1-3
  1592
  1593	004365	200 03 0 07 000000 		MOVE	T3,(T7)		;PUT BOOT CORE IMAGE INTO FILE
  1594	004366	260 17 0 00 003646 		GO	PUT10
  1595	004367	271 07 0 00 000001 		ADDI	T7,1
  1596	004370	367 16 0 00 004365 		SOJG	T16,.-3
  1597
  1598	004371	070 03 0 00 000004 		CLOSE	WC,CL.DLL	;CLOSE WRITE CHANNEL
  1599	004372	071 03 0 00 000000 		RELEAS	WC,
  1600
  1601	004373	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 41
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0059

  1602					;*WRITE BOOT BLOCK 0 ONTO DISK BLOCK 0
  1603
  1604	004374	260 17 0 00 005033 	BOOTW0:	GO	GETBK2		;GET DISK ADDRESS OF BLOCKS 1-3
  1605
  1606	004375	260 17 0 00 004700 		GO	LOGPHY		;AND INSERT INTO BOOT BLOCK 0
  1607	004376	402 00 0 00 000711 		SETZM	B11STR+14	;AT -11 WD 60 & 62
  1608
  1609	004377	200 03 0 00 000231 		MOVE	T3,CYLADD
  1610	004400	137 03 0 00 006103 		DPB	T3,[POINT 10,B11STR+14,17]
  1611
  1612	004401	200 03 0 00 000232 		MOVE	T3,TRKADD
  1613	004402	137 03 0 00 006104 		DPB	T3,[POINT 5,B11STR+14,27]
  1614
  1615	004403	200 03 0 00 000233 		MOVE	T3,SCTADD
  1616	004404	137 03 0 00 006105 		DPB	T3,[POINT 5,B11STR+14,35]
  1617
  1618	004405	205 01 0 00 200000 		MOVSI	T1,SU.SOT
  1619	004406	201 02 0 00 000005 		MOVEI	T2,HOM
  1620	004407	201 03 0 00 000000 		MOVEI	T3,0
  1621	004410	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)]
  1622	004411	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)]
  1623
  1624	004412	047 01 0 00 000146 		SUSET.	T1,		;SELECT DISK BLOCK 0
  1625	004413	254 00 0 00 005661 		 JRST	SUPERR
  1626
  1627	004414	057 05 0 00 000150 		OUT	HOM,BOTLST	;WRITE BOOT BLOCK 0
  1628	004415	254 00 0 00 004417 		JRST	.+2
  1629	004416	254 00 0 00 005702 		JRST	WRTERR
  1630
  1631	004417	260 17 0 00 004436 		GO	BOOTZRO		;WRITE BOOT BLK 0 INTO "KLADBT.ZRO"
  1632
  1633	004420	336 00 0 00 002635 		SKIPN	ROM406		;ALSO WRITE BOOT 0 AT CYL 406 ?
  1634	004421	263 17 0 00 000000 		RTN			;NO
  1635
  1636	004422	205 01 0 00 200000 		MOVSI	T1,SU.SOT	;YES, ALSO WRITE BOOT BLOCK 0
  1637	004423	434 01 0 00 001675 		OR	T1,MNTBIT	;AT CYLINDER 406 BLOCK #0
  1638	004424	201 02 0 00 000005 		MOVEI	T2,HOM
  1639	004425	201 03 0 00 455250 		MOVEI	T3,LOGBLK
  1640	004426	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)]
  1641	004427	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)]
  1642
  1643	004430	047 01 0 00 000146 		SUSET.	T1,		;SELECT DISK CYLINDER 406 BLOCK 0
  1644	004431	254 00 0 00 005661 		 JRST	SUPERR
  1645
  1646	004432	057 05 0 00 000150 		OUT	HOM,BOTLST	;WRITE BOOT BLOCK 0 AGAIN
  1647	004433	254 00 0 00 004435 		JRST	.+2
  1648	004434	254 00 0 00 005702 		JRST	WRTERR
  1649	004435	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 42
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0060

  1650					;*WRITE BOOT BLOCK 0 INTO "KLADBT.ZRO"
  1651
  1652	004436	205 01 0 00 444566 	BOOTZRO:MOVSI	T1,'DEV'
  1653	004437	202 01 0 00 001702 		MOVEM	T1,O.DEV	;SETUP DEVICE
  1654
  1655	004440	200 01 0 00 006076 		MOVE	T1,[SIXBIT/KLADBT/]
  1656	004441	202 01 0 00 001703 		MOVEM	T1,O.NAM1	;SETUP NAME.EXT
  1657
  1658	004442	200 01 0 00 006100 		MOVE	T1,[SIXBIT/ZRO/]
  1659	004443	202 01 0 00 001704 		MOVEM	T1,O.EXT
  1660
  1661	004444	402 00 0 00 001706 		SETZM	O.PPN
  1662
  1663	004445	201 01 0 00 000577 		MOVEI	T1,577
  1664	004446	202 01 0 00 001705 		MOVEM	T1,O.PRT	;SET PROTECTION
  1665
  1666	004447	135 01 0 00 006054 		LDB	T1,[POINT 11,LOOK10+.RBPRV,23]
  1667	004450	202 01 0 00 001710 		MOVEM	T1,O.TIME
  1668
  1669	004451	135 01 0 00 006055 		LDB	T1,[POINT 3,LOOK10+.RBEXT,20]
  1670	004452	137 01 0 00 006056 		DPB	T1,[POINT 3,O.DATE,23]
  1671	004453	135 01 0 00 006057 		LDB	T1,[POINT 12,LOOK10+.RBPRV,35]
  1672	004454	137 01 0 00 006060 		DPB	T1,[POINT 12,O.DATE,35]
  1673
  1674	004455	201 01 0 00 000001 		MOVEI	T1,1
  1675	004456	202 01 0 00 002647 		MOVEM	T1,S.ALO	;1 BLOCK
  1676
  1677	004457	260 17 0 00 003705 		GO	ETER10		;ENTER FILE
  1678	004460	254 00 0 00 004532 		 JRST	EBOTER
  1679
  1680	004461	201 16 0 00 000200 		MOVEI	T16,^D128
  1681	004462	201 07 0 00 000675 		MOVEI	T7,B11STR	;PUT 1ST BOOT BLOCK INTO FILE
  1682
  1683	004463	200 03 0 07 000000 		MOVE	T3,(T7)
  1684	004464	260 17 0 00 003646 		GO	PUT10
  1685	004465	271 07 0 00 000001 		ADDI	T7,1
  1686	004466	367 16 0 00 004463 		SOJG	T16,.-3
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 43
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0061

  1687	004467	070 03 0 00 000004 		CLOSE	WC,CL.DLL	;CLOSE WRITE CHANNEL
  1688	004470	071 03 0 00 000000 		RELEAS	WC,
  1689
  1690	004471	260 17 0 00 005033 		GO	GETBK2		;GET DISK ADDRESS
  1691	004472	202 01 0 00 000226 		MOVEM	T1,FILLOG
  1692
  1693	004473	260 17 0 00 005136 		GO	SRHDIR		;FIND A DIRECTORY ENTRY
  1694	004474	254 00 0 00 005726 		 JRST	DIRFUL
  1695
  1696	004475	200 01 0 00 000226 		MOVE	T1,FILLOG
  1697	004476	260 17 0 00 004700 		GO	LOGPHY		;GET PHYSICAL DISK ADDRESS
  1698
  1699	004477	260 17 0 00 005170 		GO	DIRETY		;ENTER INTO F-E DIRECTORY
  1700
  1701	004500	260 17 0 00 005203 		GO	ALNSET
  1702
  1703	004501	201 02 0 00 000400 		MOVEI	T2,^D256	;SET WORDS ALLOCATED
  1704	004502	137 02 0 00 006050 		DPB	T2,[POINT 16,DIR3(T7),35]
  1705	004503	242 02 0 00 777760 		LSH	T2,-<^D16>
  1706	004504	137 02 0 00 006051 		DPB	T2,[POINT 16,DIR3(T7),17]
  1707
  1708	004505	201 02 0 00 000400 		MOVEI	T2,^D256	;SET WORDS WRITTEN
  1709	004506	137 02 0 00 006065 		DPB	T2,[POINT 16,DIR4(T7),35]
  1710	004507	242 02 0 00 777760 		LSH	T2,-<^D16>
  1711	004510	137 02 0 00 006066 		DPB	T2,[POINT 16,DIR4(T7),17]
  1712
  1713	004511	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 44
KLAD10	MAC	15-Jun-79 10:26		KLAD10 BOOT GENERATION COMMAND PROCESS ROUTINE                                     SEQ 0062

  1714					;*BOOT ERROR MESSAGES
  1715
  1716	004512	201 00 0 00 006106 	TOOBIG:	MOVEI	[ASCIZ	"%BOOT FILE TOO BIG"]
  1717	004513	254 00 0 00 005730 		JRST	WHTFIL
  1718
  1719	004514	201 00 0 00 006112 	EOFERR:	MOVEI	[ASCIZ	"%BOOT ILLEGAL EOF"]
  1720	004515	254 00 0 00 005730 		JRST	WHTFIL
  1721
  1722	004516	201 00 0 00 006116 	C1ERR:	MOVEI	[ASCIZ	"%BOOT BIN CONSTANT 1 ERROR"]
  1723	004517	254 00 0 00 005730 		JRST	WHTFIL
  1724
  1725	004520	201 00 0 00 006124 	C0ERR:	MOVEI	[ASCIZ	"%BOOT BIN CONSTANT 0 ERROR"]
  1726	004521	254 00 0 00 005730 		JRST	WHTFIL
  1727
  1728	004522	201 00 0 00 006132 	LT6ERR:	MOVEI	[ASCIZ	"%BOOT BYTE COUNT ERROR"]
  1729	004523	254 00 0 00 005730 		JRST	WHTFIL
  1730
  1731	004524	201 00 0 00 006137 	CKSERR:	MOVEI	[ASCIZ	"%BOOT CHECKSUM ERROR"]
  1732	004525	254 00 0 00 005730 		JRST	WHTFIL
  1733
  1734	004526	201 00 0 00 006144 	JNKERR:	MOVEI	[ASCIZ	"%BOOT JUNK DATA ERROR"]
  1735	004527	254 00 0 00 005730 		JRST	WHTFIL
  1736
  1737	004530	201 00 0 00 006151 	ZBCNT:	MOVEI	[ASCIZ	"%BOOT ZERO BYTE COUNT ERROR"]
  1738	004531	254 00 0 00 005730 		JRST	WHTFIL
  1739
  1740	004532	201 00 0 00 006157 	EBOTER:	MOVEI	[ASCIZ	"%BOOT ENTER ERROR"]
  1741	004533	254 00 0 00 005730 		JRST	WHTFIL
  1742
  1743	004534	201 00 0 00 006163 	WRNGBT:	MOVEI	[ASCIZ	"%WRONG BOOT FILE"]
  1744	004535	254 00 0 00 005730 		JRST	WHTFIL
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 45
KLAD10	MAC	15-Jun-79 10:26		CREATE -11 DIRECTORY ROUTINE                                                       SEQ 0063

  1745					SUBTTL	CREATE -11 DIRECTORY ROUTINE
  1746					;	============================
  1747
  1748	004536	332 00 0 00 001713 	DIR11:	SKIPE	I.NAM1		;SKIP IF NO NAME SPECIFIED
  1749	004537	254 00 0 00 005710 		  JRST	ILLSW		;NOT SUPPOSED TO HAVE NAME
  1750
  1751	004540	200 01 0 00 000240 		MOVE	T1,DEVSW	;GET DEVICE SW
  1752	004541	342 01 0 00 004546 		AOJE	T1,NODEV	;YES, DEVICE SPECIFIED
  1753
  1754						OUTSTR	[ASCIZ /
  1755					?SPECIFY DEVICE FILE STRUCTURE
  1756	004542	051 03 0 00 006167 	/]
  1757	004543	332 00 0 00 001677 		SKIPE	$CCLF		;DOING COMMAND FILE ?
  1758	004544	047 00 0 00 000012 		EXIT			;YES, EXIT THEN
  1759	004545	254 00 0 00 002675 		JRST	SCAN		;NO DEV SPECIFIED
  1760
  1761	004546	201 01 0 00 002734 	NODEV:	MOVEI	T1,HOLD		;GET THRESHOLD COUNT
  1762	004547	315 01 0 00 002662 		CAMGE	T1,S.CRE	;SKIP IF N</=1500 IN DEC.
  1763	004550	254 00 0 00 005663 		JRST	THRERR		;EXCEED DIR THRESHOLD
  1764
  1765	004551	402 00 0 00 000240 		SETZM	DEVSW		;RESET DEVICE SW
  1766	004552	332 00 0 00 000237 		SKIPE	DIRSW		;-11 DIR EXIST?
  1767
  1768						OUTSTR	[ ASCIZ /
  1769					%SUPERSEDING EXISTING FRONT-END DIRECTORY
  1770	004553	051 03 0 00 006176 	/]
  1771
  1772	004554	200 01 0 00 000275 		MOVE	T1,HOMBUF	;1ST WORD OF HOME BLOCK
  1773	004555	312 01 0 00 006210 		CAME 	T1,[SIXBIT/HOM/]
  1774	004556	254 00 0 00 005657 		  JRST	HOMERR		;HOME BLOCK NOT FOUND
  1775
  1776	004557	201 07 0 00 000275 		MOVEI	T7,HOMBUF	;HOME BLK ADDR. IN T7
  1777	004560	554 11 0 00 006211 		HLRZ	A,[SIXBIT/KLAD10/]
  1778	004561	260 17 0 00 005217 		GO	SIXR50		;PUT KLAD10 IDENTIFICATION IN HOME BLOCK
  1779	004562	137 11 0 00 006212 		DPB	A,[POINT 16,WORD65(T7),17]
  1780
  1781	004563	550 11 0 00 006211 		HRRZ	A,[SIXBIT/KLAD10/]
  1782	004564	260 17 0 00 005217 		GO	SIXR50
  1783	004565	137 11 0 00 006213 		DPB	A,[POINT 16,WORD65(T7),35]
  1784
  1785	004566	200 01 0 00 002662 		MOVE	T1,S.CRE	;SAVE N IN T1
  1786	004567	231 01 0 00 000020 		IDIVI	T1,BDF		;BDF=# OF ENTRIES PER BLK
  1787	004570	332 00 0 00 000002 		SKIPE	T2		;EXACT?
  1788	004571	271 01 0 00 000001 		ADDI	T1,1		;NO, ROUNDUP
  1789	004572	202 01 0 00 000235 		MOVEM	T1,DIRNCB	;SAVE AS NCB
  1790
  1791	004573	260 17 0 00 004706 		GO	INTCOR		;GET HI-CORE FOR DIRECTORY
  1792
  1793	004574	476 00 0 00 000237 		SETOM	DIRSW		;TURN ON DIR SW
  1794
  1795	004575	254 00 0 00 002675 		JRST	SCAN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 46
KLAD10	MAC	15-Jun-79 10:26		SPECIFY DEVICE FILE STRUCTURE FOR -11 DIRECTORY                                    SEQ 0064

  1796					SUBTTL	SPECIFY DEVICE FILE STRUCTURE FOR -11 DIRECTORY
  1797					;	===============================================
  1798
  1799	004576	332 00 0 00 002662 	DEVSTR:	SKIPE	S.CRE		;SKIP IF /CRE NOT CLEAR
  1800	004577	254 00 0 00 005710 		  JRST	ILLSW
  1801
  1802	004600	200 02 0 00 002661 		MOVE	T2,S.DEV	;GET STRUCTURE NAME
  1803	004601	202 02 0 00 000241 		MOVEM	T2,DIRDEV
  1804	004602	202 02 0 00 000257 		MOVEM	T2,DATDEV	;SAVE IT
  1805	004603	200 01 0 00 006214 		MOVE	T1,[0,,DIRDEV]	;STATUS AT LOC+0
  1806
  1807	004604	047 01 0 00 000045 		DSKCHR	T1,
  1808	004605	254 00 0 00 005655 		  JRST	DEVERR		;DEVICE ERROR
  1809
  1810	004606	135 02 0 00 006215 		LDB	T2,[POINT 6,T1,26];GET BITS 21-26
  1811	004607	275 02 0 00 000005 		SUBI	T2,5		;5=RP04/RP06 CTR
  1812	004610	322 02 0 00 004612 		JUMPE	T2,CTLROK	;IT'S RP04/RP06 CTR
  1813	004611	254 00 0 00 005653 		  JRST	CTRERR		;NOT AN RP04/RP06 CTR
  1814
  1815	004612	200 02 0 00 001675 	CTLROK:	MOVE	T2,MNTBIT
  1816	004613	602 01 0 00 000070 		TRNE	T1,DC.UNT	;IS THIS PACK AN RP04 ?
  1817	004614	400 02 0 00 000000 		SETZ	T2,		;NO, NO MAINT CYL BIT NEEDED
  1818	004615	202 02 0 00 001675 		MOVEM	T2,MNTBIT
  1819
  1820	004616	200 01 0 00 006216 		MOVE	T1,[16,,DIRDEV]	;PHYNAME AT LOC+15
  1821
  1822	004617	047 01 0 00 000045 		DSKCHR	T1,		;GET PHY DEVICE NAME
  1823	004620	254 00 0 00 005655 		  JRST	DEVERR		;DEVICE ERROR
  1824
  1825	004621	200 01 0 00 006217 		MOVE	T1,[16,,DATDEV]
  1826
  1827	004622	047 01 0 00 000045 		DSKCHR	T1,
  1828	004623	254 00 0 00 005655 		  JRST	DEVERR		;DEVICE ERROR
  1829
  1830	004624	201 00 0 00 000001 	USRHPQ:	MOVEI	1
  1831	004625	047 00 0 00 000071 		HPQ			;SET HI-PRI RUN Q
  1832	004626	255 00 0 00 000000 		 JFCL
  1833
  1834	004627	201 00 0 00 004633 	USRHDQ:	MOVEI	HDQ		;SET HI-PRI DISK Q
  1835	004630	047 00 0 00 000121 		DISK.
  1836	004631	255 00 0 00 000000 		 JFCL
  1837	004632	254 00 0 00 004634 		JRST	.+2
  1838	004633	000003	777777		HDQ:	3,,-1
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 47
KLAD10	MAC	15-Jun-79 10:26		SPECIFY DEVICE FILE STRUCTURE FOR -11 DIRECTORY                                    SEQ 0065

  1839	004634	260 17 0 00 004760 		GO	OPNDIR		;OPEN WITH DIR CHANNEL
  1840	004635	254 00 0 00 005712 		  JRST	OPNERR		;OPEN FAIL
  1841
  1842	004636	260 17 0 00 004730 		GO	OPNHOM		;OPEN WITH HOM CHANNEL
  1843	004637	254 00 0 00 005712 		  JRST	OPNERR
  1844
  1845	004640	260 17 0 00 005007 		GO	OPNDAT		;OPEN WITH DAT CHANNEL
  1846	004641	254 00 0 00 005712 		  JRST	OPNERR
  1847
  1848	004642	201 03 0 00 000001 		MOVEI	T3,HMBK01	;GET HOME BLK #1
  1849
  1850	004643	260 17 0 00 004736 		GO	RADHOM		;READ HOME BLK #1
  1851	004644	254 00 0 00 005704 		  JRST	RADERR		;READ ERROR
  1852
  1853	004645	476 00 0 00 000240 		SETOM	DEVSW		;SET STRUC. SW
  1854	004646	201 02 0 00 000275 		MOVEI	T2,HOMBUF	;GET HOME BUF ADR
  1855	004647	336 00 0 02 000066 		SKIPN	WORD66(T2)	;DIRECTORY ON DISK?
  1856	004650	254 00 0 00 002675 		JRST	SCAN		;NO
  1857
  1858	004651	476 00 0 00 000237 		SETOM	DIRSW		;INDICATE DIR EXISTED
  1859	004652	260 17 0 00 005052 		GO	PHYLOG		;CONVERT PHY TO LOG BLK NO.
  1860	004653	200 01 0 00 000235 		MOVE	T1,DIRNCB	;GET # OF BLOCKS
  1861
  1862	004654	260 17 0 00 004706 		GO	INTCOR		;SETUP HI-CORE FOR DIRECTORY
  1863
  1864	004655	200 12 0 00 000227 		MOVE	B,DIRLOG	;GET STARTING BLOCK #
  1865	004656	200 13 0 00 000235 		MOVE	C,DIRNCB	;GET # OF BLOCKS
  1866
  1867	004657	200 11 0 00 006220 		MOVE	A,[DIRBUF,,400000]
  1868	004660	201 07 0 00 400177 		MOVEI	T7,400177
  1869	004661	202 11 0 00 005765 		MOVEM	A,SAVEA#
  1870	004662	202 07 0 00 005766 		MOVEM	T7,SAVET7#
  1871
  1872	004663	200 03 0 00 000012 	DIRLP:	MOVE	T3,B
  1873	004664	260 17 0 00 004766 		GO	RADDIR		;READ DIRECTORY BLOCK
  1874	004665	254 00 0 00 005704 		 JRST	RADERR
  1875
  1876	004666	251 11 0 07 000000 		BLT	A,(T7)		;TRANSFER BLOCK TO HI-CORE
  1877	004667	200 11 0 00 005765 		MOVE	A,SAVEA
  1878	004670	200 07 0 00 005766 		MOVE	T7,SAVET7
  1879	004671	271 11 0 00 000200 		ADDI	A,200
  1880	004672	271 07 0 00 000200 		ADDI	T7,200
  1881	004673	202 11 0 00 005765 		MOVEM	A,SAVEA
  1882	004674	202 07 0 00 005766 		MOVEM	T7,SAVET7
  1883
  1884	004675	372 00 0 00 000013 		SOSE	C		;DONE ALL BLOCKS ?
  1885	004676	344 12 0 00 004663 		AOJA	B,DIRLP		;NO, DO NEXT BLOCK
  1886
  1887	004677	254 00 0 00 002675 		JRST	SCAN		;CONTINUE PROCESS
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 48
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0066

  1888					SUBTTL	PROCESSING SUBROUTINES
  1889					;	======================
  1890
  1891					;*LOGPHY - ROUTINE TO CONVERT A LOGICAL BLOCK ADDRESS TO
  1892					;*	   A PHYSICAL BLOCK ADDRESS. THE CYLINDER, TRACK,
  1893					;*	   AND SECTOR NUMBERS ARE STORED IN THREE LOCATIONS:
  1894					;*	   CYLADD, TRKADD, AND SCTADD.
  1895					;*
  1896					;* CALL:	MOVE T1,LOGICAL BLOCK ADDRESS
  1897					;*		GO	LOGPHY
  1898					;*		RETURN WITH CYLADD, TRKADD, AND SCTADD SET UP
  1899
  1900
  1901	004700	231 01 0 00 000574 	LOGPHY:	IDIVI	T1,^D380	;DIVIDE BY BPC
  1902	004701	202 01 0 00 000231 		MOVEM	T1,CYLADD	;SAVE CYLINDER NO
  1903
  1904	004702	231 02 0 00 000024 		IDIVI	T2,^D20		;DIVIDED BY BPT
  1905	004703	202 02 0 00 000232 		MOVEM	T2,TRKADD	;SAVE TRACK NO.
  1906
  1907	004704	202 03 0 00 000233 		MOVEM	T3,SCTADD	;SAVE SECTOR NO.
  1908
  1909	004705	263 17 0 00 000000 		RTN			;RETURN TO WHENCE WE CAME ...
  1910
  1911					;*INITIALIZE HI-CORE FOR DIRECTORY STORAGE
  1912
  1913	004706	205 00 0 00 000001 	INTCOR:	MOVSI	0,1
  1914	004707	047 00 0 00 000011 		CORE	0,		;DELETE ANY PREVIOUS HI-CORE
  1915	004710	254 00 0 00 005667 		 JRST	ERRCOR
  1916
  1917	004711	221 01 0 00 000200 		IMULI	T1,^D128	;COMPUTE WORDS REQUIRED
  1918	004712	275 01 0 00 000001 		SUBI	T1,1
  1919	004713	271 01 0 00 400000 		ADDI	T1,400000
  1920	004714	261 17 0 00 000001 		PUT	T1
  1921
  1922	004715	514 01 0 00 000001 		HRLZ	T1,T1		;GET HI-CORE
  1923	004716	047 01 0 00 000011 		CORE	T1,
  1924	004717	254 00 0 00 005667 		 JRST	ERRCOR
  1925
  1926	004720	402 00 0 00 000000 		SETZM			;MAKE IT WRITABLE
  1927	004721	047 00 0 00 000036 		SETUWP
  1928	004722	254 00 0 00 005667 		 JRST	ERRCOR
  1929
  1930	004723	262 17 0 00 000001 		GET	T1
  1931	004724	402 00 0 00 400000 		SETZM	400000
  1932	004725	200 00 0 00 006221 		MOVE	0,[400000,,400001]
  1933	004726	251 00 0 01 000000 		BLT	0,(T1)		;CLEAR HI-CORE
  1934	004727	263 17 0 00 000000 		RTN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 49
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0067

  1935					;*OPNHOM - ROUTINE TO OPEN THE DISK ON CHANNEL 'HOM'
  1936
  1937	004730	201 05 0 00 000017 	OPNHOM:	MOVEI	T5,.IODMP	;OPEN IN DUMP MODE
  1938	004731	200 06 0 00 000256 		MOVE	T6,DSKUPN	;GET DEVICE NAME
  1939	004732	201 07 0 00 000000 		MOVEI	T7,0
  1940
  1941	004733	050 05 0 00 000005 		OPEN	HOM,T5
  1942	004734	263 17 0 00 000000 		  RTN			;ERROR RETURN
  1943
  1944	004735	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
  1945
  1946					;*RADHOM - ROUTINE TO READ A BLOCK ON CHANNEL 'HOM'
  1947
  1948	004736	400 01 0 00 000000 	RADHOM:	SETZ	T1,
  1949	004737	201 02 0 00 000005 		MOVEI	T2,HOM
  1950	004740	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)];PUT CHANNEL IN ARG REG.
  1951	004741	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)];PUT BLK NO IN ARG REG
  1952
  1953	004742	047 01 0 00 000146 		SUSET.	T1,		;INSERT BLOCK NUMBER
  1954	004743	254 00 0 00 005661 		  JRST	SUPERR		;SUSET. UUO ERROR
  1955
  1956	004744	056 05 0 00 000140 		IN	HOM,HOMLST	;BRING IN THE DIRECTORY BLOCK
  1957	004745	254 00 0 00 005077 		  JRST	CPOPJ1		;GOOD RETURN
  1958
  1959	004746	263 17 0 00 000000 		RTN			;BAD RETURN
  1960
  1961					;*WRTHOM - ROUTINE TO WRITE A BLOCK ON CHANNEL 'HOM'
  1962
  1963	004747	205 01 0 00 200000 	WRTHOM:	MOVSI	T1,SU.SOT	;OUTPUT BIT
  1964	004750	201 02 0 00 000005 		MOVEI	T2,HOM
  1965	004751	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)];SPECIFY CHANNEL NO.
  1966	004752	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)];SPECIFY BLOCK NO.
  1967
  1968	004753	047 01 0 00 000146 		SUSET.	T1,
  1969	004754	254 00 0 00 005661 		  JRST	SUPERR		;ERROR
  1970
  1971	004755	057 05 0 00 000140 		OUT	HOM,HOMLST	;OUTPUT HOME BLOCK
  1972	004756	254 00 0 00 005077 		  JRST	CPOPJ1		;GOOD RETURN
  1973
  1974	004757	263 17 0 00 000000 		RTN			;ERROR RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 50
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0068

  1975					;*OPNDIR - ROUTINE TO OPEN THE DISK ON CHANNEL 'DIR'
  1976
  1977	004760	201 05 0 00 000017 	OPNDIR:	MOVEI	T5,.IODMP	;SPECIFY DUMP MODE
  1978	004761	200 06 0 00 000256 		MOVE	T6,DSKUPN	;GET DEVICE NAME(PHYSICAL)
  1979	004762	201 07 0 00 000000 		MOVEI	T7,0		;NO RING BUFFERS
  1980
  1981	004763	050 04 0 00 000005 		OPEN	DIR,T5		;ASK FOR DISK
  1982	004764	263 17 0 00 000000 		  RTN			;ERROR RETURN
  1983
  1984	004765	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
  1985
  1986					;*RADDIR - ROUTINE TO READ A BLOCK ON CHANNEL 'DIR'
  1987					;*	NEED MAINT BIT TO UPDATE FROM OLD KLADS
  1988
  1989	004766	400 01 0 00 000000 	RADDIR:	SETZ	T1,
  1990	004767	301 03 0 00 455250 		CAIL	T3,LOGBLK	;READING FROM HI-CYL ON RP04 ?
  1991	004770	200 01 0 00 001675 		MOVE	T1,MNTBIT	;YES		
  1992	004771	201 02 0 00 000004 		MOVEI	T2,DIR		;USE DIR CHANNEL
  1993	004772	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)];CHANNEL NO IN ARG REG
  1994	004773	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)];BLK NO. IN ARG REG
  1995
  1996	004774	047 01 0 00 000146 		SUSET.	T1,		;INSERT BLOCK NO.
  1997	004775	254 00 0 00 005661 		 JRST	SUPERR		;ERROR, ABORT
  1998
  1999	004776	056 04 0 00 000142 		IN	DIR,DIRLST
  2000	004777	254 00 0 00 005077 		  JRST	CPOPJ1
  2001
  2002	005000	263 17 0 00 000000 		RTN			;ERROR
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 51
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0069

  2003					;*OPWCDP - ROUTINE TO OPEN IN DUMP MODE TO WRITE
  2004
  2005	005001	201 01 0 00 000017 	OPWCDP:	MOVEI	T1,.IODMP	;DUMP MODE
  2006	005002	200 02 0 00 000256 		MOVE	T2,DSKUPN	;DEVICE NAME
  2007	005003	402 00 0 00 000003 		SETZM	T3
  2008
  2009	005004	050 03 0 00 000001 		OPEN	WC,T1		;OPEN FOR -11 OUTPUT
  2010	005005	263 17 0 00 000000 		  RTN			;ERROR RETURN
  2011
  2012	005006	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
  2013
  2014					;*OPNDAT - ROUTINE TO OPEN THE DISK ON CHANNEL 'DAT'
  2015
  2016	005007	201 05 0 00 000017 	OPNDAT:	MOVEI	T5,.IODMP	;SPECIFY DUMP MODE
  2017	005010	200 06 0 00 000256 		MOVE	T6,DSKUPN	;GET DEVICE NAME(PHYSICAL)
  2018	005011	201 07 0 00 000000 		MOVEI	T7,0		;NO RING BUFFERS
  2019
  2020	005012	050 01 0 00 000005 		OPEN	DAT,T5		;ASK FOR DISK
  2021	005013	263 17 0 00 000000 		  RTN			;ERROR RETURN
  2022
  2023	005014	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
  2024
  2025	005015	263 17 0 00 000000 		RTN			;ERROR
  2026
  2027					;*OPRCDP - ROUTINE TO OPEN IN DUMP MODE TO READ
  2028
  2029	005016	201 01 0 00 000017 	OPRCDP:	MOVEI	T1,.IODMP	;USE DUMP MODE INPUT
  2030	005017	200 02 0 00 000256 		MOVE	T2,DSKUPN	;GET DEVICE NAME
  2031	005020	402 00 0 00 000003 		SETZM	T3		;NO BUFFER
  2032
  2033	005021	050 02 0 00 000001 		OPEN	RC,T1
  2034	005022	263 17 0 00 000000 		  RTN			;ERROR RETURN
  2035
  2036	005023	254 00 0 00 005077 		JRST	CPOPJ1		;GOOD RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 52
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0070

  2037					;*GETBLK - ROUTINE TO GET THE LOGICAL BLOCK NUMBER OF THE
  2038					;*	   FIRST BLOCK OF A FILE IN THE TOPS-10 FILE SYSTEM.
  2039					;*
  2040					;*CALL:		GO	GETBK1
  2041					;*		OR
  2042					;*		GO	GETBK2
  2043					;*		RETURN WITH BLOCK # IN T1
  2044
  2045	005024	260 17 0 00 005016 	GETBK1:	GO	OPRCDP		;USE DUMP MODE INPUT
  2046	005025	254 00 0 00 005712 		  JRST	OPNERR		;ERROR, ISSUE MESSAGE
  2047
  2048	005026	201 01 0 00 000017 		MOVEI	T1,17		;GET # OF ARGUMENTS
  2049	005027	202 01 0 00 002521 		MOVEM	T1,LOOK10	;SAVE # OF ARGS IN LOOKUP BLK
  2050
  2051	005030	076 02 0 00 002521 		LOOKUP	RC,LOOK10	;LOOKUP THE FILE
  2052	005031	254 00 0 00 005722 		  JRST	NOFL10		;CANNOT FIND FILE !
  2053
  2054	005032	254 00 0 00 005041 		JRST	GOARND		;GO AROUND
  2055
  2056	005033	260 17 0 00 005016 	GETBK2:	GO	OPRCDP		;USE DUMP MODE INPUT
  2057	005034	254 00 0 00 005712 		  JRST	OPNERR		;ERROR
  2058
  2059	005035	201 01 0 00 000017 		MOVEI	T1,17		;GET # OF ARGUMENTS
  2060	005036	202 01 0 00 002547 		MOVEM	T1,ENTBLK	;SAVE IT
  2061
  2062	005037	076 02 0 00 002547 		LOOKUP	RC,ENTBLK	;LOOKUP THE OUTPUT FILE
  2063	005040	254 00 0 00 005722 		  JRST	NOFL10		;NO SUCH FILE !
  2064
  2065	005041	074 02 0 00 000000 	GOARND:	USETI	RC,PRIME	;SET UP TO READ PRIME RIB
  2066
  2067						INPUT	RC,[IOWD 200,GETBUF
  2068	005042	066 02 0 00 006222 			    0 ]		;READ THE PRIME RIB
  2069
  2070	005043	550 01 0 00 001716 		HRRZ	T1,GETBUF	;GET ADDRESS OF 1ST POINTER
  2071	005044	201 01 0 01 001717 		MOVEI	T1,GETBUF+1(T1)	;GET SECOND POINTER
  2072	005045	500 01 0 00 000315 		HLL	T1,HOMCLP	;FORM BYTE POINTER
  2073	005046	135 01 0 00 000001 		LDB	T1,T1		;GET ADDRESS POINTER
  2074	005047	220 01 0 00 000316 		IMUL	T1,HOMBPC	;COMPUTE RIB LOGICAL BLOCK #
  2075	005050	271 01 0 00 000001 		ADDI	T1,1		;COMPUTE # OF DATA BLOCK 1
  2076	005051	263 17 0 00 000000 		RTN			;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 53
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0071

  2077					;*PHYLOG - PHYSICAL TO LOGICAL BLOCK ADDRESS CONVERSION ROUTINE
  2078					;*	CONVERT PHYSICAL ADDR TO LOGICAL ADDR
  2079					;*	FOR DIRECTORY FILE
  2080
  2081	005052	201 07 0 00 000275 	PHYLOG:	MOVEI	T7,HOMBUF		;GET HOME BUF ADR
  2082	005053	135 03 0 00 006224 		LDB	T3,[POINT 10,WORD66(T7),17] ;GET CLYDR OF DIR FILE
  2083	005054	221 03 0 00 000574 		IMULI	T3,^D380		;MUTIPLY BY BPC
  2084	005055	135 02 0 00 006225 		LDB	T2,[POINT 5,WORD66(T7),27] ;GET TRACK OF DIR FILE
  2085	005056	221 02 0 00 000024 		IMULI	T2,^D20			;MUTIPLY BY BPT
  2086	005057	135 01 0 00 006226 		LDB	T1,[POINT 5,WORD66(T7),35] ;GET SECTOR OF DIR FILE
  2087	005060	270 03 0 00 000002 		ADD	T3,T2
  2088	005061	270 03 0 00 000001 		ADD	T3,T1			;T3 CONTAINS 1ST LOG ADDR
  2089	005062	202 03 0 00 000227 		MOVEM	T3,DIRLOG		;SAVE IT
  2090	005063	202 03 0 00 000230 		MOVEM	T3,DIRFST		;ALSO SAVE IT AS 1ST ADR
  2091	005064	135 04 0 00 006227 		LDB	T4,[POINT 16,WORD67(T7),17] ;GET NCB OF DIR FILE
  2092	005065	202 04 0 00 000235 		MOVEM	T4,DIRNCB		;SAVE IT
  2093	005066	263 17 0 00 000000 		RTN
  2094
  2095					;*COVERT -  CONVERT PHY ADDR(FROM DIR FILE) TO LOG ADDR FOR DATA FILE
  2096
  2097	005067	135 03 0 00 006230 	COVERT:	LDB	T3,[POINT 10,DIR2(T7),17]
  2098	005070	221 03 0 00 000574 		IMULI	T3,^D380		;CYLINDER
  2099	005071	135 02 0 00 006231 		LDB	T2,[POINT 5,DIR2(T7),27]
  2100	005072	221 02 0 00 000024 		IMULI	T2,^D20			;TRACK
  2101	005073	135 01 0 00 006232 		LDB	T1,[POINT 5,DIR2(T7),35]
  2102	005074	270 03 0 00 000002 		ADD	T3,T2
  2103	005075	270 03 0 00 000001 		ADD	T3,T1			;T3 CONTAINS LOG ADDR
  2104	005076	263 17 0 00 000000 		RTN				;RETURN
  2105
  2106	005077	350 00 0 17 000000 	CPOPJ1:	AOS	(P)		;SKIP RETURN
  2107
  2108	005100	263 17 0 00 000000 	CPOPJ:	RTN			;NON-SKIP RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 54
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0072

  2109					;*VINPUT - FE FILE VERIFICATION ROUTINE
  2110
  2111	005101	554 11 0 00 001713 	VINPUT:	HLRZ	A,I.NAM1	;GET INPUT FILE NAME
  2112	005102	260 17 0 00 005217 		GO	SIXR50		;CONVERT IT TO -11 RAD50
  2113	005103	506 11 0 00 000224 		HRLM	A,FILNAM	;SAVE IT
  2114
  2115	005104	550 11 0 00 001713 		HRRZ	A,I.NAM1	;GET 3 MORE SIXBITS
  2116	005105	260 17 0 00 005217 		GO	SIXR50
  2117	005106	542 11 0 00 000224 		HRRM	A,FILNAM
  2118
  2119	005107	554 11 0 00 001714 		HLRZ	A,I.EXT		;GET FILE EXT
  2120	005110	260 17 0 00 005217 		GO	SIXR50
  2121	005111	516 11 0 00 000225 		HRLZM	A,EXTION	;SAVE EXT
  2122
  2123	005112	200 05 0 00 000235 	IENTRY:	MOVE	T5,DIRNCB	;GET NO. OF BLKS IN T5
  2124	005113	221 05 0 00 000020 		IMULI	T5,^D16
  2125	005114	201 07 0 00 400000 		MOVEI	T7,400000	;GET HI-CORE BASE ADDRESS
  2126
  2127	005115	200 10 0 07 000000 	TLOOP:	MOVE	T10,(T7)	;1ST WORD IN T10
  2128	005116	316 10 0 00 000224 		CAMN	T10,FILNAM	;COMPARE 1ST WORD
  2129	005117	254 00 0 00 005123 		JRST	COMEXT		;GO COMPARE EXT
  2130
  2131	005120	271 07 0 00 000010 	BACK:	ADDI	T7,HALF		;GET TO NEXT ENTRY
  2132	005121	367 05 0 00 005115 		SOJG	T5,TLOOP	;SEARCH ALL ENTRIES
  2133	005122	263 17 0 00 000000 		RTN			;FILE DOES NOT EXIST
  2134
  2135	005123	510 10 0 07 000001 	COMEXT:	HLLZ	T10,1(T7)	;GET NEXT WORD
  2136	005124	312 10 0 00 000225 		CAME	T10,EXTION	;CORRECT EXTENSION ?
  2137	005125	254 00 0 00 005120 		JRST	BACK		;NO, GO CHECK NEXT ENTRY
  2138
  2139	005126	476 00 0 00 002636 		SETOM	ALOSW		;YES, NAME FOUND
  2140
  2141	005127	260 17 0 00 005067 		GO	COVERT		;CONVERT PHY TO LOG BLK NO
  2142
  2143	005130	202 03 0 00 000226 		MOVEM	T3,FILLOG	;SAVE 1ST BLK ADDR
  2144	005131	550 12 0 07 000004 		HRRZ	B,DIR4(T7)	;RH OF WD WRITTEN IN B
  2145	005132	554 13 0 07 000004 		HLRZ	C,DIR4(T7)	;LH OF WD WRITTEN IN C
  2146	005133	137 13 0 00 006233 		DPB	C,[POINT 16,B,19] ;RH+LH IN B
  2147	005134	202 12 0 00 000234 		MOVEM	B,FILNCB	;SAVE # OF WORDS IN NCB
  2148	005135	263 17 0 00 000000 		RTN			;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 55
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0073

  2149					;*SRHDIR - SEARCH FOR AVAILABLE ENTRY IN DIRECTORY FILE
  2150
  2151	005136	554 11 0 00 001703 	SRHDIR:	HLRZ	A,O.NAM1	;GET OUTPUT FILE NAME
  2152	005137	260 17 0 00 005217 		GO	SIXR50		;CONVERT IT TO -11 RAD 50
  2153	005140	506 11 0 00 000224 		HRLM	A,FILNAM
  2154
  2155	005141	550 11 0 00 001703 		HRRZ	A,O.NAM1
  2156	005142	260 17 0 00 005217 		GO	SIXR50
  2157	005143	542 11 0 00 000224 		HRRM	A,FILNAM
  2158
  2159	005144	554 11 0 00 001704 		HLRZ	A,O.EXT
  2160	005145	260 17 0 00 005217 		GO	SIXR50
  2161	005146	516 11 0 00 000225 		HRLZM	A,EXTION
  2162
  2163	005147	200 13 0 00 000235 		MOVE	C,DIRNCB	;GET NO. OF BLKS IN C
  2164	005150	221 13 0 00 000020 		IMULI	C,^D16		;COMPUTE ENTRIES
  2165	005151	201 07 0 00 400000 		MOVEI	T7,400000	;SET HI-CORE DIRECTORY BASE ADDRESS
  2166
  2167	005152	200 11 0 07 000000 	AGAIN:	MOVE	A,(T7)		;GET DIR 1ST WORD IN A
  2168	005153	302 11 0 00 000000 		CAIE	A,0
  2169	005154	316 11 0 00 006234 		CAMN	A,[-2,,-2]	;ENTRY IN USE?
  2170	005155	254 00 0 00 005167 		JRST	FREE		;NOT IN USE
  2171
  2172	005156	200 10 0 07 000000 		MOVE	T10,(T7)	;GET DIRECTORY ENTRY NAME
  2173	005157	316 10 0 00 000224 		CAMN	T10,FILNAM
  2174	005160	254 00 0 00 005164 		JRST	SRHEXT		;NAME MATCH, CHECK EXT
  2175
  2176	005161	271 07 0 00 000010 		ADDI	T7,HALF		;GET TO NEXT ENTRY
  2177	005162	367 13 0 00 005152 		SOJG	C,AGAIN		;NO
  2178	005163	263 17 0 00 000000 		RTN			;NO ENTRIES AVAILABLE
  2179
  2180	005164	510 10 0 07 000001 	SRHEXT:	HLLZ	T10,1(T7)
  2181	005165	312 10 0 00 000225 		CAME	T10,EXTION
  2182	005166	254 00 0 00 005161 		JRST	.-5
  2183
  2184	005167	254 00 0 00 005077 	FREE:	JRST	CPOPJ1		;FOUND A FREE ENTRY
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 56
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0074

  2185					;*DIRETY - CREATE A -11 DIRECTORY ENTRY 
  2186
  2187	005170	402 00 0 07 000000 	DIRETY:	SETZM	DIR0(T7)		;SET TO ZERO
  2188	005171	205 01 0 07 000000 		MOVSI	T1,DIR0(T7)		;GET SOURCE ADDR
  2189	005172	541 01 0 07 000001 		HRRI	T1,DIR1(T7)		;GET DESTINATION FOR BLT
  2190	005173	251 01 0 07 000007 		BLT	T1,DIR7(T7)		;ZERO OUT 16 BYTES
  2191	005174	200 03 0 00 000231 		MOVE	T3,CYLADD		;GET CYLINDER ADR
  2192	005175	137 03 0 00 006230 		DPB	T3,[POINT 10,DIR2(T7),17] ;CYLINDER NO.
  2193	005176	200 03 0 00 000232 		MOVE	T3,TRKADD		;GET TRACK ADDR
  2194	005177	137 03 0 00 006231 		DPB	T3,[POINT 5,DIR2(T7),27] ;TRACK NO.
  2195	005200	200 03 0 00 000233 		MOVE	T3,SCTADD		;GET SECTOR ADDR
  2196	005201	137 03 0 00 006232 		DPB	T3,[POINT 5,DIR2(T7),35] ;SECTOR NO.
  2197	005202	263 17 0 00 000000 		RTN				;RETURN
  2198
  2199	005203	554 11 0 00 001703 	ALNSET:	HLRZ	A,O.NAM1		;GET 3 SIXBIT CHARS
  2200	005204	260 17 0 00 005217 		GO	SIXR50			;CONVERT THEM TO -11 RAD50
  2201	005205	137 11 0 00 006235 		DPB	A,[POINT 16,DIR0(T7),17] ;SAVE O.NAM1 IN -11 RAD50
  2202
  2203	005206	550 11 0 00 001703 		HRRZ	A,O.NAM1		;SECOND PART
  2204	005207	260 17 0 00 005217 		GO	SIXR50
  2205	005210	137 11 0 00 006236 		DPB	A,[POINT 16,DIR0(T7),35] ;SAVE O.NAM2 IN -11 RAD50
  2206
  2207	005211	554 11 0 00 001704 		HLRZ	A,O.EXT			;GET FILE EXTENSION
  2208	005212	260 17 0 00 005217 		GO	SIXR50
  2209	005213	137 11 0 00 006237 		DPB	A,[POINT 16,DIR1(T7),17] ;SAVE EXT IN -11 RAD50
  2210
  2211	005214	200 01 0 00 001707 		MOVE	T1,O.DATE		;GET DATE
  2212	005215	137 01 0 00 006240 		DPB	T1,[POINT 16,DIR1(T7),35] ;SAVE DATE
  2213	005216	263 17 0 00 000000 		RTN				;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 57
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0075

  2214					;*SIXR50 - SIXBIT TO RAD50 (-11 STYLE) CONVERSION ROUTINE
  2215					;*
  2216					;*CALL WITH 3 SIXBIT CHARACTERS IN RH OF A
  2217					;*RETURN WITH RADIX 50 (-11 STYLE) IN A
  2218					;*ALL BAD CHARACTER CODED AS 35'S, THE UNDEFINDED CHAR
  2219
  2220	005217	201 00 0 00 000000 	SIXR50:	MOVEI	T0,0			;INIT T0
  2221	005220	200 15 0 00 006241 		MOVE	E,[POINT 6,A,17]	;E CONTAINS INPUT
  2222
  2223	005221	134 12 0 00 000015 	ALOOP:	ILDB	B,E			;GET A BYTE
  2224	005222	231 12 0 00 000006 		IDIVI	B,6			;CODE CONVERT
  2225	005223	135 14 0 13 005232 		LDB	D,TABA(C)		;GET THE R50 BYTE
  2226	005224	221 00 0 00 000050 		IMULI	T0,50			;LEFT SHIFT PREV BYTES
  2227	005225	271 00 0 14 000000 		ADDI	T0,0(D)			;ADD IN THIS ONE
  2228	005226	603 15 0 00 770000 		TLNE	E,770000		;DONE?
  2229	005227	254 00 0 00 005221 		JRST	ALOOP			;NO
  2230
  2231	005230	200 11 0 00 000000 		MOVE	A,T0			;YES, ANSWER IS IN A
  2232	005231	263 17 0 00 000000 		RTN				;RETURN
  2233
  2234	005232	36 06 0 12 005240 	TABA:	POINT	6,TABB(B),05
  2235	005233	30 06 0 12 005240 		POINT	6,TABB(B),11
  2236	005234	22 06 0 12 005240 		POINT	6,TABB(B),17
  2237	005235	14 06 0 12 005240 		POINT	6,TABB(B),23
  2238	005236	06 06 0 12 005240 		POINT	6,TABB(B),29
  2239	005237	00 06 0 12 005240 		POINT	6,TABB(B),35
  2240
  2241	005240	00 35 35 35 33 35 	TABB:	BYTE	(6)0,35,35,35,33,35,35,35,35,35,35,35
  2242	005241	35 35 35 35 35 35 
  2243	005242	35 35 34 35 36 37 		BYTE	(6)35,35,34,35,36,37,40,41,42,43,44,45
  2244	005243	40 41 42 43 44 45 
  2245	005244	46 47 35 35 35 35 		BYTE	(6)46,47,35,35,35,35,35,35,35,01,02,03
  2246	005245	35 35 35 01 02 03 
  2247	005246	04 05 06 07 10 11 		BYTE	(6)04,05,06,07,10,11,12,13,14,15,16,17
  2248	005247	12 13 14 15 16 17 
  2249	005250	20 21 22 23 24 25 		BYTE	(6)20,21,22,23,24,25,26,27,30,31,32,35,35,35,35,35,35,35
  2250	005251	26 27 30 31 32 35 
  2251	005252	35 35 35 35 35 35 
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 58
KLAD10	MAC	15-Jun-79 10:26		PROCESSING SUBROUTINES                                                             SEQ 0076

  2252					;*R50SIX - RAD50 (-11 STYLE) TO SIXBIT CONVERSION ROUTINE
  2253					;*
  2254					;*CALL WITH RADIX 50 (-11 STYLE) IN A
  2255					;*RETURN WITH 3 SIXBIT CHARACTERS IN RH OF A
  2256
  2257	005253	402 00 0 00 000000 	R50SIX:	SETZM	T0		;INIT T0
  2258	005254	200 13 0 00 006242 		MOVE	C,[POINT 6,T0,17];POINT TO OUTPUT AC
  2259	005255	405 11 0 00 177777 		ANDI	A,177777	;MAKE SURE SIZE OK
  2260	005256	231 11 0 00 003100 		IDIVI	A,3100		;GET 1ST CHAR
  2261	005257	261 17 0 00 000012 		PUT	B		;SAVE OTHER 2 CHARS
  2262	005260	260 17 0 00 005271 		GO	R50OT1		;OUTPUT 1ST CHAR
  2263
  2264	005261	262 17 0 00 000011 		GET	A		;RESTORE 2 AND 3
  2265	005262	231 11 0 00 000050 		IDIVI	A,50		;SPLIT APART
  2266	005263	261 17 0 00 000012 		PUT	B		;SAVE LAST CHAR
  2267	005264	260 17 0 00 005271 		GO	R50OT1		;OUTPUT 2ND CHAR
  2268
  2269	005265	262 17 0 00 000011 		GET	A		;RESTORE 3RD CHAR
  2270	005266	260 17 0 00 005271 		GO	R50OT1		;OUTPUT LAST CHAR
  2271	005267	200 11 0 00 000000 		MOVE	A,T0		;COPY BACK TO A
  2272	005270	263 17 0 00 000000 		RTN			;EXIT
  2273
  2274	005271	231 11 0 00 000006 	R50OT1:	IDIVI	A,6		;USUAL CODE CONVERSION
  2275	005272	135 14 0 12 005275 		LDB	D,R50OT2(B)	;GET CHAR IN SIXBIT
  2276	005273	136 14 0 00 000013 		IDPB	D,C		;PUT IN T0
  2277	005274	263 17 0 00 000000 		RTN			;AND RETURN IT
  2278
  2279	005275	36 06 0 11 005303 	R50OT2:	POINT	6,R50TAB(A),5
  2280	005276	30 06 0 11 005303 		POINT	6,R50TAB(A),11
  2281	005277	22 06 0 11 005303 		POINT	6,R50TAB(A),17
  2282	005300	14 06 0 11 005303 		POINT	6,R50TAB(A),23
  2283	005301	06 06 0 11 005303 		POINT	6,R50TAB(A),29
  2284	005302	00 06 0 11 005303 		POINT	6,R50TAB(A),35
  2285
  2286	005303	00 41 42 43 44 45 	R50TAB:	SIXBIT	\ ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789?\
  2287	005304	46 47 50 51 52 53 
  2288	005305	54 55 56 57 60 61 
  2289	005306	62 63 64 65 66 67 
  2290	005307	70 71 72 04 16 05 
  2291	005310	20 21 22 23 24 25 
  2292	005311	26 27 30 31 37 00 
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 59
KLAD10	MAC	15-Jun-79 10:26		ROUTINE TO HANDLE END OF COMMAND PROCESSING                                        SEQ 0077

  2293					SUBTTL	ROUTINE TO HANDLE END OF COMMAND PROCESSING
  2294					;	===========================================
  2295
  2296					;*WRITE OUT DIRECTORY, "KLADFE.DIR"
  2297
  2298	005312	336 00 0 00 000237 	ENDALL:	SKIPN	DIRSW		;DIRECTORY IN CORE ?
  2299	005313	047 00 0 00 000012 		EXIT			;NO
  2300
  2301	005314	402 00 0 00 001677 		SETZM	$CCLF		;CLEAR INDIRECT FLAG
  2302
  2303	005315	205 01 0 00 444566 		MOVSI	T1,'DEV'	;SETUP DEVICE
  2304	005316	202 01 0 00 001702 		MOVEM	T1,O.DEV
  2305
  2306	005317	200 01 0 00 006243 		MOVE	T1,[SIXBIT/KLADFE/]
  2307	005320	202 01 0 00 001703 		MOVEM	T1,O.NAM1
  2308
  2309	005321	200 01 0 00 006244 		MOVE	T1,[SIXBIT/DIR/]
  2310	005322	202 01 0 00 001704 		MOVEM	T1,O.EXT
  2311
  2312	005323	402 00 0 00 001706 		SETZM	O.PPN
  2313
  2314	005324	201 01 0 00 000577 		MOVEI	T1,577		;SET PROTECTION 577
  2315	005325	202 01 0 00 001705 		MOVEM	T1,O.PRT
  2316
  2317	005326	200 01 0 00 000235 		MOVE	T1,DIRNCB	;GET # OF BLOCKS
  2318	005327	202 01 0 00 002647 		MOVEM	T1,S.ALO
  2319
  2320	005330	260 17 0 00 003705 		GO	ETER10		;ENTER FILE
  2321	005331	254 00 0 00 005671 		 JRST	EDIRER		;ERROR ENTERING DIRECTORY
  2322
  2323	005332	200 16 0 00 000235 		MOVE	T16,DIRNCB	;GET # OF BLOCKS
  2324	005333	221 16 0 00 000200 		IMULI	T16,^D16*^D8	;COMPUTE # OF WORDS
  2325	005334	201 07 0 00 400000 		MOVEI	T7,400000	;SETUP HI-CORE BASE ADDRESS
  2326
  2327	005335	200 03 0 07 000000 		MOVE	T3,(T7)		;GET DIRECTORY WORD
  2328	005336	260 17 0 00 003646 		GO	PUT10		;OUTPUT IT
  2329	005337	271 07 0 00 000001 		ADDI	T7,1		;ADVANCE TO NEXT WORD
  2330	005340	367 16 0 00 005335 		SOJG	T16,.-3		;LOOP TILL DONE
  2331
  2332	005341	070 03 0 00 000004 		CLOSE	WC,CL.DLL	;CLOSE WRITE CHANNEL
  2333	005342	071 03 0 00 000000 		RELEAS	WC,
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 60
KLAD10	MAC	15-Jun-79 10:26		ROUTINE TO HANDLE END OF COMMAND PROCESSING                                        SEQ 0078

  2334					;*GET DISK DIRECTORY ADDRESS, PUT IN HOME BLOCK
  2335
  2336	005343	260 17 0 00 005033 		GO	GETBK2			;GET 1ST BLOCK FROM -10
  2337
  2338	005344	260 17 0 00 004700 		GO	LOGPHY			;CONVERT TO PHYSICAL ADDRESS
  2339
  2340	005345	201 07 0 00 000275 		MOVEI	T7,HOMBUF		;GET ADDRESS OF HOME BLOCK
  2341	005346	201 03 0 00 000000 		MOVEI	T3,0
  2342
  2343	005347	137 03 0 00 006245 		DPB	T3,[POINT 7,WORD66(T7),17]
  2344	005350	137 03 0 00 006246 		DPB	T3,[POINT 3,WORD66(T7),27]
  2345	005351	137 03 0 00 006247 		DPB	T3,[POINT 3,WORD66(T7),30]
  2346
  2347	005352	200 03 0 00 000231 		MOVE	T3,CYLADD		;BITS 0-8 CYLINDER NUMBER
  2348	005353	137 03 0 00 006224 		DPB	T3,[POINT 10,WORD66(T7),17]
  2349
  2350	005354	200 03 0 00 000232 		MOVE	T3,TRKADD		;BITS 8-12 TRACK NUMBER
  2351	005355	137 03 0 00 006225 		DPB	T3,[POINT 5,WORD66(T7),27]
  2352
  2353	005356	200 03 0 00 000233 		MOVE	T3,SCTADD		;BITS 0-4 SECTOR NUMBER
  2354	005357	137 03 0 00 006226 		DPB	T3,[POINT 5,WORD66(T7),35]
  2355
  2356	005360	200 03 0 00 000235 		MOVE	T3,DIRNCB		;DIR NUMBER OF BLOCKS
  2357	005361	137 03 0 00 006227 		DPB	T3,[POINT 16,WORD67(T7),17]
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 61
KLAD10	MAC	15-Jun-79 10:26		ROUTINE TO HANDLE END OF COMMAND PROCESSING                                        SEQ 0079

  2358					;*WRITE OUT HOME BLOCK #1
  2359
  2360	005362	201 03 0 00 000001 		MOVEI	T3,HMBK01		;HOME BLOCK # 1
  2361	005363	260 17 0 00 004747 		GO	WRTHOM			;WRITE IT
  2362	005364	254 00 0 00 005702 		  JRST	WRTERR			;WRITE ERROR
  2363
  2364					;*HERE TO UPDATE AND WRITE OUT HOME BLOCK # 10
  2365
  2366	005365	201 03 0 00 000012 		MOVEI	T3,HMBK10		;GET BLOCK # FOR HOBK10
  2367	005366	400 01 0 00 000000 		SETZ	T1,
  2368	005367	201 02 0 00 000005 		MOVEI	T2,HOM
  2369	005370	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)]	;CHANNEL NO.
  2370	005371	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)]	;BLOCK NO.
  2371
  2372	005372	047 01 0 00 000146 		SUSET.	T1,
  2373	005373	254 00 0 00 005661 		  JRST	SUPERR			;SUSET. UUO ERROR
  2374
  2375	005374	056 05 0 00 000146 		IN	HOM,H10LST		;BRING IN HOME BLK #10
  2376	005375	254 00 0 00 005377 		JRST	NEXT			;READ OK
  2377
  2378	005376	254 00 0 00 005704 		  JRST	RADERR			;READ FAIL
  2379
  2380	005377	200 01 0 00 006250 	NEXT:	MOVE	T1,[HOMBF1,,HOMBF2]
  2381	005400	251 01 0 00 000600 		BLT	T1,ENDHOM		;COPY HOMBK1 TO HOMB10
  2382	005401	205 01 0 00 200000 		MOVSI	T1,SU.SOT		;SET OUTPUT BIT
  2383	005402	201 02 0 00 000005 		MOVEI	T2,HOM
  2384	005403	137 02 0 00 006073 		DPB	T2,[POINTR(T1,SU.SCH)]	;CHANNEL NO.
  2385	005404	137 03 0 00 006074 		DPB	T3,[POINTR(T1,SU.SBL)]	;BLOCK NO.
  2386
  2387	005405	047 01 0 00 000146 		SUSET.	T1,
  2388	005406	254 00 0 00 005661 		  JRST	SUPERR
  2389
  2390	005407	057 05 0 00 000146 		OUT	HOM,H10LST		;OUTPUT HMBK10
  2391	005410	254 00 0 00 005412 		JRST	NEXT1			;WRITE OK
  2392
  2393	005411	254 00 0 00 005702 		  JRST	WRTERR			;WRITE FAIL
  2394
  2395					;*CLOSE ALL FILES AND GET OUT
  2396
  2397	005412	070 04 0 00 000000 	NEXT1:	CLOSE	DIR,			;CLOSE DIR CHANNEL
  2398	005413	070 01 0 00 000000 		CLOSE	DAT,			;CLOSE DAT CHANNEL
  2399	005414	070 05 0 00 000000 		CLOSE	HOM,			;CLOSE HOM CHANNEL
  2400	005415	047 00 0 00 000012 		EXIT				;FINALLY !!!
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 62
KLAD10	MAC	15-Jun-79 10:26		LIST FRONT-END DIRECTORY                                                           SEQ 0080

  2401					SUBTTL	LIST FRONT-END DIRECTORY
  2402					;	========================
  2403
  2404	005416	336 00 0 00 000237 	LSTDIR:	SKIPN	DIRSW		;SEE IF DIRECTORY EXISTS
  2405	005417	254 00 0 00 005665 		  JRST	DIRERR		;DOESN'T
  2406
  2407	005420	260 17 0 00 005620 		GO	PNTHDR		;PRINT HEADER
  2408
  2409	005421	200 05 0 00 000235 		MOVE	T5,DIRNCB	;# OF BLKS USED BY DIRECTORY
  2410	005422	221 05 0 00 000020 		IMULI	T5,^D16		;COMPUTE NUMBER OF ENTRIES
  2411	005423	201 07 0 00 400000 		MOVEI	T7,400000	;SETUP HI-CORE DIR BASE ADDRESS
  2412
  2413	005424	402 00 0 00 005763 		SETZM	ENTRYC#		;CLEAR ENTRY COUNTER
  2414	005425	402 00 0 00 005770 		SETZM	TOTALC#		;CLEAR TOTAL ALLOCATED
  2415	005426	402 00 0 00 005771 		SETZM	TOTWT#		;CLEAR TOTAL WRITTEN
  2416
  2417	005427	260 17 0 00 005457 	SLOOP:	GO	PNTDIR		;PRINT ONE ENTRY
  2418
  2419	005430	271 07 0 00 000010 		ADDI	T7,HALF		;GET TO NEXT ENTRY
  2420	005431	367 05 0 00 005427 		SOJG	T5,SLOOP	;ALL ENTRIES SEARCHED ?
  2421	005432	402 00 0 00 002644 		SETZM	DIRSUM
  2422
  2423						MOVEI	E,[ASCIZ/
  2424	005433	201 15 0 00 006251 	F-E DIRECTORY SIZE	= /]
  2425	005434	260 17 0 00 005623 		GO	TYPE
  2426	005435	200 11 0 00 000235 		MOVE	A,DIRNCB
  2427	005436	221 11 0 00 000020 		IMULI	A,^D16
  2428	005437	260 17 0 00 005541 		GO	PTSIZE
  2429
  2430						MOVEI	E,[ASCIZ/
  2431	005440	201 15 0 00 006256 	TOTAL ENTRIES		= /]
  2432	005441	260 17 0 00 005623 		GO	TYPE
  2433	005442	200 11 0 00 005763 		MOVE	A,ENTRYC
  2434	005443	260 17 0 00 005541 		GO	PTSIZE
  2435
  2436						MOVEI	E,[ASCIZ/
  2437	005444	201 15 0 00 006262 	TOTAL ALLOCATED BLOCKS	= /]
  2438	005445	260 17 0 00 005623 		GO	TYPE
  2439	005446	200 11 0 00 005770 		MOVE	A,TOTALC
  2440	005447	260 17 0 00 005541 		GO	PTSIZE
  2441
  2442						MOVEI	E,[ASCIZ/
  2443	005450	201 15 0 00 006270 	TOTAL WRITTEN BLOCKS	= /]
  2444	005451	260 17 0 00 005623 		GO	TYPE
  2445	005452	200 11 0 00 005771 		MOVE	A,TOTWT
  2446	005453	260 17 0 00 005541 		GO	PTSIZE
  2447	005454	403 00 0 00 000011 		SETZB	0,A
  2448	005455	260 17 0 00 005630 		GO	PRINT
  2449
  2450	005456	254 00 0 00 002675 		JRST	SCAN		;YES, EXIT
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 63
KLAD10	MAC	15-Jun-79 10:26		LIST FRONT-END DIRECTORY                                                           SEQ 0081

  2451					;*PNTDIR -  PRINT ONE ENTRY FROM -11 DIRECTORY
  2452
  2453	005457	135 11 0 00 006235 	PNTDIR:	LDB	A,[POINT 16,DIR0(T7),17] ;GET I.NAM1
  2454	005460	302 11 0 00 000000 		CAIE	A,0		;BLANK ENTRY ?
  2455	005461	306 11 0 00 177776 		CAIN	A,177776	;SKIP IF A IS NOT 177776
  2456	005462	263 17 0 00 000000 		RTN			;0 OR -2 MEANS ENTRY IS EMPTY
  2457
  2458	005463	350 11 0 00 005763 		AOS	A,ENTRYC
  2459	005464	260 17 0 00 005541 		GO	PTSIZE		;PRINT ENTRY COUNT
  2460	005465	260 17 0 00 005644 		GO	PNTTAB		;INSERT A TAB
  2461
  2462	005466	135 11 0 00 006235 		LDB	A,[POINT 16,DIR0(T7),17] ;GET I.NAM1
  2463	005467	260 17 0 00 005526 		GO	R50OUT		;GO CONVERT & PRINT
  2464
  2465	005470	135 11 0 00 006236 		LDB	A,[POINT 16,DIR0(T7),35] ;GET I.NAM2
  2466	005471	260 17 0 00 005526 		GO	R50OUT
  2467
  2468	005472	201 14 0 00 000056 		MOVEI	D,"."		;INSERT A DOT
  2469	005473	260 17 0 00 005650 		GO	TTYO
  2470
  2471	005474	135 11 0 00 006237 		LDB	A,[POINT 16,DIR1(T7),17] ;GET I.EXT
  2472	005475	260 17 0 00 005526 		GO	R50OUT
  2473	005476	260 17 0 00 005644 		GO	PNTTAB		;INSERT A TAB
  2474
  2475	005477	550 11 0 07 000003 		HRRZ	A,DIR3(T7)	;RH OF WD ALLOCATED
  2476	005500	554 13 0 07 000003 		HLRZ	C,DIR3(T7)	;LH OF WD ALLOCATED
  2477	005501	137 13 0 00 006276 		DPB	C,[POINT 16,A,19];RH+LH IN A
  2478	005502	231 11 0 00 000400 		IDIVI	A,^D256		;CONVERT IT INTO BLK #
  2479	005503	332 00 0 00 000012 		SKIPE	B		;EXACT ?
  2480	005504	271 11 0 00 000001 		ADDI	A,1		;NO, ROUND UP
  2481	005505	272 11 0 00 005770 		ADDM	A,TOTALC	;ADD TO TOTAL
  2482	005506	260 17 0 00 005541 		GO	PTSIZE		;GO PRINT SIZE
  2483	005507	260 17 0 00 005644 		GO	PNTTAB		;INSERT A TAB
  2484
  2485	005510	550 11 0 07 000004 		HRRZ	A,DIR4(T7)	;RH OF WD WRITTEN
  2486	005511	554 13 0 07 000004 		HLRZ	C,DIR4(T7)	;LH OF WD WRITTEN
  2487	005512	137 13 0 00 006276 		DPB	C,[POINT 16,A,19];RH+LH IN A
  2488	005513	231 11 0 00 000400 		IDIVI	A,^D256		;CONVERT IT INTO BLK #
  2489	005514	332 00 0 00 000012 		SKIPE	B		;EXACT ?
  2490	005515	271 11 0 00 000001 		ADDI	A,1		;NO, ROUND UP
  2491	005516	272 11 0 00 005771 		ADDM	A,TOTWT		;ADD TO TOTAL
  2492	005517	260 17 0 00 005541 		GO	PTSIZE		;GO PRINT SIZE
  2493	005520	260 17 0 00 005644 		GO	PNTTAB		;INSERT A TAB
  2494
  2495	005521	135 01 0 00 006240 		LDB	T1,[POINT 16,DIR1(T7),35] ;GET DATE
  2496	005522	260 17 0 00 005563 		GO	PTDATE		;PRINT DATE
  2497
  2498	005523	403 00 0 00 000011 		SETZB	0,A		;ZERO A
  2499	005524	260 17 0 00 005630 		GO	PRINT		;INSERT CR, LF
  2500	005525	263 17 0 00 000000 		RTN			;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 64
KLAD10	MAC	15-Jun-79 10:26		LIST FRONT-END DIRECTORY                                                           SEQ 0082

  2501					;*DO THE CONVERSION AND PRINT
  2502
  2503	005526	322 11 0 00 005532 	R50OUT:	JUMPE	A,PRTNAM	;IF A = 0, PRINT 3 SPACES
  2504	005527	306 11 0 00 177776 		CAIN	A,177776	;SKIP IF A IS NOT 177776
  2505	005530	263 17 0 00 000000 		RTN			;DON'T PRINT IF A IS 177776 OR 0
  2506
  2507	005531	260 17 0 00 005253 		GO	R50SIX		;CONVERT R50 TO SIXBIT
  2508
  2509	005532	200 12 0 00 006241 	PRTNAM:	MOVE	B,[POINT 6,A,17];TYPE JUST RH OF A
  2510
  2511	005533	134 14 0 00 000012 	LEFT:	ILDB	D,B
  2512	005534	271 14 0 00 000040 		ADDI	D,40
  2513	005535	260 17 0 00 005650 		GO	TTYO		;PRINT
  2514
  2515	005536	603 12 0 00 770000 		TLNE	B,770000
  2516	005537	254 00 0 00 005533 		JRST	LEFT
  2517
  2518	005540	263 17 0 00 000000 		RTN	
  2519
  2520					;*PRINT FILE SIZE IN TERMS OF BLOCK #
  2521
  2522	005541	305 11 0 00 000144 	PTSIZE:	CAIGE	A,^D100		;> 100 ?
  2523	005542	260 17 0 00 005647 		GO	SPACE		;NO
  2524
  2525	005543	305 11 0 00 000012 		CAIGE	A,^D10		;> 10 ?
  2526	005544	260 17 0 00 005647 		GO	SPACE		;NO
  2527
  2528	005545	254 00 0 00 005550 		JRST	DECPT1
  2529
  2530	005546	307 11 0 00 000011 	DECPT2:	CAIG	A,11
  2531	005547	260 17 0 00 005561 		GO	ZEROUT		;OUTPUT ZERO
  2532
  2533	005550	201 14 0 00 000012 	DECPT1:	MOVEI	D,12
  2534	005551	202 14 0 00 002643 		MOVEM	D,RADIX		;SAVE IT AS DIVIDEND
  2535
  2536	005552	230 11 0 00 002643 	OLOOP:	IDIV	A,RADIX
  2537	005553	506 12 0 17 000000 		HRLM	B,0(P)		;SAVE REMAINDER
  2538	005554	332 00 0 00 000011 		SKIPE	A		;EXACT ?
  2539	005555	260 17 0 00 005552 		GO	OLOOP		;NO
  2540
  2541	005556	554 14 0 17 000000 		HLRZ	D,0(P)		;GET REMAINDER
  2542	005557	271 14 0 00 000060 		ADDI	D,"0"
  2543	005560	254 00 0 00 005650 		JRST	TTYO		;GO PRINT IT
  2544
  2545	005561	201 14 0 00 000060 	ZEROUT:	MOVEI	D,"0"		;OUTPUT ZERO
  2546	005562	254 00 0 00 005650 		JRST	TTYO
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 65
KLAD10	MAC	15-Jun-79 10:26		LIST FRONT-END DIRECTORY                                                           SEQ 0083

  2547					;*PRINT DATE IN THE FORM OF DD-MON-YR
  2548
  2549	005563	327 01 0 00 005565 	PTDATE:	JUMPG	T1,DATE1	;DATE FIELD BLANK ?
  2550
  2551	005564	263 17 0 00 000000 	NODATE:	RTN			;NO DATE
  2552
  2553	005565	261 17 0 00 000003 	DATE1:	PUT	T3		;SAVE DATE
  2554	005566	231 01 0 00 000037 		IDIVI	T1,^D31		;GET DAY OF YEAR
  2555	005567	201 11 0 02 000001 		MOVEI	A,1(T2)		;SAVE REMAINDER
  2556	005570	260 17 0 00 005546 		GO	DECPT2		;GO PRINT
  2557
  2558	005571	231 01 0 00 000014 		IDIVI	T1,^D12		;GET MONTH OF YEAR
  2559	005572	200 11 0 02 005604 		MOVE	A,MONTAB(T2)	;GET MONTH FROM TABLE
  2560	005573	201 12 0 00 000000 		MOVEI	B,0
  2561	005574	201 15 0 00 000011 		MOVEI	E,A		;SAVE IT IN E
  2562	005575	260 17 0 00 005623 		GO	PNTMON		;PRINT MONTH
  2563
  2564	005576	201 11 0 01 000100 		MOVEI	A,^D64(T1)	;GET YEAR
  2565	005577	301 11 0 00 000144 		CAIL	A,^D100		;GET YEAR IN CENTURY
  2566	005600	275 11 0 00 000144 		SUBI	A,^D100
  2567	005601	260 17 0 00 005546 		GO	DECPT2		;PRINT YEAR AND RETURN
  2568
  2569	005602	262 17 0 00 000003 		GET	T3
  2570	005603	263 17 0 00 000000 		RTN			;EXIT
  2571
  2572	005604	055 112 101 116 055 	MONTAB:	ASCII	/-JAN--FEB--MAR--APR--MAY--JUN-/
  2573	005605	055 106 105 102 055 
  2574	005606	055 115 101 122 055 
  2575	005607	055 101 120 122 055 
  2576	005610	055 115 101 131 055 
  2577	005611	055 112 125 116 055 
  2578	005612	055 112 125 114 055 		ASCII	/-JUL--AUG--SEP--OCT--NOV--DEC-/
  2579	005613	055 101 125 107 055 
  2580	005614	055 123 105 120 055 
  2581	005615	055 117 103 124 055 
  2582	005616	055 116 117 126 055 
  2583	005617	055 104 105 103 055 
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 66
KLAD10	MAC	15-Jun-79 10:26		LIST FRONT-END DIRECTORY                                                           SEQ 0084

  2584					;*PRINT FRONT-END DIRECTORY TO TTY
  2585
  2586	005620				PNTHDR:	MOVEI	A,[ASCIZ /
  2587					FRONT-END DIRECTORY
  2588
  2589					ENTRY	FILE   EXT	ALLOCB	WRTB	DATE
  2590	005620	201 11 0 00 006277 	/]
  2591	005621	260 17 0 00 005630 		GO	PRINT		;DO PRINT
  2592
  2593	005622	263 17 0 00 000000 		RTN			;RETURN
  2594
  2595					;*PRINT MONTH
  2596
  2597	005623				TYPE:
  2598	005623	665 15 0 00 440700 	PNTMON:	TLOA	E,(POINT 7,)	;CONVERT TO BYTE POINTER
  2599
  2600	005624	260 17 0 00 005650 	PNTM:	GO	TTYO		;OUTPUT CHARACTER
  2601	005625	134 14 0 00 000015 		ILDB	D,E		;GET NEXT CHARACTER
  2602	005626	326 14 0 00 005624 		JUMPN	D,PNTM		;LOOP UNLESS NULL
  2603
  2604	005627	263 17 0 00 000000 		RTN			;ALL DONE
  2605
  2606					;*THE ACTUAL PRINT ROUTINE TO SEND MESSAGE TO TTY
  2607
  2608	005630	402 00 0 00 002642 	PRINT:	SETZM	PRNTSW		;INIT PRINT SW
  2609	005631	505 11 0 00 440700 		HRLI	A,440700	;INIT A
  2610
  2611	005632	134 14 0 00 000011 	PRINTT:	ILDB	D,A		;GET ONE CHARACTER
  2612	005633	322 14 0 00 005636 		JUMPE	D,CRLF		;IF NULL, PROMPT WITH CR/LF
  2613
  2614	005634	260 17 0 00 005650 		GO	TTYO		;OUTPUT CHARACTER
  2615
  2616	005635	254 00 0 00 005632 		JRST	PRINTT		;CONTINUE
  2617
  2618	005636	332 00 0 00 002642 	CRLF:	SKIPE	PRNTSW		;CRLF PROMPTED ?
  2619	005637	263 17 0 00 000000 		RTN			;YES, EXIT
  2620
  2621	005640	476 00 0 00 002642 		SETOM	PRNTSW		;SET PRINT SW
  2622						MOVEI	A,[ASCIZ /
  2623	005641	201 11 0 00 006314 	/]				;THIS IS CR, LF
  2624	005642	505 11 0 00 440700 		HRLI	A,440700
  2625	005643	254 00 0 00 005632 		JRST	PRINTT		;PRINT CR,LF
  2626
  2627	005644	201 14 0 00 000011 	PNTTAB:	MOVEI	D,"	"	;PRINT A TAB
  2628	005645	254 00 0 00 005650 		JRST	TTYO
  2629	005646	260 17 0 00 005647 	SPACE2:	GO	SPACE		;OUTPUT 2 SPACES
  2630	005647	201 14 0 00 000040 	SPACE:	MOVEI	D," "		;OUTPUT 1 SPACE
  2631
  2632	005650	336 00 0 00 002644 	TTYO:	SKIPN	DIRSUM
  2633	005651	051 01 0 00 000014 		TTCALL	1,D		;OUTPUT 1 CHARACTER
  2634	005652	263 17 0 00 000000 		RTN			;RETURN
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 67
KLAD10	MAC	15-Jun-79 10:26		COMMON ERROR ROUTINE                                                               SEQ 0085

  2635					SUBTTL	COMMON ERROR ROUTINE
  2636					;	====================
  2637
  2638	005653	201 00 0 00 006315 	CTRERR:	MOVEI	[ASCIZ	"?NOT AN RP04/RP06 CONTROLLER"]
  2639	005654	254 00 0 00 005673 		JRST	ABORT
  2640
  2641	005655	201 00 0 00 006323 	DEVERR:	MOVEI	[ASCIZ	"?DEVICE SELECTION ERROR"]
  2642	005656	254 00 0 00 005673 		JRST	ABORT
  2643
  2644	005657	201 00 0 00 006330 	HOMERR:	MOVEI	[ASCIZ	"?TOPS-10 HOME BLOCK NOT FOUND"]
  2645	005660	254 00 0 00 005673 		JRST	ABORT
  2646
  2647	005661	201 00 0 00 006336 	SUPERR:	MOVEI	[ASCIZ	"?SUSET. UUO FAILURE"]
  2648	005662	254 00 0 00 005673 		JRST	ABORT
  2649
  2650	005663	201 00 0 00 006342 	THRERR:	MOVEI	[ASCIZ	"?EXCEEDING FRONT-END DIRECTORY SIZE (1500 IN DECIMAL)"]
  2651	005664	254 00 0 00 005673 		JRST	ABORT
  2652
  2653	005665	201 00 0 00 006355 	DIRERR:	MOVEI	[ASCIZ	"?FRONT-END DIRECTORY DOES NOT EXIST"]
  2654	005666	254 00 0 00 005673 		JRST	ABORT
  2655
  2656	005667	201 00 0 00 006365 	ERRCOR:	MOVEI	[ASCIZ	"?CAN'T GET HI-CORE FOR DIRECTORY"]
  2657	005670	254 00 0 00 005673 		JRST	ABORT
  2658
  2659	005671	201 00 0 00 006374 	EDIRER:	MOVEI	[ASCIZ	"?ERROR CREATING DIRECTORY FILE"]
  2660	005672	047 00 0 00 000012 		EXIT
  2661
  2662	005673	051 13 0 00 000000 	ABORT:	TTCALL	13,0		;CLEAR ^O
  2663	005674	255 00 0 00 000000 		JFCL
  2664						OUTSTR	[ASCIZ/
  2665	005675	051 03 0 00 006314 	/]
  2666	005676	051 03 1 00 000000 		OUTSTR	@0
  2667						OUTSTR	[ASCIZ/
  2668	005677	051 03 0 00 006314 	/]
  2669	005700	260 17 0 00 005743 		GO	CMDPNT		;PRINT ERRONEOUS COMMAND LINE
  2670	005701	047 00 0 00 000012 		EXIT
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 68
KLAD10	MAC	15-Jun-79 10:26		COMMON ERROR ROUTINE                                                               SEQ 0086

  2671	005702	201 00 0 00 006403 	WRTERR:	MOVEI	[ASCIZ	"%ERROR WRITING FILE"]
  2672	005703	254 00 0 00 005730 		JRST	WHTFIL
  2673	005704	201 00 0 00 006407 	RADERR:	MOVEI	[ASCIZ	"%ERROR READING FILE"]
  2674	005705	254 00 0 00 005730 		JRST	WHTFIL
  2675	005706	201 00 0 00 006413 	DELERR:	MOVEI	[ASCIZ	"%ERROR DELETING FILE"]
  2676	005707	254 00 0 00 005730 		JRST	WHTFIL
  2677	005710	201 00 0 00 006420 	ILLSW:	MOVEI	[ASCIZ	"%ILLEGAL SWITCH COMBINATION"]
  2678	005711	254 00 0 00 005730 		JRST	WHTFIL
  2679	005712	201 00 0 00 006426 	OPNERR:	MOVEI	[ASCIZ	"%CANNOT OPEN FILE"]
  2680	005713	254 00 0 00 005730 		JRST	WHTFIL
  2681	005714	201 00 0 00 006432 	FLSPER:	MOVEI	[ASCIZ	"%FILE NAME NOT SPECIFIED"]
  2682	005715	254 00 0 00 005730 		JRST	WHTFIL
  2683	005716	201 00 0 00 006437 	LUKERR:	MOVEI	[ASCIZ	"%CANNOT FIND FILE"]
  2684	005717	254 00 0 00 005730 		JRST	WHTFIL
  2685	005720	201 00 0 00 006443 	ENTERR:	MOVEI	[ASCIZ	"%ERROR ENTERING FILE"]
  2686	005721	254 00 0 00 005730 		JRST	WHTFIL
  2687	005722	201 00 0 00 006450 	NOFL10:	MOVEI	[ASCIZ	"%NON-EXISTENT FILE IN TOPS-10 DIRECTORY:"]
  2688	005723	254 00 0 00 005730 		JRST	WHTFIL
  2689	005724	201 00 0 00 006461 	NOFL11:	MOVEI	[ASCIZ	"%NON-EXISTENT FILE IN FRONT-END DIRECTORY:"]
  2690	005725	254 00 0 00 005730 		JRST	WHTFIL
  2691	005726	201 00 0 00 006472 	DIRFUL:	MOVEI	[ASCIZ	"%FRONT-END DIRECTORY IS FULL"]
  2692	005727	254 00 0 00 005730 		JRST	WHTFIL
KLAD10 - DECSYSTEM10 KLAD PACK CREATION PROGRAM, VER 0,3	MACRO %53(1020) 10:27 15-Jun-79 Page 69
KLAD10	MAC	15-Jun-79 10:26		COMMON ERROR ROUTINE                                                               SEQ 0087

  2693	005730	051 13 0 00 000000 	WHTFIL:	TTCALL	13,0		;CLEAR ^O
  2694	005731	255 00 0 00 000000 		JFCL
  2695						OUTSTR	[ASCIZ/
  2696	005732	051 03 0 00 006314 	/]
  2697	005733	051 03 1 00 000000 		OUTSTR	@0		;PRINT ERROR MESSAGE
  2698						OUTSTR	[ASCIZ/
  2699	005734	051 03 0 00 006314 	/]
  2700	005735	332 00 0 00 002633 		SKIPE	EOLSW		;COMPLETED INPUT LINE ?
  2701	005736	254 00 0 00 005741 		JRST	.+3		;YES
  2702	005737	260 17 0 00 003350 		GO	TTYIN		;NO, READ REST OF BAD LINE
  2703	005740	254 00 0 00 005735 		JRST	.-3
  2704
  2705	005741	260 17 0 00 005743 		GO	CMDPNT		;PRINT ERRONEOUS COMMAND LINE
  2706	005742	254 00 0 00 002675 		JRST	SCAN
  2707
  2708	005743	200 11 0 00 001676 	CMDPNT:	MOVE	A,CMDCNT	;PRINT COMMAND LINE COUNT
  2709	005744	260 17 0 00 005541 		GO	PTSIZE
  2710
  2711	005745	260 17 0 00 005644 		GO	PNTTAB
  2712
  2713	005746	201 11 0 00 002572 		MOVEI	A,CMDBUF	;PRINT COMMAND LINE
  2714	005747	260 17 0 00 005630 		GO	PRINT
  2715	005750	263 17 0 00 000000 		RTN
  2716
  2717	005751	201 00 0 00 006500 	KEYERR:	MOVEI	[ASCIZ	"%KEYWORD ERROR OR SWITCH MISSING"]
  2718	005752	254 00 0 00 005730 		JRST	WHTFIL
  2719
  2720	005753	201 00 0 00 006507 	MSGERR:	MOVEI	[ASCIZ	"%ILLEGAL TO CLOBBER FRONT-END FILES WITH /TO10 SWITCH"]
  2721	005754	254 00 0 00 005730 		JRST	WHTFIL
  2722
  2723			002664			END	KLAD10

NO ERRORS DETECTED

PROGRAM BREAK IS 000000
ABSOLUTE BREAK IS 006522
CPU TIME USED 00:10.088

42P CORE USED

A	   127#	   668	   673	   677	   683	   684	   698	   710	   713	   718	   729	   733	   755	   759
	   760	   879	   880	   881	   882	   883	   984	  1000	  1264	  1265	  1309	  1310	  1777	  1779     SEQ 0088
	  1781	  1783	  1867	  1869	  1876	  1877	  1879	  1881	  2111	  2113	  2115	  2117	  2119	  2121
	  2151	  2153	  2155	  2157	  2159	  2161	  2167	  2168	  2169	  2199	  2201	  2203	  2205	  2207
	  2209	  2221	  2231	  2259	  2260	  2264	  2265	  2269	  2271	  2274	  2279	  2280	  2281	  2282
	  2283	  2284	  2426	  2427	  2433	  2439	  2445	  2447	  2453	  2454	  2455	  2458	  2462	  2465
	  2471	  2475	  2477	  2478	  2480	  2481	  2485	  2487	  2488	  2490	  2491	  2498	  2503	  2504
	  2509	  2522	  2525	  2530	  2536	  2538	  2555	  2559	  2561	  2564	  2565	  2566	  2586	  2609
	  2611	  2622	  2624	  2708	  2713
ABORT	  2639	  2642	  2645	  2648	  2651	  2654	  2657	  2662#
ACDEL	   140#	   600	   652	   655	   656	   660
ACDEV	   137#	   443	   444	   445	   460	   461	   462	   510	   511	   512	   531	   532	   533	   600
	   649	   851	   852	   853	  1390	  1391	  1392	  1434	  1435	  1436	  1463
ACEXT	   139#	   449	   466	   516	   537	   538	   539	   601	   662	   857	  1395	  1442	  1461
ACFILE	   138#	   447	   464	   514	   535	   601	   651	   658	   855	  1394	  1438	  1440	  1460
ACPNTR	   141#	   605	   645	   646	   697	   707	   708
ACPPN	   142#	   451	   468	   541	   602	   668	   673	   859	  1397	  1398	  1444	  1463
ADR11	  1498#	  1498	  1501	  1511	  1517
AGAIN	  2167#	  2177
ALL	   382#	   390	   406
ALNSET	   877	  1075	  1701	  2199#
ALO	   485	   845#	  1465
ALOOP	  2223#	  2229
ALOSW	   358#	   937	  1251	  1401	  2139
AREASW	   352#
B	   128#	   985	  1004	  1263	  1302	  1303	  1864	  1872	  1885	  2144	  2146	  2147	  2223	  2224
	  2234	  2235	  2236	  2237	  2238	  2239	  2261	  2266	  2275	  2479	  2489	  2509	  2511	  2515
	  2537	  2560
B11DAT	  1505#	  1518
B11LP	  1474#	  1477	  1479	  1522
B11LPA	  1494#
B11PNT	  1513	  1524#
B11STR	   259	   304#	  1468	  1469	  1470	  1524	  1525	  1526	  1527	  1591	  1607	  1610	  1613	  1616
	  1681
B11SUM	  1484#	  1484	  1531	  1561
BACK	  2131#	  2137
BC	  1428#	  1494	  1495	  1499	  1518
BDF	   245#	   246	  1786
BLKSIZ	   194#	   343	   346
BOOT1	   506	  1431#
BOOTLD	  1451	  1468#
BOOTW0	  1455	  1604#
BOOTWT	  1453	  1570#
BOOTZR	  1631	  1652#
BOTLST	   259#	  1627	  1646
BTSIZE	   193#
BYTE	  1429#	  1477	  1478	  1481	  1484	  1488	  1513	  1538	  1543	  1560	  1561
BYTESV	  1538#	  1538	  1545
C	   129#	   422	   429	   430	   433	   435	   568	   571	   573	   575	   578	   610	   615	   616
	   618	   621	   622	   627	   630	   633	   636	   638	   639	   640	   641	   644	   646	   652
	   665	   671	   679	   680	   684	   689	   690	   694	   700	   701	   702	   703	   706	   708
	   716	   719	   720	   722	   723	   725	   726	   729	   730	   731	   737	   738	   817	   819
	   820	   821	   824	   825	   826	   828	   829	   831	   832	   833	   836	   837	   839	   986
	  1006	  1044	  1045	  1048	  1865	  1884	  2145	  2146	  2163	  2164	  2177	  2225	  2258	  2276
	  2476	  2477	  2486	  2487                                                                                     SEQ 0089
C0ERR	  1489	  1725#
C1ERR	  1482	  1722#
CCLBLK	   533	   544	   546	   595#
CCLDIR	   535	   539	   541	   551	   597#
CHKCNT	  1030#
CHRSAV	  1555#	  1555	  1564	  1565	  1566	  1567
CK11SU	  1520	  1528#
CKSERR	  1534	  1731#
CL.DLL	   864	  1061	  1598	  1687	  2332
CMDBUF	   349#	   409	  2713
CMDCNT	   308#	   408	  2708
CMDPNT	  2669	  2705	  2708#
CMDPTR	   410#	   410	   819
COMEND	  1044#	  1323
COMEXT	  2129	  2135#
COMPRS	   726#	   726	   730
COVERT	  2097#	  2141
CPOPJ	  1499	  2108#
CPOPJ1	   920	  1135	  1186	  1221	  1562	  1944	  1957	  1972	  1984	  2000	  2012	  2023	  2036	  2106#
	  2184
CRLF	  2612	  2618#
CTLROK	  1812	  1815#
CTLSER	   524	   590#	   642	   666	   672	   715
CTRERR	  1813	  2638#
CTYPF	   217#	   420	   457	   603	   625
CYLADD	   286#	  1609	  1902	  2191	  2347
D	   130#	   727	   734	   761	   987	  1008	  1261	  1296	  1301	  1325	  2225	  2227	  2275	  2276
	  2468	  2511	  2512	  2533	  2534	  2541	  2542	  2545	  2601	  2602	  2611	  2612	  2627	  2630
	  2633
DAT	   147#	  2020	  2398
DATBUF	   255	   336#	  1262	  1326
DATDEV	   209	   296#	  1804	  1825
DATE1	  2549	  2553#
DATEND	   337#
DATLST	   255#	  1321
DC.UNT	  1816
DECPT1	  2528	  2533#
DECPT2	  2530#	  2556	  2567
DECVER	     3#	    10	    26
DELERR	  1411	  2675#
DELETE	   494	  1387#
DELNAM	  1410	  1420#
DEVERR	  1808	  1823	  1828	  2641#
DEVICE	   631	   649#
DEVSTR	   503	  1799#
DEVSW	   293#	  1751	  1765	  1853
DIAGNO	   265#
DIR	   150#	  1981	  1992	  1999	  2397
DIR0	   162#	  2187	  2188	  2201	  2205	  2453	  2462	  2465
DIR1	   163#	  2189	  2209	  2212	  2471	  2495
DIR11	   500	  1748#
DIR2	   165#	  2097	  2099	  2101	  2192	  2194	  2196
DIR3	   166#	   881	   883	  1079	  1081	  1704	  1706	  2475	  2476                                             SEQ 0090
DIR4	   169#	  1084	  1086	  1709	  1711	  2144	  2145	  2485	  2486
DIR5	   172#
DIR6	   174#
DIR7	   176#	  2190
DIRBUF	   253	   339#	  1867
DIRDEV	   210	   295#	  1803	  1805	  1820
DIRERR	   846	   924	  1226	  1388	  1432	  2405	  2653#
DIRETY	   873	  1073	  1699	  2187#
DIRFST	   285#	  2090
DIRFUL	   871	  1068	  1694	  2691#
DIRLOG	   284#	  1864	  2089
DIRLP	  1872#	  1885
DIRLST	   253#	  1999
DIRNCB	   290#	  1789	  1860	  1865	  2092	  2123	  2163	  2317	  2323	  2356	  2409	  2426
DIRSUM	   364#	   810	  2421	  2632
DIRSW	   292#	   845	   923	  1225	  1387	  1431	  1766	  1793	  1858	  2298	  2404
DO11	  1322	  1325#
DONE	  1268	  1329#
DONESW	   353#	  1246	  1267	  1305
DOPUT	  1273	  1292#
DSKUPN	   210#	  1938	  1978	  2006	  2017	  2030
E	   131#	   753	   760	  2221	  2223	  2228	  2423	  2430	  2436	  2442	  2561	  2598	  2601
E10ALC	   211#	  1181
E10STS	   212#	  1178
E11ALC	   213#	   915
E11STS	   214#	   912
EBOTER	  1588	  1678	  1740#
EDIRER	  2321	  2659#
ENDALL	   271	   424	   566	  2298#
ENDBLK	   340#
ENDHOM	   301#	  2381
ENTBLK	   211	   212	   346#	  1151	  1154	  1159	  1162	  1165	  1167	  1169	  1172	  1175	  1183	  1208
	  1211	  1213	  1216	  1218	  2060	  2062
ENTERR	   862	   976	  1259	  2685#
ENTRYC	  2413#	  2413	  2433	  2458
EOF	  1023	  1056#
EOFERR	  1475	  1487	  1509	  1529	  1537	  1541	  1719#
EOFSW	   354#	   978	   991	  1002	  1020	  1027	  1051	  1244	  1472	  1552
EOLSW	   355#	   838	   840	  2700
ER.ICC	   272
ERRCOR	  1915	  1924	  1928	  2656#
ETER10	   975	  1138#	  1587	  1677	  2320
EXTION	   282#	  2121	  2136	  2161	  2181
EXTLEN	  1347	  1383#
EXTSW	   356#	   962	   993	  1108	  1196	  1272	  1345	  1354	  1360	  1446
FB	  1427#	  1473	  1548	  1549	  1550	  1560
FILEXT	  1349	  1369#	  1383
FILLOG	   283#	  1065	  1070	  1247	  1264	  1691	  1696	  2143
FILNAM	   281#	  2113	  2117	  2128	  2153	  2157	  2173
FILNCB	   289#	   972	  1077	  1263	  2147
FLSPER	   458	   929	   932	  1232	  1235	  2681#
FOUND	  1352	  1358#
FR	   143#	   420	   457	   603	   625                                                                             SEQ 0091
FREE	  2170	  2184#
FSTSW	   361#	   982	   992	  1018
G11BY1	  1555#
G11BY2	  1550	  1560#
G11BYT	  1474	  1486	  1508	  1528	  1536	  1540	  1548#
G11WD	  1491	  1497	  1536#
GET10	   989	  1001	  1005	  1007	  1027#	  1040	  1551
GET10Z	  1028	  1036#
GET11	  1270	  1296#	  1327
GETARE	   744	   788#
GETBK1	   866	  2045#
GETBK2	  1064	  1604	  1690	  2056#	  2336
GETBT1	   748	   801#
GETBUF	   334#	  2067	  2070	  2071
GETDE1	   688#	   695
GETDE2	   689#
GETDEC	   687#	   752
GETDEV	   746	   796#
GETIC1	   615#
GETIOC	   608#	   613	   647	   675	   757
GETLST	   750	   807#
GETMOD	   742	   780#
GETOC1	   678#	   685
GETOC2	   679#
GETOCT	   664	   670	   677#
GETPPN	   637	   664#
GETSI1	   699#	   709
GETSI2	   700#
GETSI3	   704	   710#
GETSIX	   697#	   714	   781	   789	   796	   801	   807
GETSW	   628	   712#
GETSW1	   739	   755#	   783	   785	   791	   793	   799	   805	   811
GOARND	  2054	  2065#
GOBACK	  1303	  1307#
H10LST	   257#	  2375	  2390
HADSW	   359#	   979	  1245
HALF	   246#	  2131	  2176	  2419
HDQ	  1834	  1838#
HEAD10	   205	   206	   344#	  1101
HEDBLK	   207	   208	   347#	  1138	  1189
HMBK01	   197#	  1848	  2360
HMBK10	   201#	  2366
HOLD	   244#	  1761
HOM	   151#	  1619	  1627	  1638	  1646	  1941	  1949	  1956	  1964	  1971	  2368	  2375	  2383	  2390
	  2399
HOMB10	   257	   299#
HOMBF1	   298#	  2380
HOMBF2	   300#	  2380
HOMBPC	   249#	  2074
HOMBUF	   248	   249	   251	   297#	  1772	  1776	  1854	  2081	  2340
HOMCLP	   248#	  2072
HOMERR	  1774	  2644#
HOMLST	   251#	  1956	  1971                                                                                             SEQ 0092
I.DEV	   329#	   462	  1104	  1392	  1436
I.EXT	   331#	   466	  1123	  1346	  1395	  1442	  2119
I.NAM1	   330#	   464	   928	  1120	  1231	  1394	  1440	  1573	  1748	  2111	  2115
I.PPN	   332#	   468	  1126	  1398	  1444
I.STR	   328#
IENTRY	  2123#
ILLSW	   927	  1229	  1356	  1362	  1749	  1800	  2677#
IN10	  1031	  1039#
IN11	  1297	  1309#
INDIRE	   426	   602#	   602	   612
INTCOR	  1791	  1862	  1913#
INTLOC	    23	   271#
JBFFRC	   366#	  1058	  1116	  1415
JBFFWC	   365#	  1203	  1333
JNKERR	  1558	  1734#
KEYERR	   438	   481	   508	   735	   786	   794	   797	   803	   809	   849	  2717#
KLAD10	   387#	  2723
KLFEDD	   262#
LEFT	  2511#	  2516
LOGBLK	   202#	  1312	  1639	  1990
LOGPHY	   868	  1071	  1606	  1697	  1901#	  2338
LOOK10	   213	   214	   343#	   895	   898	   903	   906	   909	   917	   946	   952	   955	   957	   960
	  1121	  1124	  1127	  1130	  1132	  1666	  1669	  1671	  2049	  2051
LOOP	  1349#	  1350
LOOP1	   989#	  1021
LOOP2	  1267#	  1293
LSTDIR	   497	  2404#
LT6ERR	  1495	  1728#
LUKERR	   944	  1406	  1449	  2683#
MCNVER	     4#	    10	    26
MNTBIT	   306#	   394	  1313	  1637	  1815	  1818	  1991
MONTAB	  2559	  2572#
MSGERR	  1238	  1240	  2720#
NAME1	   419	   455	   600#
NAME2	   634	   651#
NAME3	   605#	   653
NEXT	  2376	  2380#
NEXT1	  2391	  2397#
NODATE	  2551#
NODEV	  1752	  1761#
NOFL10	  1133	  2052	  2063	  2687#
NOFL11	   938	  1252	  1402	  2689#
NWORDS	   291#	   980	  1019	  1083
O.DATE	   324#	   876	   956	   958	  1164	  1166	  1670	  1672	  2211
O.DEV	   319#	   445	   512	   853	   888	  1140	  1192	  1571	  1653	  2304
O.EXT	   321#	   449	   516	   857	   897	  1153	  1210	  1577	  1659	  2159	  2207	  2310
O.NAM1	   320#	   447	   514	   855	   894	   931	  1150	  1207	  1234	  1574	  1656	  2151	  2155	  2199
	  2203	  2307
O.PPN	   323#	   451	   518	   859	   900	  1156	  1215	  1237	  1579	  1661	  2312
O.PRT	   322#	   950	  1161	  1582	  1664	  2315
O.STR	   318#	   404	   405
O.TIME	   325#	   953	  1168	  1667
O.VER	   326#	   947	  1171                                                                                             SEQ 0093
OFF	  1340	  1360#
OLOOP	  2536#	  2539
ON	  1343	  1354#
OPEN10	   342#	   889	   891	  1102	  1105	  1110	  1112
OPNALO	   861	   888#
OPNBLK	   345#	  1139	  1141	  1143	  1145	  1190	  1193	  1198	  1200
OPNDAT	  1845	  2016#
OPNDIR	  1839	  1977#
OPNELN	  1189#	  1258
OPNERR	  1255	  1840	  1843	  1846	  2046	  2057	  2679#
OPNHOM	  1842	  1937#
OPNTEN	   943	  1101#	  1405	  1448
OPRCDP	  1254	  2029#	  2045	  2056
OPWCDP	  2005#
P	   133#	   156	   157	   158	   159	   392	  2106	  2537	  2541
PDLIST	   279#	   392
PHYDEV	   209#
PHYLOG	  1859	  2081#
PNTDIR	  2417	  2453#
PNTHDR	  2407	  2586#
PNTM	  2600#	  2602
PNTMON	  2562	  2598#
PNTTAB	  2460	  2473	  2483	  2493	  2627#	  2711
PRIME	   247#	  2065
PRINT	  2448	  2499	  2591	  2608#	  2714
PRINTT	  2611#	  2616	  2625
PRNTSW	   362#	  2608	  2618	  2621
PRTNAM	  2503	  2509#
PTDATE	  2496	  2549#
PTRTAB	  1560	  1564#
PTSIZE	  2428	  2434	  2440	  2446	  2459	  2482	  2492	  2522#	  2709
PUT10	  1012	  1090#	  1280	  1284	  1288	  1292	  1594	  1684	  2328
PUTBUF	  1091	  1096#
PUTNXT	  1093#	  1097
PUTWRD	   994	  1012#
R50OT1	  2262	  2267	  2270	  2274#
R50OT2	  2275	  2279#
R50OUT	  2463	  2466	  2472	  2503#
R50SIX	  2257#	  2507
R50TAB	  2279	  2280	  2281	  2282	  2283	  2284	  2286#
RADDIR	  1873	  1989#
RADERR	  1046	  1851	  1874	  2378	  2673#
RADHOM	  1850	  1948#
RADIX	   363#	  2534	  2536
RC	   148#	  1039	  1044	  1056	  1057	  1112	  1118	  1132	  1314	  1321	  1329	  1330	  1408	  1410
	  1413	  2033	  2051	  2062	  2065	  2067
ROM406	   357#	   804	  1633
RP.ABC	   911	  1177
RP.NFS	   911	  1177
S.ALO	   369#	   484	   848	   879	   914	   973	  1180	  1458	  1585	  1675	  2318
S.ARE	   376#	   743	   788
S.ASC	   375#	  1342	  1361
S.BIN	   374#	  1339	  1355                                                                                             SEQ 0094
S.BT1	   378#	   505	   747
S.CRE	   380#	   499	  1762	  1785	  1799
S.DEL	   373#	   493
S.DEV	   379#	   502	   745	   798	  1802
S.ELN	   370#	   472	   487	  1228
S.LST	   381#	   496	   528	   749
S.MOD	   377#	   741	   780
S.REP	   372#	   475	   490	   934
S.SWH	   368#	   753	   759
S.TEN	   371#	   478	   926
SAVEA	  1869#	  1869	  1877	  1881
SAVET7	  1870#	  1870	  1878	  1882
SAVSWC	   716#	   716	   737
SCAN	   404#	   423	   557	   885	  1088	  1335	  1418	  1759	  1795	  1856	  1887	  2450	  2706
SCAN1P	   434	   436	   484#
SCAN2P	   431	   443#
SCAN3P	   460#	   520
SCTADD	   288#	  1615	  1907	  2195	  2353
SEARCH	   941	  1256	  1339#
SETSW	   732	   759#
SIXR50	  1778	  1782	  2112	  2116	  2120	  2152	  2156	  2160	  2200	  2204	  2208	  2220#
SLOOP	  2417#	  2420
SPACE	  2523	  2526	  2629	  2630#
SPACE2	  2629#
SRHDIR	   870	  1067	  1693	  2151#
SRHEXT	  2174	  2180#
START	   278#	   388	   389
SU.SBL	  1316	  1622	  1641	  1951	  1966	  1994	  2370	  2385
SU.SCH	  1315	  1621	  1640	  1950	  1965	  1993	  2369	  2384
SU.SOT	   216#	  1618	  1636	  1963	  2382
SUPERR	  1319	  1625	  1644	  1954	  1969	  1997	  2373	  2388	  2647#
SWTBL	   729	   765#	   778
SWTLEN	   718	   778#
T0	   117#	  2220	  2226	  2227	  2231	  2257	  2258	  2271
T1	   118#	   389	   390	   393	   394	   405	   406	   409	   410	   875	   876	   888	   889	   894
	   895	   897	   898	   900	   901	   902	   903	   905	   906	   908	   909	   911	   912	   914
	   915	   946	   947	   949	   950	   952	   953	   955	   956	   957	   958	   960	   965	   966
	   968	   969	   971	   972	   973	  1014	  1016	  1019	  1058	  1059	  1065	  1070	  1101	  1102
	  1104	  1105	  1107	  1109	  1110	  1115	  1116	  1120	  1121	  1123	  1124	  1126	  1127	  1129
	  1130	  1138	  1139	  1140	  1141	  1142	  1143	  1150	  1151	  1153	  1154	  1156	  1157	  1158
	  1159	  1161	  1162	  1164	  1165	  1166	  1167	  1168	  1169	  1171	  1172	  1174	  1175	  1177
	  1178	  1180	  1181	  1189	  1190	  1192	  1193	  1195	  1197	  1198	  1202	  1203	  1207	  1208
	  1210	  1211	  1215	  1216	  1237	  1239	  1311	  1313	  1315	  1316	  1318	  1333	  1334	  1346
	  1349	  1415	  1416	  1469	  1470	  1492	  1494	  1498	  1531	  1532	  1543	  1544	  1545	  1570
	  1571	  1573	  1574	  1576	  1577	  1581	  1582	  1584	  1585	  1618	  1621	  1622	  1624	  1636
	  1637	  1640	  1641	  1643	  1652	  1653	  1655	  1656	  1658	  1659	  1663	  1664	  1666	  1667
	  1669	  1670	  1671	  1672	  1674	  1675	  1691	  1696	  1751	  1752	  1761	  1762	  1772	  1773
	  1785	  1786	  1788	  1789	  1805	  1807	  1810	  1816	  1820	  1822	  1825	  1827	  1860	  1901
	  1902	  1917	  1918	  1919	  1920	  1922	  1923	  1930	  1933	  1948	  1950	  1951	  1953	  1963
	  1965	  1966	  1968	  1989	  1991	  1993	  1994	  1996	  2005	  2009	  2029	  2033	  2048	  2049
	  2059	  2060	  2070	  2071	  2072	  2073	  2074	  2075	  2086	  2088	  2101	  2103	  2188	  2189
	  2190	  2211	  2212	  2303	  2304	  2306	  2307	  2309	  2310	  2314	  2315	  2317	  2318	  2367
	  2369	  2370	  2372	  2380	  2381	  2382	  2384	  2385	  2387	  2495	  2549	  2554	  2558	  2564     SEQ 0095
T10	   125#	  2127	  2128	  2135	  2136	  2172	  2173	  2180	  2181
T16	   126#	  1262	  1299	  1300	  1326	  1501	  1502	  1505	  1516	  1524	  1525	  1526	  1527	  1590
	  1596	  1680	  1686	  2323	  2324	  2330
T2	   119#	   967	   970	   984	   985	   986	   987	   999	  1009	  1077	  1078	  1079	  1080	  1081
	  1083	  1084	  1085	  1086	  1277	  1278	  1282	  1286	  1290	  1314	  1315	  1347	  1349	  1350
	  1352	  1511	  1512	  1513	  1515	  1619	  1621	  1638	  1640	  1703	  1704	  1705	  1706	  1708
	  1709	  1710	  1711	  1787	  1802	  1803	  1804	  1810	  1811	  1812	  1815	  1817	  1818	  1854
	  1855	  1904	  1905	  1949	  1950	  1964	  1965	  1992	  1993	  2006	  2030	  2084	  2085	  2087
	  2099	  2100	  2102	  2368	  2369	  2383	  2384	  2555	  2559
T3	   120#	  1000	  1004	  1006	  1008	  1009	  1033	  1036	  1052	  1093	  1277	  1278	  1282	  1286
	  1290	  1299	  1310	  1312	  1316	  1555	  1556	  1557	  1593	  1609	  1610	  1612	  1613	  1615
	  1616	  1620	  1622	  1639	  1641	  1683	  1848	  1872	  1907	  1951	  1966	  1990	  1994	  2007
	  2031	  2082	  2083	  2087	  2088	  2089	  2090	  2097	  2098	  2102	  2103	  2143	  2191	  2192
	  2193	  2194	  2195	  2196	  2327	  2341	  2343	  2344	  2345	  2347	  2348	  2350	  2351	  2353
	  2354	  2356	  2357	  2360	  2366	  2370	  2385	  2553	  2569
T4	   121#	  2091	  2092
T5	   122#	  1427	  1937	  1941	  1977	  1981	  2016	  2020	  2123	  2124	  2132	  2409	  2410	  2420
T6	   123#	  1428	  1938	  1978	  2017
T7	   124#	   881	   883	   939	  1079	  1081	  1084	  1086	  1403	  1429	  1591	  1593	  1595	  1681
	  1683	  1685	  1704	  1706	  1709	  1711	  1776	  1779	  1783	  1868	  1870	  1876	  1878	  1880
	  1882	  1939	  1979	  2018	  2081	  2082	  2084	  2086	  2091	  2097	  2099	  2101	  2125	  2127
	  2131	  2135	  2144	  2145	  2165	  2167	  2172	  2176	  2180	  2187	  2188	  2189	  2190	  2192
	  2194	  2196	  2201	  2205	  2209	  2212	  2325	  2327	  2329	  2340	  2343	  2344	  2345	  2348
	  2351	  2354	  2357	  2411	  2419	  2453	  2462	  2465	  2471	  2475	  2476	  2485	  2486	  2495
TABA	  2225	  2234#
TABB	  2234	  2235	  2236	  2237	  2238	  2239	  2241#
TERM	   617	   619	   623	   655#
TERM1	   657	   660#
THRERR	  1763	  2650#
TLOOP	  2127#	  2132
TO10IC	   205#	  1030
TO10IP	   206#	  1033
TO10OC	   207#	  1090
TO10OP	   208#	  1093
TOELV1	   488	   491	   510#
TOELVN	   473	   476	   923#
TOOBIG	  1506	  1716#
TOTALC	  2414#	  2414	  2439	  2481
TOTEN	   479	  1225#
TOTWT	  2415#	  2415	  2445	  2491
TRDSW	   360#	   981	  1003	  1015
TRKADD	   287#	  1612	  1905	  2193	  2350
TTYIN	   608	   678	   688	   699	   814#	   820	   822	   834	  2702
TTYIN1	   584	   819#
TTYO	  2469	  2513	  2543	  2546	  2600	  2614	  2628	  2632#
TYPE	  2425	  2432	  2438	  2444	  2597#
UPDATE	  1067#
USRHDQ	  1834#
USRHPQ	  1830#
VINPUT	   936	  1249	  1400	  2111#
WC	   149#	   864	   891	   917	  1061	  1062	  1096	  1145	  1148	  1183	  1200	  1205	  1218	  1331
	  1332	  1598	  1599	  1687	  1688	  2009	  2332	  2333
WHTFIL	   593	  1717	  1720	  1723	  1726	  1729	  1732	  1735	  1738	  1741	  1744	  2672	  2674	  2676     SEQ 0096
	  2678	  2680	  2682	  2684	  2686	  2688	  2690	  2692	  2693#	  2718	  2721
WORD61	   180#
WORD62	   181#
WORD63	   182#
WORD64	   183#
WORD65	   185#	  1779	  1783
WORD66	   186#	  1855	  2082	  2084	  2086	  2343	  2344	  2345	  2348	  2351	  2354
WORD67	   187#	  2091	  2357
WRNGBT	  1439	  1743#
WRTERR	  1098	  1629	  1648	  2362	  2393	  2671#
WRTHOM	  1963#	  2361
WTDIR4	  1083#
ZBCNT	  1492	  1737#
ZEROUT	  2531	  2545#
ZESIZE	   192#
$CCL	   427	   523#
$CCLF	   310#	   396#	   396	   411	   523	   526	   814	  1757	  2301
$CCLI1	   559	   562	   568#
$CCLIN	   558#	   582	   815
$CHN	   152#	   546	   549	   551	   561	   564
$CMNTF	   311#	   417#	   417	   574	   576	   579	   581
$ERR	   547	   552	   565	   586#
$IBF	   543	   558	   568	   596#
$LISTF	   312#	   529	   570#	   570
$SJBFF	   555#	   555
.BFCTR	   205	   207
.BFPTR	   206	   208
.DCUPN	   209	   210
.IOASC	  1107	  1195
.IOBIN	  1109	  1142	  1197
.IODMP	  1937	  1977	  2005	  2016	  2029
.JBFF	   554	  1059	  1115	  1202	  1334	  1416
.RBALC	   211	   213
.RBEXT	   898	   955	  1124	  1154	  1165	  1669
.RBNAM	   895	  1121	  1151
.RBPPN	   903	  1127	  1159
.RBPRV	   906	   952	   957	  1162	  1167	  1169	  1666	  1671
.RBSIZ	   960
.RBSTS	   212	   214
.RBVER	   946	  1172

CLOSE	   864	  1056	  1061	  1329	  1331	  1408	  1598	  1687	  2332	  2397	  2398	  2399
CORE	  1914	  1923                                                                                                     SEQ 0097
DATE	   875
DISK.	  1835
DSKCHR	  1807	  1822	  1827
ENTER	   917	  1183	  1218
EXIT	   588	  1758	  2299	  2400	  2660	  2670
GET	   159#	   755	   756	  1930	  2264	  2269	  2569
GETSTS	  1044
GO	   156#	   419	   455	   608	   664	   670	   678	   688	   699	   714	   732	   752	   781	   789
	   796	   801	   807	   861	   866	   868	   870	   873	   877	   936	   941	   943	   975	   989
	  1001	  1005	  1007	  1012	  1064	  1067	  1071	  1073	  1075	  1249	  1254	  1256	  1258	  1270
	  1280	  1284	  1288	  1292	  1400	  1405	  1448	  1451	  1453	  1455	  1474	  1486	  1491	  1497
	  1508	  1520	  1528	  1536	  1540	  1551	  1587	  1594	  1604	  1606	  1631	  1677	  1684	  1690
	  1693	  1697	  1699	  1701	  1778	  1782	  1791	  1839	  1842	  1845	  1850	  1859	  1862	  1873
	  2045	  2056	  2112	  2116	  2120	  2141	  2152	  2156	  2160	  2200	  2204	  2208	  2262	  2267
	  2270	  2320	  2328	  2336	  2338	  2361	  2407	  2417	  2425	  2428	  2432	  2434	  2438	  2440
	  2444	  2446	  2448	  2459	  2460	  2463	  2466	  2469	  2472	  2473	  2482	  2483	  2492	  2493
	  2496	  2499	  2507	  2513	  2523	  2526	  2531	  2539	  2556	  2562	  2567	  2591	  2600	  2614
	  2629	  2669	  2702	  2705	  2709	  2711	  2714
HALT	  1049
HPQ	  1831
IN	   561	  1039	  1321	  1956	  1999	  2375
INBUF	   549	  1118
INCHWL	   817
INPUT	  2067
LOOKUP	   551	  1132	  2051	  2062
NAME	     7#	    10
OPEN	   546	   891	  1112	  1145	  1200	  1941	  1981	  2009	  2020	  2033
OUT	  1096	  1627	  1646	  1971	  2390
OUTBUF	  1148	  1205
OUTCHR	   571
OUTSTR	   397	   415	   586	   590	  1754	  1768	  2664	  2666	  2667	  2695	  2697	  2698
POINTR	  1315	  1316	  1621	  1622	  1640	  1641	  1950	  1951	  1965	  1966	  1993	  1994	  2369	  2370
	  2384	  2385
POS	  1315	  1316	  1621	  1622	  1640	  1641	  1950	  1951	  1965	  1966	  1993	  1994	  2369	  2370
	  2384	  2385
PUT	   158#	   712	   713	  1920	  2261	  2266	  2553
RELEAS	  1057	  1062	  1330	  1332	  1413	  1599	  1688	  2333
RENAME	  1410
RESET	   387
RTN	   157#	   661	   663	   681	   691	   711	   762	   842	   892	   918	  1034	  1037	  1053	  1094
	  1113	  1146	  1184	  1219	  1307	  1358	  1364	  1533	  1546	  1553	  1601	  1634	  1649	  1713
	  1909	  1934	  1942	  1959	  1974	  1982	  2002	  2010	  2021	  2025	  2034	  2076	  2093	  2104
	  2108	  2133	  2148	  2178	  2197	  2213	  2232	  2272	  2277	  2456	  2500	  2505	  2518	  2551
	  2570	  2593	  2604	  2619	  2634	  2715
SETUWP	  1927
STATZ	   564
SUSET.	  1318	  1624	  1643	  1953	  1968	  1996	  2372	  2387
USETI	  2065
WID	  1315	  1316	  1621	  1622	  1640	  1641	  1950	  1951	  1965	  1966	  1993	  1994	  2369	  2370
	  2384	  2385
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 1
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0098

     1					;DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT
     2
     3		000003			DECVER=003
     4		000000			MCNVER=000
     5
     6					.TITLE	KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3
     7
     8					.LIST	MC,MD
     9					.DSABL	GBL
    10					.DSABL	REG
    11					.ABS
    12					.ENABL	AMA
    13
    14					;JOHN R. KIRCHOFF
    15					;DECSYSTEM10 DIAGNOSTIC ENGINEERING
    16					;DIGITAL EQUIPMENT CORPORATION
    17					;MARLBORO, MASS. 01752
    18
    19					;FUNCTIONS TO BE PERFORMED BY THIS MODULE ARE:
    20					;
    21					; 1. READ IN RP04/RP06 BOOTSTRAP LOADER (BLOCK 1 - 3)
    22					; 2. READ HOME BLOCK #1
    23					; 3. READ RP04 FILE DIRECTORY FROM HOME BLOCK
    24					; 4. SEARCH FILE DIRECTORY TO GET /KLDCP/
    25					; 5. LOAD KLDCP INTO -11 CORE MEMORY (VIA BINARY LOADER)
    26					; 6. PASS CONTROL TO KLDCP
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 2
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0099

    28					;BIT DEFINITION TABLE
    29
    30		000001				BIT00=1
    31		000002				BIT01=2
    32		000004				BIT02=4
    33		000010				BIT03=10
    34		000020				BIT04=20
    35		000040				BIT05=40
    36		000100				BIT06=100
    37		000200				BIT07=200
    38		000400				BIT08=400
    39		001000				BIT09=1000
    40		002000				BIT10=2000
    41		004000				BIT11=4000
    42		010000				BIT12=10000
    43		020000				BIT13=20000
    44		040000				BIT14=40000
    45		100000				BIT15=100000
    46
    47					;REGISTER DEFINITION
    48
    49		000000				R0=%0
    50		000001				R1=%1
    51		000002				R2=%2
    52		000003				R3=%3
    53		000004				R4=%4
    54		000005				R5=%5
    55		000006				R6=%6
    56		000007				R7=%7
    57		000006				SP=%6
    58		000007				PC=%7
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 3
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0100

    60					;RH11/RP04/RP06 REGISTERS AND BIT DEFINITIONS
    61
    62		000000			RPCS1=0		;OFFSET TO  RH11/RP04 CONTROL & STATUS REG 1
    63		040000			RPTRE=BIT14	;TRANSFER ERROR BIT IN RPCS1
    64		020000			RPMCPE=BIT13	;MASSBUS CONTROL BUS PARITY ERROR BIT IN RPCS1
    65		004000			RPDVA=BIT11	;DRIVE AVAILABLE BIT IN RPCS1
    66		000200			RPRDY=BIT07	;CONTROLLER READY BIT IN RPCS1
    67		000021			RPPRST=21	;READ-IN PRESET FUNCTION IN RPCS1
    68		000023			RPPACK=23	;PACK ACKNOWLEDGE FUNCTION IN RPCS1
    69		000061			RPWTFN=61	;WRITE DATA FUNCTION IN RPCS1
    70		000071			RPRDFN=71	;READ DATA FUNCTION IN RPCS1
    71
    72		000002			RPWC=2		;OFFSET TO RH11/RP04 WORD COUNT REG
    73		000004			RPBA=4		;OFFSET TO RH11/RP04 UNIBUS ADDRESS REG
    74		000006			RPDA=6		;OFFSET TO RH11/RP04 TRACK $ SECTOR ADDRESS REG
    75
    76		000010			RPCS2=10	;OFFSET TO RH11/RP04 CONTROL & STATUS REG 2
    77		000040			RPCLR=BIT05	;CONTROLLER AND MASSBUS CLEAR BIT IN RPCS2
    78
    79		000012			RPDS=12		;OFFSET TO RH11/RP04 DRIVE STATUS REG
    80		100000			RPATA=BIT15	;ATTENTION ACTIVE BIT IN RPDS
    81		040000			RPERR=BIT14	;COMPOSITE ERROR BIT IN RPDS
    82		010000			RPMOL=BIT12	;MEDIUM ON-LINE BIT IN RPDS
    83		000400			RPDPR=BIT08	;DRIVE PRESENT BIT IN RPDS
    84		000200			RPDRY=BIT07	;DRIVE READY BIT IN RPDS
    85		000100			RPVV=BIT06	;VOLUME VALID BIT IN RPDS
    86
    87		000014			RPER1=14	;OFFSET TO RH11/RP04 ERROR REGISTER 1
    88
    89		000032			RPOF=32		;OFFSET TO RH11/RP04 OFFSET REG (CONTAING FMT22)
    90		010000			RPFMT=BIT12	;FMT22 BIT IN RPOF
    91		004000			RPECI=BIT11	;ERROR CORRECTION CODE INHIBIT BIT IN RPOF
    92		002000			RPHCI=BIT10	;HEADER COMPARE INHIBIT BIT IN RPOF
    93
    94		000034			RPDC=34		;OFFSET TO RH11/RP04 DESIRED CYLINDER REG
    95
    96		000044			RPEC1=44	;OFFSET TO RH11/RP04 ECC POSITION REGISTER
    97		000046			RPEC2=46	;OFFSET TO RH11/RP04 ECC PATTERN REGISTER
    98
    99		176700			RPRH11=176700		;RH11 CONTROLLER ADDRESS
   100		000400			BLKSIZ=^D256		;DISK BLOCK SIZE
   101		000020			FDESIZ=^D16		;FILE DIRECTORY ENTRY SIZE
   102		000240			NOP=240			;NO OP
   103		000000			RPBCYL=^D0		;BOOTSTRAP CYLINDER NUMBER
   104		000574			STNO=^D19*^D20		;NO. OF BLOCKS PER CYLINDER
   105		000024			TNO=^D20		;NO. OF BLOCKS PER TRACK
   106		000023			SNO=^D19		;NO. OF BLOCKS PER SECTOR
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 4
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0101

   108					;LOW CORE PARAMETERS
   109
   110		000000				.=0
   111	000000	000240				NOP			;REQUIRED BY ROM BUTTON #2
   112	000002	000431				BR	START		;START THE PROGRAM
   113
   114	000004	000006				.WORD	.+2
   115	000006	000000				HALT			;TIMEOUT, BUS ERROR
   116
   117	000010	000012				.WORD	.+2
   118	000012	000000				HALT			;RESERVED INSTRUCTION
   119
   120
   121	000014	006311			PROL36:	ASL	(R1)		;36 BIT LEFT SHIFT ROUTINE
   122	000016	006161	000002			ROL	2(R1)
   123	000022	006161	000004			ROL	4(R1)
   124	000026	005303				DEC	R3
   125	000030	001371				BNE	PROL36
   126	000032	000207				RTS	PC
   127
   128					;PARAMETERS IN LOCATIONS 60/62 SETUP BY "KLAD10"
   129					;DISK ADDRESS OF SECOND BOOT BLOCK
   130
   131		000060				.=60
   132	000060	123456			BTCYL:	123456			;BOOT CYLINDER
   133	000062	177777			BTTKST:	-1			;BOOT TRACK/SECTOR
   134	000064	000000				0
   135
   136					;INITIALIZATION OF RH11/RP04/RP06
   137
   138					;BM873 ROM READS BLOCK #0 OF CYLINDER #0 IN CORE
   139					;WHICH STARTS EXECUTION AT ABSOLUTE LOCATION 0.  IT IN TURN
   140					;(SEE BELOW) READS NEXT THREE(3) BLOCKS OF SECONDARY
   141					;BOOTSTRAP INTO -11 MEMORY
   142
   143					;WHEN CONTROL PASSED TO THIS ROUTINE FROM ROM, THE REGS CONTAIN:
   144					;R0 = SECTOR NUMBER
   145					;R1 = 176700 (ADDRESS OF RPCS1)
   146					;R2 = WORD COUNT
   147					;R3 = CYLINDER NUMBER
   148					;RPCS2(R1) = UNIT NUMBER
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 5
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0102

   150					;READ SECONDARY BOOTSTRAP INTO CORE
   151
   152	000066	012706	004642		START:	MOV	#STACK,SP		;INIT STACK
   153	000072	016137	000010	004702		MOV	RPCS2(R1),UNIT		;SAVE UNIT NUMBER
   154
   155	000100	013737	000060	004700		MOV	BTCYL,CYLD 		;SET PROPER CYLINDER
   156	000106	013737	000062	004676		MOV	BTTKST,TKST		;SET BOOT TRACK/SECTOR
   157	000114	005037	004672			CLR	OFST			;NO OFFSET FOR 1ST BLOCK
   158
   159					;READ BOOT BLOCKS 2, 3 & 4
   160
   161	000120	012737	001000	004774		MOV	#1000,BUFADR		;CORE ADDRESS IS 1000
   162	000126	004737	000202			JSR	PC,READ			;DO READ
   163
   164	000132	005237	004672			INC	OFST			;INCREMENT OFFSET
   165	000136	012737	002000	004774		MOV	#2000,BUFADR		;CORE ADDRESS IS 2000
   166	000144	004737	000644			JSR	PC,DIKADR		;COMPUTE DISK ADDRESS
   167	000150	004737	000202			JSR	PC,READ			;READ 3RD BOOT BLOCK
   168
   169	000154	005237	004672			INC	OFST			;INCREMENT OFFSET
   170	000160	012737	003000	004774		MOV	#3000,BUFADR		;CORE ADDRESS IS 3000
   171	000166	004737	000644			JSR	PC,DIKADR		;COMPUTE DISK ADDRESS
   172	000172	004737	000202			JSR	PC,READ			;READ IT
   173
   174	000176	000137	001000			JMP	REDHOM			;BOOTSTRAP ALL READ, NOW USE IT
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 6
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0103

   176					;RP04/RP06 READ I/O ROUTINE
   177
   178	000202	010346			READ:	MOV	R3,-(SP)
   179	000204	010446				MOV	R4,-(SP)		;SAVE REGISTERS
   180	000206	012704	000020			MOV	#16.,R4			;SET RETRY COUNT
   181
   182	000212	012701	176700		5$:	MOV	#RPRH11,R1		;ADDR OF RPCS1
   183	000216	012761	000040	000010		MOV	#RPCLR,RPCS2(R1)	;CLEAR DISK
   184	000224	013761	004702	000010		MOV	UNIT,RPCS2(R1)		;SELECT DRIVE
   185	000232	032711	004000			BIT	#RPDVA,@R1		;DRIVE AVAILABLE
   186	000236	001451				BEQ	2$			;NO, ERROR
   187
   188	000240	016102	000012			MOV	RPDS(R1),R2		;CHECK DRIVE STATUS
   189	000244	005102				COM	R2
   190	000246	042702	167077			BIC	#^C<RPMOL!RPDPR!RPDRY!RPVV>,R2
   191	000252	001043				BNE	2$			;ERROR
   192
   193	000254	012702	002000			MOV	#RPHCI,R2		;READ RETRY WITH HCI ?
   194	000260	020427	000010			CMP	R4,#8.
   195	000264	003401				BLE	51$
   196	000266	005002				CLR	R2
   197	000270	010261	000032		51$:	MOV	R2,RPOF(R1)		;SET PROPER BIT IN OFFSET REG
   198
   199	000274	013761	004700	000034		MOV	CYLD,RPDC(R1)		;CYLINDER NO.
   200	000302	013761	004676	000006		MOV	TKST,RPDA(R1)		;TRACK & SECTOR
   201	000310	013761	004774	000004		MOV	BUFADR,RPBA(R1) 	;BUFFER ADDR
   202	000316	012761	177400	000002		MOV	#-BLKSIZ,RPWC(R1)	;LENGTH
   203
   204	000324	012711	000071			MOV	#RPRDFN,@R1		;START READ OPERATION
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 7
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0104

   206					;WAIT FOR DRIVE COMPLETION
   207
   208	000330	032711	060200		1$:	BIT	#<RPTRE!RPMCPE!RPRDY>,(R1)
   209	000334	001775				BEQ	1$		;WAIT FOR COMPLETION OR ERROR
   210
   211	000336	032711	020000			BIT	#<RPMCPE>,(R1)
   212	000342	001007				BNE	2$		;CONTROLLER ERROR
   213
   214	000344	032761	140000	000012		BIT	#<RPATA!RPERR>,RPDS(R1)
   215	000352	001004				BNE	4$		;DISK ERROR
   216
   217	000354	012604			3$:	MOV	(SP)+,R4
   218	000356	012603				MOV	(SP)+,R3	;RESTORE REGISTERS
   219
   220	000360	000207				RTS	PC		;COMPLETED GOOD READ
   221
   222	000362	000000			2$:	HALT			;READ ERROR
   223
   224	000364	005304			4$:	DEC	R4		;RETRY READ ERRORS, 16 TIMES
   225	000366	003775				BLE	2$		;HARD ERROR
   226
   227	000370	032761	077077	000014		BIT	#77077,RPER1(R1) ;IS ERROR - UNS,OPI,DTE,WLE,IAE,AOE,WCF
   228	000376	001371				BNE	2$		 ;FATAL    - FER,PAR,RMR,ILR,ILF ?
   229
   230	000400	032761	000700	000014		BIT	#700,RPER1(R1)	;IS ERROR - HCRC,HCE,ECH ?
   231	000406	001301				BNE	5$		;YES, RETRY VIA REREAD
   232									;NO, TRY ECC CORRECTION
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 8
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0105

   234					;CORRECT BAD DISK READ VIA ECC
   235
   236					;GET ECC POSITION COUNT
   237					;SUBTRACT 1
   238					;DIVIDE BY 18
   239					;	QUOTIENT = WORD IN BUFFER
   240					;	REMAINDER = # OF SHIFTS OF ECC CORRECTION MASK
   241					;GET BAD WORD & NEXT WORD
   242					;SETUP AS A 36-BIT WORD (THATS WHAT THE KLAD DISK IS)
   243					;GET ECC CORRECTION MASK
   244					;LEFT SHIFT CORRECTION WORD # OF SHIFTS GIVEN BY POSITION REMAINDER
   245					;CLEAR ERRONEOUS ONE BITS FROM MASKS
   246					;CLEAR ERRONEOUS ONE BITS FROM BAD WORDS
   247					;SET DROPPED BITS
   248					;PUT CORRECTED WORDS BACK IN DATA BUFFER
   249
   250	000410	012702	004652		6$:	MOV	#ECWRD0,R2
   251	000414	005022				CLR	(R2)+		;CLEAR ECWRD0
   252	000416	005022				CLR	(R2)+		;      ECWRD1
   253	000420	005022				CLR	(R2)+		;      ECWRD2
   254	000422	005022				CLR	(R2)+		;CLEAR ECMSK0
   255	000424	005022				CLR	(R2)+		;      ECMSK1
   256	000426	005022				CLR	(R2)+		;      ECMSK2
   257
   258	000430	016102	000044			MOV	RPEC1(R1),R2	;GET ECC POSITION
   259	000434	001666				BEQ	5$		;IF POS = 0, ERROR, NOT ECC CORRECTABLE
   260	000436	016137	000046	004660		MOV	RPEC2(R1),ECMSK0 ;GET ECC CORRECTION
   261
   262	000444	005302				DEC	R2		;DIVIDE POSITION BY 18
   263	000446	005003				CLR	R3
   264	000450	162702	000022		61$:	SUB	#18.,R2
   265	000454	002402				BLT	62$
   266	000456	005203				INC	R3
   267	000460	000773				BR	61$
   268	000462	062702	000022		62$:	ADD	#18.,R2		;DONE, R3=WORD, R2=SHIFTS
   269	000466	006303				ASL	R3		;DOUBLE WORD POSITION, 11 ADR IN BYTES
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 9
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0106

   271	000470	063703	004774			ADD	BUFADR,R3
   272	000474	010337	004666			MOV	R3,ECADR0	;SETUP 1ST BAD WORD BUFFER ADDRESS
   273
   274	000500	005723				TST	(R3)+
   275	000502	010337	004670			MOV	R3,ECADR1	;SETUP 2ND BAD WORD BUFFER ADDRESS
   276	000506	012701	004652			MOV	#ECWRD0,R1
   277	000512	011311				MOV	(R3),(R1)	;SETUP 2ND BAD WORD
   278	000514	012703	000022			MOV	#18.,R3
   279	000520	004737	000014			JSR	PC,PROL36	;POSITION 2ND WORD INTO UPPER 18 BITS
   280
   281	000524	017711	004136			MOV	@ECADR0,(R1)	;SETUP 1ST BAD WORD
   282
   283	000530	012701	004660			MOV	#ECMSK0,R1
   284	000534	010203				MOV	R2,R3
   285	000536	004737	000014			JSR	PC,PROL36	;POSITION ECC CORRECTION WORD
   286
   287	000542	011146				MOV	(R1),-(SP)	;CORRECT BITS 0-16
   288	000544	043716	004652			BIC	ECWRD0,(SP)
   289	000550	042137	004652			BIC	(R1)+,ECWRD0
   290	000554	052637	004652			BIS	(SP)+,ECWRD0
   291
   292	000560	011146				MOV	(R1),-(SP)	;CORRECT BITS 17-32
   293	000562	043716	004654			BIC	ECWRD1,(SP)
   294	000566	042137	004654			BIC	(R1)+,ECWRD1
   295	000572	052637	004654			BIS	(SP)+,ECWRD1
   296
   297	000576	011146				MOV	(R1),-(SP)	;CORRECT BITS 33-36
   298	000600	043716	004656			BIC	ECWRD2,(SP)
   299	000604	042137	004656			BIC	(R1)+,ECWRD2
   300	000610	052637	004656			BIS	(SP)+,ECWRD2
   301
   302	000614	012701	004652			MOV	#ECWRD0,R1
   303	000620	011177	004042			MOV	(R1),@ECADR0	;PUT 1ST CORRECTED WORD BACK IN BUFFER
   304
   305	000624	012703	000016			MOV	#14.,R3
   306	000630	004737	000014			JSR	PC,PROL36
   307	000634	013777	004656	004026		MOV	ECWRD2,@ECADR1	;PUT 2ND CORRECTED WORD BACK IN BUFFER
   308
   309	000642	000644				BR	3$		;DONE
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 10
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0107

   311					;ADD OFFSET TO AN RP04/RP06 PHYSICAL ADDRESS
   312
   313					;HERE USING CURRENT RP04/RP06 PHYSICAL BLOCK ADDRESS TO
   314					;COMPUTE TO FIND OUT NEXT RP04/RP06 PHYSICAL BLOCK
   315					;ADDRESS (WHEN THEY ARE ACROSS THE CYLINDER BOUNDARY)
   316
   317	000644	013700	004700		DIKADR:	MOV	CYLD,R0
   318	000650	013701	004676			MOV	TKST,R1
   319	000654	013702	004672			MOV	OFST,R2
   320	000660	110103				MOVB	R1,R3
   321	000662	105001				CLRB	R1
   322	000664	000301				SWAB	R1
   323	000666	060302				ADD	R3,R2
   324	000670	100004			1$:	BPL	2$
   325	000672	005300				DEC	R0
   326	000674	062702	000574			ADD	#STNO,R2		;GO TO NEXT CYLD
   327	000700	000773				BR	1$
   328	000702	162702	000574		2$:	SUB	#STNO,R2		;BACK TO THIS CYLD
   329	000706	002402				BLT	3$
   330	000710	005200				INC	R0
   331	000712	000773				BR	2$
   332	000714	062702	000574		3$:	ADD	#STNO,R2
   333	000720	162702	000024		4$:	SUB	#TNO,R2			;BACK TO PREVIOUS TRACK
   334	000724	002402				BLT	5$
   335	000726	005201				INC	R1
   336	000730	000773				BR	4$
   337	000732	062702	000024		5$:	ADD	#TNO,R2			;GO TO NEXT TRACK
   338	000736	162701	000023		6$:	SUB	#SNO,R1			;BACK TO PREVIOUS SECTOR
   339	000742	002402				BLT	7$
   340	000744	005200				INC	R0
   341	000746	000773				BR	6$
   342	000750	062701	000023		7$:	ADD	#SNO,R1			;GO TO NEXT SECTOR
   343	000754	000301				SWAB	R1
   344	000756	150201				BISB	R2,R1
   345	000760	010037	004700			MOV	R0,CYLD
   346	000764	010137	004676			MOV	R1,TKST
   347	000770	000207				RTS	PC
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 11
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0108

   349					;ALL OF THE PRECEDING HAS TO BE LOCATED BELOW LOCATION 1000 BECAUSE
   350					;IT MUST BE PART OF BLOCK #0 TO BE READ IN BY BM873 ROM
   351
   352					;READ HOME BLOCK #1
   353
   354		001000				.=1000
   355
   356	001000	005037	004700		REDHOM:	CLR	CYLD			;CYLINDER #0
   357	001004	012737	000001	004676		MOV	#1,TKST			;SECTOR #1
   358	001012	012737	004776	004774		MOV	#BUFFER,BUFADR		;BUFFER ADDRESS
   359	001020	004737	000202			JSR	PC,READ			;READ ONE BLOCK
   360
   361					;SAVE INFORMATION ABOUT DIRECTORY FILE
   362
   363	001024	012701	005326			MOV	#BUFFER+<^D108*2>,R1	;POINT TO WD #108 IN HOM BLK
   364	001030	012702	004644			MOV	#DIRFIL,R2		;START OF SAVE AREA
   365	001034	012122			1$:	MOV	(R1)+,(R2)+		;MOVE 1 WORD AT A TIME
   366	001036	020127	005334			CMP	R1,#BUFFER+<^D111*2>	;REACHED WD #111?
   367	001042	103774				BLO	1$			;NOT YET
   368
   369					;VERIFY 1ST WORD OF HOME BLOCK
   370
   371	001044	023727	004776	105755		CMP	BUFFER,#105755		;LAST 16 BITS OF "HOM" IN SIXBIT
   372	001052	001013				BNE	2$			;ERROR
   373
   374						;CHECK WHETHER THIS IS OUR PACK SYSTEM (KLAD10)
   375
   376	001054	023727	005322	043241		CMP	BUFFER+<^D106*2>,#043241  ;"KLAD10" IN RAD50
   377	001062	001007				BNE	2$			;ERROR
   378	001064	023727	005324	016766		CMP	BUFFER+<^D107*2>,#016766
   379	001072	001003				BNE	2$			;ERROR
   380	001074	005737	004644			TST	DIRFIL			;DIRECTORY FILE EXIST?
   381	001100	003001				BGT	REDDIR			;GO READ DIRECTORY FILE
   382
   383	001102	000000			2$:	HALT				;ERROR HALT #2
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 12
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0109

   385					;READ RP04/RP06 FILE DIRECTORY
   386
   387					;FILE DESCRIPTOR BLOCK
   388					;*
   389					;*	0/FILNAME
   390					;*	1/   "
   391					;*	2/FILE EXT
   392					;*	3/CREATION DATE
   393					;*	4/PHYSICAL BLOCK NUMBER
   394					;*	5/   "
   395					;*	6/NUMBER OF WORDS ALLOCATED
   396					;*	7/   "
   397					;*	8/NUMBER OF WORDS WRITTEN
   398					;*	9/   "
   399					;*	10/PDP-11 LOAD ADDRESS
   400					;*	11/PDP-11 START ADDRESS
   401					;*	12/FILE TYPE & FILE STATUS
   402					;*	13/CHECKSUM
   403					;*	14/NOT USED
   404					;*	15/NOT USED
   405					;*	16/CURRENT POSITION
   406					;*	17/   "
   407
   408	001104	012705	004722		REDDIR:	MOV	#RETURN,R5	;RETURN POINTER
   409	001110	012703	004730			MOV	#FILDSB,R3	;FILE DESCRIPTOR POINTER
   410	001114	012702	004644			MOV	#DIRFIL,R2	;DIRECTORY FILE POINTER
   411	001120	012263	000010			MOV	(R2)+,4*2(R3)	;DIR CYL # IN FILE DSB
   412	001124	012263	000012			MOV	(R2)+,5*2(R3)	;TRACK & SECTOR
   413	001130	011200				MOV	@R2,R0		;R0 CONTAIN # OF DIR BLOCKS
   414	001132	000300				SWAB	R0		;CONVERT IT TO WORD COUNT
   415	001134	010063	000022			MOV	R0,9.*2(R3)	;SAVE IT IN DSB
   416	001140	005063	000020			CLR	8.*2(R3)	;CLEAR WORD WRITTEN FIELD
   417	001144	010302				MOV	R3,R2
   418	001146	062702	000040			ADD	#FDESIZ*2,R2	;POINT TO CURRENT POSITION
   419	001152	005022				CLR	(R2)+
   420	001154	005012				CLR	@R2
   421
   422	001156	012700	004730		1$:	MOV	#FILDSB,R0
   423	001162	004737	001630			JSR	PC,DIRDAT	;READ DIRECTORY DATA BLOCK
   424	001166	103443				BCS	2$		;ERROR
   425
   426	001170	012002				MOV	(R0)+,R2	;DATA BUFFER ADDRESS
   427	001172	011001				MOV	@R0,R1		;BYTE COUNT
   428
   429	001174	012704	001320		4$:	MOV	#FILNAM,R4	;FILE NAME POINTER
   430	001200	021214				CMP	(R2),(R4)	;COMPARE FILE NAME
   431	001202	001027				BNE	3$		;WRONG FILE
   432	001204	026264	000002	000002		CMP	2(R2),2(R4)	;CONTINUE COMPARE
   433	001212	001023				BNE	3$
   434	001214	026264	000004	000004		CMP	4(R2),4(R4)	;EXT
   435	001222	001017				BNE	3$
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 13
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0110

   437	001224	010225				MOV	R2,(R5)+	;CORE ADDRESS OF DSB
   438	001226	013725	004700			MOV	CYLD,(R5)+	;CYLINDER NUMBER
   439	001232	013725	004676			MOV	TKST,(R5)+	;TRACK & SECTOR
   440	001236	012705	004730			MOV	#FILDSB,R5	;GET DSB ADDRESS
   441	001242	012703	000020			MOV	#FDESIZ,R3	;ENTRY SIZE
   442	001246	012225			6$:	MOV	(R2)+,(R5)+	;TRANS INFO TO DSB
   443	001250	005303				DEC	R3
   444	001252	001375				BNE	6$		;CONTINUE UNTIL DONE
   445
   446	001254	005025				CLR	(R5)+		;CLEAR CURRENT POSITION
   447	001256	005025				CLR	(R5)+
   448	001260	000422				BR	LOAD		;GO LOAD PROGRAM
   449
   450	001262	062702	000040		3$:	ADD	#FDESIZ*2,R2
   451	001266	162701	000040			SUB	#FDESIZ*2,R1	;FINISHED THIS DIR BLK?
   452	001272	101340				BHI	4$		;NOT YET
   453	001274	000730				BR	1$		;YES, GO READ NEXT
   454
   455	001276	022700	000001		2$:	CMP	#1,R0		;EOF?
   456	001302	001003				BNE	5$		;NO
   457
   458	001304	012700	100022			MOV	#100022,R0	;RETURN FROM EOF
   459	001310	000000				HALT			;ERROR HALT # 3
   460
   461	001312	012700	100023		5$:	MOV	#100023,R0
   462	001316	000000				HALT			;ERROR HALT #4
   463
   464	001320	043244	012500		FILNAM:	.RAD50	/KLDCP /
   465	001324	006766				.RAD50	/BIN/
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 14
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0111

   467					;LOAD PROGRAM THROUGH BINARY LOADER
   468
   469	001326	012700	004730		LOAD:	MOV	#FILDSB,R0	;DSB ADDRESSS IN R0
   470	001332	004737	001630			JSR	PC,DIRDAT	;READ DATA BLOCK
   471	001336	103440				BCS	ERR25		;ERROR
   472
   473	001340	012037	004712			MOV	(R0)+,DEVADR	;SAVE BUFFER ADDRESS
   474	001344	011037	004710			MOV	@R0,DEVCNT	;SAVE BYTE COUNT
   475
   476	001350	005002			LOBIN:	CLR	R2		;INIT CHECKSUM
   477	001352	004737	001520			JSR	PC,DVFRAM	;READ FRAME
   478	001356	105300				DECB	R0		;CHECK FOR DATA START
   479	001360	001373				BNE	LOBIN		;NO, JUST ZEROES
   480	001362	004737	001520			JSR	PC,DVFRAM	;READ ANOTHER FRAME
   481	001366	004737	001600			JSR	PC,DVWRD	;GET FULL BYTE COUNT
   482	001372	010037	004704			MOV	R0,LBC		;SAVE BYTE COUNT
   483	001376	162737	000006	004704		SUB	#6,LBC		;BYTE COUNT OF 6 IS XFER BLOCK
   484	001404	001422				BEQ	GOSTAR		;GO START IT
   485
   486	001406	004737	001600			JSR	PC,DVWRD	;GET LOAD ADDRESS
   487	001412	010005				MOV	R0,R5		;SAVE IT
   488	001414	004737	001520		LOBIN1:	JSR	PC,DVFRAM	;READ ANOTHER FRAME
   489	001420	005337	004704			DEC 	LBC
   490	001424	002010				BGE	LOBIN2		;BRANCH IF MORE DATA REMAINS
   491	001426	105702				TSTB	R2		;CORRECT CHECKSUM?
   492	001430	001747				BEQ	LOBIN		;BRANCH IF GOOD CHECKSUM
   493
   494	001432	012700	100024		ERR24:	MOV	#100024,R0
   495	001436	000000				HALT			;ERROR HALT - BAD CHECKSUM
   496
   497	001440	012700	100025		ERR25:	MOV	#100025,R0
   498	001444	000000				HALT			;ERROR HALT #5
   499
   500	001446	110025			LOBIN2:	MOVB	R0,(R5)+	;STORE DATA 1 BYTE AT A TIME
   501	001450	000761				BR	LOBIN1		;LOOP
   502
   503	001452	004737	001600		GOSTAR:	JSR	PC,DVWRD	;GET POSSIBLE XFER ADDRESS
   504	001456	010046				MOV	R0,-(SP)	;SAVE R0
   505	001460	004737	001520			JSR	PC,DVFRAM
   506	001464	105702				TSTB	R2		;CORRECT CHECKSUM?
   507	001466	001361				BNE	ERR24		;BRANCH IF BAD
   508	001470	012600				MOV	(SP)+,R0	;RESTORE R0
   509	001472	010037	004714			MOV	R0,PGOADR	;SAVE IT AS START ADDRESS
   510	001476	001405				BEQ	ERR26		;ERROR IF START ADDRESS = 0
   511	001500	032700	000001			BIT	#1,R0		;CHECK FOR EVEN ADDRESS
   512	001504	001002				BNE	ERR26		;ODD BOUNDARY
   513	001506	000177	003202			JMP	@PGOADR		;BRANCH TO IT IF ADDRESS GOOD
   514
   515	001512	012700	100026		ERR26:	MOV	#100026,R0
   516	001516	000000				HALT			;ERROR HALT #6
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 15
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0112

   518					;READ FRAME SUBROUTINE
   519
   520	001520	005737	004710		DVFRAM:	TST	DEVCNT		;USED ALL DATA?
   521	001524	003013				BGT	NOTYET		;NO
   522
   523	001526	010246				MOV	R2,-(SP)	;SAVE R2 FOR CHECKSUM
   524	001530	012700	004730			MOV	#FILDSB,R0	;SET UP DSB ADDRESS
   525	001534	004737	001630			JSR	PC,DIRDAT	;YES, READ NEXT DATA BLOCK
   526	001540	103734				BCS	ERR24		;ERROR
   527
   528	001542	012602				MOV	(SP)+,R2	;RESTORE R2 AS CHECKSUM
   529	001544	012037	004712			MOV	(R0)+,DEVADR	;SAVE BUFFER ADDRESS
   530	001550	011037	004710			MOV	@R0,DEVCNT	;AND BYTE COUNT
   531
   532	001554	117700	003132		NOTYET:	MOVB	@DEVADR,R0	;GET ONE BYTE
   533	001560	005237	004712			INC	DEVADR		;INCREMENT PICKUP ADDRESS
   534	001564	005337	004710			DEC	DEVCNT		;COUNT IT
   535	001570	042700	177400			BIC	#177400,R0	;SAVE LOW BYTE ONLY
   536	001574	060002				ADD	R0,R2		;ADD TO CHECKSUM(SHOULD RESULT
   537									;IN ZERO, 'CAUSE IT'S 2'COMPLEMENT)
   538	001576	000207				RTS	PC		;RETURN
   539
   540					;ASSEMBLE ONE 16-BIT DATA WORD
   541
   542	001600	004737	001520		DVWRD:	JSR	PC,DVFRAM	;READ FRAME
   543	001604	010037	004706			MOV	R0,LTMP
   544	001610	004737	001520			JSR	PC,DVFRAM	;GET ANOTHER FRAME
   545	001614	000300				SWAB	R0		;PLACE IN HIGH BYTE
   546	001616	050037	004706			BIS	R0,LTMP		;FROM ONE WORD
   547	001622	013700	004706			MOV	LTMP,R0		;BACK TO R0
   548	001626	000207				RTS	PC		;RETURN
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 16
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0113

   550					;READ DIRECTORY DATA BLOCK
   551
   552	001630	010002			DIRDAT:	MOV	R0,R2		;SAVE DSB POINTER
   553	001632	010204				MOV	R2,R4
   554	001634	062704	000040			ADD	#FDESIZ*2,R4	;R4 POINTS TO CURRENT POSITION
   555	001640	012703	000400			MOV	#BLKSIZ,R3	;BUFFER SIZE=BLKSIZ
   556	001644	016200	000020			MOV	8.*2(R2),R0	;MOST SIGN. # OF WORD WRITTEN
   557	001650	016201	000022			MOV	9.*2(R2),R1	;LEAST SIGN. # OF WORD WRITTEN
   558	001654	166401	000002			SUB	2(R4),R1	;L.S. # OF WORD REMAINING
   559	001660	005600				SBC	R0		;PROPAGATE "BORROW"
   560	001662	161400				SUB	@R4,R0		;M.S. # OF WORD REMAINING
   561	001664	002454				BLT	40$		;BRANCH IF PAST EOF
   562	001666	003006				BGT	10$		;BRANCH IF >2*16 WORDS REMAIN
   563	001670	005701				TST	R1		;TEST FOR L.S. WORD REMAINING
   564	001672	001457				BEQ	60$		;BRANCH IF AT EOF
   565	001674	020103				CMP	R1,R3		;REMAINING WORDS>BUFFER SIZE?
   566	001676	101002				BHI	10$		;YES
   567	001700	010103				MOV	R1,R3		;USE IT AS BUFFER SIZE
   568	001702	000402				BR	15$		;DON'T TRUNCATE BUFFER SIZE
   569	001704	042703	000377		10$:	BIC	#BLKSIZ-1,R3	;TRUNCATE TO MULTIPLE OF BLKSIZ
   570	001710	032764	000377	000002	15$:	BIT	#BLKSIZ-1,2(R4)	;CURRENT POS. A MULT. BLKSIZ?
   571	001716	001042				BNE	50$		;NO
   572	001720	016237	000010	004700		MOV	4*2(R2),CYLD	;SAVE CYLD # OF THIS FILE
   573	001726	016237	000012	004676		MOV	5*2(R2),TKST	;AND TRACK & SECTOR
   574	001734	011402				MOV	@R4,R2		;R2 = M.S. CURRENT POSITION
   575	001736	000302				SWAB	R2
   576	001740	156402	000003			BISB	3(R4),R2
   577	001744	010237	004672			MOV	R2,OFST		;SAVE IT
   578	001750	010346				MOV	R3,-(SP)	;SAVE R3 AS WORD COUNT
   579	001752	004737	000644			JSR	PC,DIKADR	;CONVERT TO BLOCK NO. TO BE READ
   580	001756	012603				MOV	(SP)+,R3	;RESTORE R3 AS WORD COUNT
   581	001760	004737	000202			JSR	PC,READ		;GO READ A BLOCK
   582	001764	060364	000002			ADD	R3,2(R4)	;UPDATE L.S. CURRENT POSITION
   583	001770	005514				ADC	@R4		;PROPAGATE CARRY INTO M.S. CUR POS
   584	001772	006303				ASL	R3		;CONVERT WORDS READ TO BYTES
   585	001774	010337	004720		75$:	MOV	R3,RPINFO+2	;STORE AS BYTE COUNT ARG
   586	002000	012737	004776	004716		MOV	#BUFFER,RPINFO	;STORE BUFFER ADDRESS
   587	002006	012700	004716			MOV	#RPINFO,R0
   588	002012	000241				CLC
   589	002014	000207				RTS	PC		;SUCCESSFUL RETURN
   590	002016	012700	100027		40$:	MOV	#100027,R0	;PAST EOF
   591	002022	000410				BR	30$
   592	002024	012700	100030		50$:	MOV	#100030,R0	;NON-MULTIPLE BLKSIZ
   593	002030	000405				BR	30$
   594	002032	012700	000001		60$:	MOV	#1,R0		;ALREADY AT EOF
   595	002036	000402				BR	30$
   596	002040	012700	100031		70$:	MOV	#100031,R0	;NO DATA WAS READ
   597	002044	000261			30$:	SEC
   598	002046	000207				RTS	PC		;ERROR RETURN
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 17
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0114

   600					;BUFFERS
   601
   602		006000				$$BUF=6000
   603
   604					.MACRO	.BUFW	$BTAG,$BARG
   605						.IIF	NE,$$BUF&1,$$BUF=$$BUF-1
   606						.IIF	B,$BARG,$$BARG=1
   607						.IIF	NB,$BARG,$$BARG=$BARG
   608						$$BUF=$$BUF-<$$BARG*2>
   609						.NLIST
   610						.LIST	ME
   611						.LIST
   612					$BTAG=	$$BUF
   613						.NLIST	ME
   614					.ENDM
   615				.NLIST	LOC
   616
   617					.BUFW	BUF1
   (1)	005776			BUF1=	$$BUF
   618					.BUFW	BUFFER,256.		;DATA BUFFER
   (1)	004776			BUFFER=	$$BUF
   619
   620					.BUFW	BUFADR
   (1)	004774			BUFADR=	$$BUF
   621					.BUFW	FILDSB,FDESIZ+2		;FILE DESCRIPTOR BLOCK
   (1)	004730			FILDSB=	$$BUF
   622
   623					.BUFW	RETURN,3		;RETURN INFOR
   (1)	004722			RETURN=	$$BUF
   624					.BUFW	RPINFO,2		;BYTE COUNT & BUF ADR
   (1)	004716			RPINFO=	$$BUF
   625					.BUFW	PGOADR			;PROGRAM GO ADDR
   (1)	004714			PGOADR=	$$BUF
   626					.BUFW	DEVADR			;BUFFER ADDR
   (1)	004712			DEVADR=	$$BUF
   627					.BUFW	DEVCNT			;BYTE COUNT
   (1)	004710			DEVCNT=	$$BUF
   628					.BUFW	LTMP			;TEMPOROARY
   (1)	004706			LTMP=	$$BUF
   629					.BUFW	LBC			;XFER BLK COUNT
   (1)	004704			LBC=	$$BUF
   630					.BUFW	UNIT			;UNIT NO.
   (1)	004702			UNIT=	$$BUF
   631					.BUFW	CYLD			;CYLINDER NO.
   (1)	004700			CYLD=	$$BUF
   632					.BUFW	TKST			;TRACK & SECTOR NO.
   (1)	004676			TKST=	$$BUF
   633					.BUFW	WDCT			;WORD COUNT
   (1)	004674			WDCT=	$$BUF
   634					.BUFW	OFST			;OFFSET
   (1)	004672			OFST=	$$BUF
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 18
KLADBT.P11    15-JUN-79 10:27                                                                                              SEQ 0115

   636
   637					.BUFW	ECADR1
   (1)	004670			ECADR1=	$$BUF
   638					.BUFW	ECADR0
   (1)	004666			ECADR0=	$$BUF
   639					.BUFW	ECMSK2
   (1)	004664			ECMSK2=	$$BUF
   640					.BUFW	ECMSK1
   (1)	004662			ECMSK1=	$$BUF
   641					.BUFW	ECMSK0
   (1)	004660			ECMSK0=	$$BUF
   642					.BUFW	ECWRD2
   (1)	004656			ECWRD2=	$$BUF
   643					.BUFW	ECWRD1
   (1)	004654			ECWRD1=	$$BUF
   644					.BUFW	ECWRD0
   (1)	004652			ECWRD0=	$$BUF
   645
   646					.BUFW	DIRLEN			;DIR FILE LENGTH IN BLKS
   (1)	004650			DIRLEN=	$$BUF
   647					.BUFW	DIRTCT			;DIR FILE TRACK & SECTOR
   (1)	004646			DIRTCT=	$$BUF
   648					.BUFW	DIRFIL			;DIR FILE CYLINDER NO.
   (1)	004644			DIRFIL=	$$BUF
   649					.BUFW	STACK			;STACK
   (1)	004642			STACK=	$$BUF
   650
   651	000001				.END
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 19
KLADBT.P11    15-JUN-79 10:27		CROSS REFERENCE TABLE -- USER SYMBOLS                                              SEQ 0116

BIT00 = 000001        	   30#
BIT01 = 000002        	   31#
BIT02 = 000004        	   32#
BIT03 = 000010        	   33#
BIT04 = 000020        	   34#
BIT05 = 000040        	   35#	   77
BIT06 = 000100        	   36#	   85
BIT07 = 000200        	   37#	   66	   84
BIT08 = 000400        	   38#	   83
BIT09 = 001000        	   39#
BIT10 = 002000        	   40#	   92
BIT11 = 004000        	   41#	   65	   91
BIT12 = 010000        	   42#	   82	   90
BIT13 = 020000        	   43#	   64
BIT14 = 040000        	   44#	   63	   81
BIT15 = 100000        	   45#	   80
BLKSIZ= 000400        	  100#	  202	  555	  569	  570
BTCYL   000060        	  132#	  155
BTTKST  000062        	  133#	  156
BUFADR= 004774        	  161*	  165*	  170*	  201	  271	  358*	  620#
BUFFER= 004776        	  358	  363	  366	  371	  376	  378	  586	  618#
BUF1  = 005776        	  617#
CYLD  = 004700        	  155*	  199	  317	  345*	  356*	  438	  572*	  631#
DECVER= 000003        	    3#
DEVADR= 004712        	  473*	  529*	  532	  533*	  626#
DEVCNT= 004710        	  474*	  520	  530*	  534*	  627#
DIKADR  000644        	  166	  171	  317#	  579
DIRDAT  001630        	  423	  470	  525	  552#
DIRFIL= 004644        	  364	  380	  410	  648#
DIRLEN= 004650        	  646#
DIRTCT= 004646        	  647#
DVFRAM  001520        	  477	  480	  488	  505	  520#	  542	  544
DVWRD   001600        	  481	  486	  503	  542#
ECADR0= 004666        	  272*	  281	  303*	  638#
ECADR1= 004670        	  275*	  307*	  637#
ECMSK0= 004660        	  260*	  283	  641#
ECMSK1= 004662        	  640#
ECMSK2= 004664        	  639#
ECWRD0= 004652        	  250	  276	  288	  289*	  290*	  302	  644#
ECWRD1= 004654        	  293	  294*	  295*	  643#
ECWRD2= 004656        	  298	  299*	  300*	  307	  642#
ERR24   001432        	  494#	  507	  526
ERR25   001440        	  471	  497#
ERR26   001512        	  510	  512	  515#
FDESIZ= 000020        	  101#	  418	  441	  450	  451	  554	  621
FILDSB= 004730        	  409	  422	  440	  469	  524	  621#
FILNAM  001320        	  429	  464#
GOSTAR  001452        	  484	  503#
LBC   = 004704        	  482*	  483*	  489*	  629#
LOAD    001326        	  448	  469#
LOBIN   001350        	  476#	  479	  492
LOBIN1  001414        	  488#	  501
LOBIN2  001446        	  490	  500#
LTMP  = 004706        	  543*	  546*	  547	  628#
MCNVER= 000000        	    4#
NOP   = 000240        	  102#
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 19-1
KLADBT.P11    15-JUN-79 10:27		CROSS REFERENCE TABLE -- USER SYMBOLS                                              SEQ 0117

NOTYET  001554        	  521	  532#
OFST  = 004672        	  157*	  164*	  169*	  319	  577*	  634#
PGOADR= 004714        	  509*	  513	  625#
PROL36  000014        	  121#	  125	  279	  285	  306
READ    000202        	  162	  167	  172	  178#	  359	  581
REDDIR  001104        	  381	  408#
REDHOM  001000        	  174	  356#
RETURN= 004722        	  408	  623#
RPATA = 100000        	   80#	  214
RPBA  = 000004        	   73#	  201*
RPBCYL= 000000        	  103#
RPCLR = 000040        	   77#	  183
RPCS1 = 000000        	   62#
RPCS2 = 000010        	   76#	  153	  183*	  184*
RPDA  = 000006        	   74#	  200*
RPDC  = 000034        	   94#	  199*
RPDPR = 000400        	   83#	  190
RPDRY = 000200        	   84#	  190
RPDS  = 000012        	   79#	  188	  214
RPDVA = 004000        	   65#	  185
RPECI = 004000        	   91#
RPEC1 = 000044        	   96#	  258
RPEC2 = 000046        	   97#	  260
RPERR = 040000        	   81#	  214
RPER1 = 000014        	   87#	  227	  230
RPFMT = 010000        	   90#
RPHCI = 002000        	   92#	  193
RPINFO= 004716        	  585*	  586*	  587	  624#
RPMCPE= 020000        	   64#	  208	  211
RPMOL = 010000        	   82#	  190
RPOF  = 000032        	   89#	  197*
RPPACK= 000023        	   68#
RPPRST= 000021        	   67#
RPRDFN= 000071        	   70#	  204
RPRDY = 000200        	   66#	  208
RPRH11= 176700        	   99#	  182
RPTRE = 040000        	   63#	  208
RPVV  = 000100        	   85#	  190
RPWC  = 000002        	   72#	  202*
RPWTFN= 000061        	   69#
SNO   = 000023        	  106#	  338	  342
STACK = 004642        	  152	  649#
START   000066        	  112	  152#
STNO  = 000574        	  104#	  326	  328	  332
TKST  = 004676        	  156*	  200	  318	  346*	  357*	  439	  573*	  632#
TNO   = 000024        	  105#	  333	  337
UNIT  = 004702        	  153*	  184	  630#
WDCT  = 004674        	  633#
$$BARG= 000001        	  617#	  618#	  620#	  621#	  623#	  624#	  625#	  626#	  627#	  628#	  629#	  630#	  631#
			  632#	  633#	  634#	  637#	  638#	  639#	  640#	  641#	  642#	  643#	  644#	  646#	  647#
			  648#	  649#
$$BUF = 004642        	  602#	  617#	  618#	  620#	  621#	  623#	  624#	  625#	  626#	  627#	  628#	  629#	  630#
			  631#	  632#	  633#	  634#	  637#	  638#	  639#	  640#	  641#	  642#	  643#	  644#	  646#
			  647#	  648#	  649#
.     = 002050        	  110#	  114	  117	  131#	  354#
KLADBT	DECSYSTEM10 KL10 PDP-11 DIAGNOSTIC CONSOLE KLAD10 BOOT, VER 0.3	MACY11 30G(1063)  15-JUN-79  10:28  PAGE 20
KLADBT.P11    15-JUN-79 10:27		CROSS REFERENCE TABLE -- MACRO NAMES                                               SEQ 0118

.BUFW	  604#	  617	  618	  620	  621	  623	  624	  625	  626	  627	  628	  629	  630	  631	  632
	  633	  634	  637	  638	  639	  640	  641	  642	  643	  644	  646	  647	  648	  649


. ABS.  002050     000	   CON   RW    REL   LCL   I  


 ERRORS DETECTED:  0

 KLADBT,KLADBT/CRF/DS:GBL_KLADBT
 RUN-TIME: 1 1 .3 SECONDS
 RUN-TIME RATIO: 4/3=1.6
 CORE USED:  6K  (11 PAGES)