Trailing-Edge
-
PDP-10 Archives
-
BB-4170G-SM
-
sources/filini.mac
There are 50 other files named filini.mac in the archive. Click here to see a list.
;<3A.MONITOR>FILINI.MAC.7, 11-Aug-78 10:34:25, Edit by ENGEL
;FIX THE PROBLEM WITH THE MISSPELLING OF DIRECOTRY
;<1BOSACK>FILINI.MAC.1004, 19-Jun-78 17:18:04, EDIT BY BOSACK
;<1BOSACK>FILINI.MAC.1003, 15-Jun-78 22:10:59, EDIT BY BOSACK
;<1BOSACK>FILINI.MAC.1002, 5-Jun-78 21:35:38, EDIT BY BOSACK
;<1BOSACK>FILINI.MAC.1001, 5-Jun-78 20:45:44, EDIT BY BOSACK
;<1BOSACK>FILINI.ORG.4, 5-Jun-78 18:33:18, EDIT BY BOSACK
;<3A.MONITOR>FILINI.MAC.3, 22-Feb-78 09:27:59, EDIT BY MILLER
;IF DELDF IN IDXINI FAILS, DON'T BUGHLT
;<3A.MONITOR>FILINI.MAC.2, 3-Feb-78 19:22:24, EDIT BY MILLER
;MAKE TEST OF EXADRF CORRECT
;<3A.MONITOR>FILINI.MAC.1, 3-Feb-78 18:22:41, EDIT BY MILLER
;CHANEG ENTRY NAME FOR FILINE TO EFILIN
;<3-MONITOR>FILINI.MAC.217, 7-Nov-77 13:01:50, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-MONITOR>FILINI.MAC.216, 12-Oct-77 13:46:16, EDIT BY KIRSCHEN
;UPDATE COPYRIGHT FOR RELEASE 3
;<3-MONITOR>FILINI.MAC.215, 2-Sep-77 14:46:01, EDIT BY KIRSCHEN
;IN IDXINI, DO MOVE ON MXDIRN INSTEAD OF MOVEI
;<3-MONITOR>FILINI.MAC.214, 11-Aug-77 09:38:51, EDIT BY HURLEY
;ADD THE CREATION OF <NEW-SYSTEM> AND <NEW-SUBSYS> FOR RELEASE PROCEDURES
;<3-MONITOR>FILINI.MAC.213, 29-Jul-77 10:10:40, EDIT BY HURLEY
;SPEED UP WILD CARD DIRECTORY LOOKUPS
;<3-MONITOR>FILINI.MAC.212, 27-Jul-77 14:24:20, EDIT BY HALL
;MAKE CPYBAK CLEAR FB%DIR IN BACKUP-COPY-OF-ROOT-DIRECTORY
;<3-MONITOR>FILINI.MAC.211, 21-Jul-77 17:33:14, Edit by MACK
;DEFAULT ACCT IS "OPERATOR" AGAIN
;<3-MONITOR>FILINI.MAC.210, 21-Jul-77 17:10:36, EDIT BY HURLEY
;FIX TYPO IN PREVIOUS EDIT
;<3-MONITOR>FILINI.MAC.209, 21-Jul-77 16:51:16, EDIT BY HURLEY
;TCO 1812 - TAKE OUT INITIALIZING OF STRLDN BECAUSE FSIINI DOES IT
;<3-MONITOR>FILINI.MAC.208, 21-Jul-77 16:39:44, EDIT BY HALL
;TCO 1812 - RENAME CREIDX TO FNDIDX
;<3-MONITOR>FILINI.MAC.207, 20-Jul-77 20:12:31, EDIT BY HALL
;TCO 1812 - MADE NORMAL STARTUP NOT REBUILD IDXTAB
;<3-MONITOR>FILINI.MAC.206, 20-Jul-77 10:59:25, Edit by MACK
;TCO 1822 - DEFAULT ACCOUNT SET IN JBFINI CHANES FROM "OPERATOR"
; TO "NOT-LOGGED-IN"
;<3-MONITOR>FILINI.MAC.205, 12-Jul-77 13:19:32, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.204, 12-Jul-77 00:18:22, Edit by MCLEAN
;MAKE MXDIRN A CORE LOCATION
;<3-MONITOR>FILINI.MAC.203, 6-Jul-77 15:36:42, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.202, 5-Jul-77 16:26:20, Edit by MCLEAN
;CHANGE INITBT TO USE EXADFL INSTEAD OF EXADF1
;<3-MONITOR>FILINI.MAC.201, 2-Jul-77 21:54:51, Edit by MCLEAN
;MORE FILINE CREATION
;<3-MONITOR>FILINI.MAC.200, 2-Jul-77 18:47:51, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.199, 1-Jul-77 14:51:30, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.198, 1-Jul-77 14:47:48, Edit by MCLEAN
;ADD FILINE FOR EXTENDED DIRECTORY SUPPORT
;<3-MONITOR>FILINI.MAC.197, 30-Jun-77 11:44:09, Edit by HESS
;ADD INIT OF USER NAME STRING AND ACCT STRING TO JFBINI
;<3-MONITOR>FILINI.MAC.196, 28-Jun-77 17:06:10, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.195, 27-Jun-77 14:32:06, Edit by MCLEAN
;MOVE BITTABLE TO NON/ZERO SECTION
;<3-MONITOR>FILINI.MAC.193, 27-Jun-77 13:41:24, Edit by HESS
;REMOVE REFS TO ACCTPT
;<2-PERF>FILINI.MAC.1, 26-May-77 14:41:03, EDIT BY HURLEY
;ADDED CONNECTED DIRECTORY NAME STRING TO JSB
;<1BOSACK>FILINI.MAC.191, 31-May-77 00:48:53, EDIT BY BOSACK
;<1BOSACK>FILINI.MAC.190, 30-May-77 19:50:10, EDIT BY BOSACK
;<1BOSACK>FILINI.MAC.189, 24-May-77 22:30:24, EDIT BY BOSACK
;<3-MONITOR>FILINI.MAC.187, 6-May-77 14:04:26, EDIT BY KIRSCHEN
;TCO 1796 - DO NOT BUGHLT WHEN MOUNTING BAD STR'S
;<3-MONITOR>FILINI.MAC.186, 2-May-77 20:31:52, EDIT BY BOSACK
;<3-MONITOR>FILINI.MAC.185, 6-Apr-77 03:04:35, Edit by MCLEAN
;ADD EXADF1 FOR SM10
;<3-MONITOR>FILINI.MAC.184, 5-Apr-77 18:15:12, EDIT BY MILLER
;REFERENCE IDX TABLE BY IDXFIL
;<3-MONITOR>FILINI.MAC.183, 29-Mar-77 14:29:24, EDIT BY HALL
;CHANGE MS%ASG TO MI%ASG
;<3-MONITOR>FILINI.MAC.182, 28-Feb-77 04:35:09, EDIT BY CROSSLAND
;TCO 1742 - ADD CALL TO NETINI FOR ARPA SUPPORT
;<3-MONITOR>FILINI.MAC.181, 8-Feb-77 01:43:57, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.179, 5-Feb-77 01:37:58, EDIT BY BOSACK
;REMOVE DTFLG CONDITIONALS
;ADD CODE TO FIX OLD ROOTDIR SUBDIR COUNTS ON IDX INIT
;<3-MONITOR>FILINI.MAC.178, 5-Feb-77 01:20:35, EDIT BY BOSACK
;<3-MONITOR>FILINI.MAC.177, 4-Feb-77 15:16:14, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.176, 29-Jan-77 18:08:05, Edit by MCLEAN
;TCO 1720 ADD BOOTSTRAP.BIN FILE
;<3-MONITOR>FILINI.MAC.174, 24-Jan-77 16:07:36, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.173, 21-Jan-77 17:19:33, EDIT BY BOSACK
;<3-MONITOR>FILINI.MAC.172, 21-Jan-77 17:18:07, EDIT BY BOSACK
;ADD SUPERIOR DIR ARGUMENT TO SETIDX CALLS
;<3-MONITOR>FILINI.MAC.171, 21-Jan-77 00:39:33, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.170, 7-Jan-77 18:41:36, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.169, 27-Dec-76 17:32:12, EDIT BY HURLEY
;<3-MONITOR>FILINI.MAC.168, 27-Dec-76 12:52:35, Edit by HESS
;TCO 1689 - FIX INITIAL QUOTA INFO (FILCRD)
;<3-MONITOR>FILINI.MAC.167, 17-Dec-76 00:25:58, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.167, 17-Dec-76 00:25:47, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.166, 4-Dec-76 22:48:16, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.165, 4-Dec-76 16:57:10, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.164, 28-Nov-76 12:45:48, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.163, 27-Nov-76 03:14:14, Edit by MCLEAN
;<3-MONITOR>FILINI.MAC.162, 26-Nov-76 16:18:09, Edit by MCLEAN
;TCO 1669 EXTENDED ADDRESSING
;<2-MONITOR>FILINI.MAC.161, 16-Nov-76 17:45:56, Edit by HESS
;CHANGE TO FILRFS AND IDXINI TO FIX FILES ON DISK
;<2-MONITOR>FILINI.MAC.160, 16-Nov-76 14:36:32, Edit by MACK
;TEST RIGHT HALF OF 36-BIT DIRECTORY DESIGNATOR AFTER CRDIR
;<2-MONITOR>FILINI.MAC.159, 9-Nov-76 11:25:56, EDIT BY KIRSCHEN
;MAKE NEWIB GIVE FAIL RETURN INSTEAD OF BUGHLT'ING
;<2-MONITOR>FILINI.MAC.158, 5-Nov-76 10:44:56, EDIT BY KIRSCHEN
;ADD BUGCHK FOR NEW CALLING SEQUENCE FOR FIXFES
;<2-MONITOR>FILINI.MAC.157, 4-Nov-76 11:41:13, EDIT BY HALL
;MADE FILREC RELEASE THE OFN FOR ROOT-DIRECTORY SINCE THE CALLER
; WILL CALL SETRDO TO GET IT AGAIN
;<2-MONITOR>FILINI.MAC.156, 1-Nov-76 20:48:04, EDIT BY HELLIWELL
;MAKE FILREC INTERNAL
;<2-MONITOR>FILINI.MAC.155, 1-Nov-76 15:16:55, EDIT BY KIRSCHEN
;CHANGE FILREC TO GIVE FAIL RETURN ON FAILURE, INSTEAD OF BUGHLT
;<2-MONITOR>FILINI.MAC.154, 1-Nov-76 10:49:22, EDIT BY KIRSCHEN
;CHANGE MS%MSG TO MI%MSG
;<2-MONITOR>FILINI.MAC.153, 29-Oct-76 09:34:37, Edit by HESS
;CHANGE STR INITING FORK TO JOB #
;<2-MONITOR>FILINI.MAC.152, 27-Oct-76 12:01:47, EDIT BY HALL
;IF WRTBTB FAILS AND ERROR IS MSTRX6, DON'T BUGHLT
;<2-MONITOR>FILINI.MAC.151, 26-Oct-76 09:41:31, EDIT BY KIRSCHEN
;MOVE CALL TO MNTBTB FROM CREIDX TO MSTR JSYS
;<2-MONITOR>FILINI.MAC.150, 23-Oct-76 16:34:52, EDIT BY HALL
;MOVED CALL TO MNTBTB FOR PS INTO FILIN1 PATH, REMOVED FROM CREIDX
;CALLED GTFESZ TO GET SIZE OF FRONT END FILE SYSTEM IF NOT GIVEN AT
; FSIINI TIME
;<2-MONITOR>FILINI.MAC.149, 22-Oct-76 13:20:36, EDIT BY HALL
;BUG FIX IN PREVIOUS EDIT
;<2-MONITOR>FILINI.MAC.148, 21-Oct-76 15:56:54, EDIT BY HALL
;WHEN MNTBTB FAILS, SET SF%BTE, SF%CDE AND MS%ASG,CLEAR D1%INI, AND CALL CRTBTB
;IF MS%ASG IS SET, DON'T CALL CHKBT OR CHKBAK
;<2-MONITOR>FILINI.MAC.147, 20-Oct-76 14:46:29, EDIT BY KIRSCHEN
;REMOVE MAKIDX ROUTINE
;<2-MONITOR>FILINI.MAC.146, 20-Oct-76 10:51:00, EDIT BY KIRSCHEN
;CLEAR CURUC AFTER SETTING UP OFN OF INDEX TABLE
;<2-MONITOR>FILINI.MAC.145, 20-Oct-76 10:04:51, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.144, 20-Oct-76 09:59:41, EDIT BY KIRSCHEN
;MAKE INDEX TABLE FILE NOT BE DUMP-ABLE
;<2-MONITOR>FILINI.MAC.143, 19-Oct-76 15:41:39, EDIT BY HALL
;TEMPORARY BUG FIX IN FILINI
;<2-MONITOR>FILINI.MAC.142, 18-Oct-76 19:18:33, EDIT BY HURLEY
;MAKE IDXINI ZERO IDXTAB BEFORE BUILDING IT
;<2-MONITOR>FILINI.MAC.141, 18-Oct-76 12:12:21, EDIT BY KIRSCHEN
;MAKE CREIDX OPEN INDEX TABLE FILE THAWED; UPDATE BACKUP ROOT-DIR ON CREATION
;<2-MONITOR>FILINI.MAC.140, 16-Oct-76 10:22:40, EDIT BY HALL
;CLEANUP OF FILINI CODE TO HANDLE PS ONLY, HANDLE FAILURE OF CHKBT
;<2-MONITOR>FILINI.MAC.139, 14-Oct-76 11:14:16, EDIT BY KIRSCHEN
;PROVIDE FOR FAIL RETURN ON CALL TO FEFSYS; PROVIDE # OF PAGES TO ALLOCATE.
;<2-MONITOR>FILINI.MAC.138, 11-Oct-76 10:24:44, EDIT BY KIRSCHEN
;UNDO EFFECT OF LARGE COMMENT BELOW (FILINI.MAC.134); INSTEAD, SET
; STIDX WHEN THE OFN OF THE INDEX TABLE FILE HAS BEEN SET UP.
;<2-MONITOR>FILINI.MAC.137, 8-Oct-76 17:39:29, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.136, 8-Oct-76 10:25:05, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.135, 7-Oct-76 15:24:42, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.134, 7-Oct-76 15:15:40, EDIT BY KIRSCHEN
;CHANGED CREIDX TO MAKE INDEX TABLE A FILE, STILL INITIALIZED ON EVERY
; STRUCTURE MOUNT. ALSO, THE MOUNTING OF THE BIT TABLE WAS MOVED TO
; CREIDX, BECAUSE OF A CHICKEN-AND-EGG DILEMNA: NAMELY, IF NO INDEX FILE
; EXISTS, AN OPENF MUST BE DONE TO CREATE THE INDEX BLOCK FOR THE FILE;
; THIS REQUIRES THAT THE BIT TABLE BE MOUNTED, WHICH IN TURN REQUIRES THAT
; THE INDEX TABLE BE MAPPED (WHEN THE GTJFN ON THE BIT TABLE FILE IS DONE.)
; BECAUSE THE GTJFN FOR THE INDEX FILE IN CREIDX ALREADY REQUIRED THAT THE
; SYSTEM BE FOOLED INTO THINKING THAT THE INDEX FILE WAS ALREADY MAPPED,
; THE CALL TO MNTBTB WAS PLACED HERE. SIMILAR MACHINATIONS WERE PERFORMED
; ON THE SYSLOD PATH.
;<2-MONITOR>FILINI.MAC.133, 29-Sep-76 15:46:32, Edit by HESS
;REMOVE REFERENCES TO JSSTR
;<2-MONITOR>FILINI.MAC.132, 23-Sep-76 14:46:09, EDIT BY HALL
;ADDED UNLOCK OF JSSTLK IN JBFINI
;<2-MONITOR>FILINI.MAC.131, 21-Sep-76 12:16:12, EDIT BY HALL
;MADE FILIN1 PASS STRUCTURE NUMBER TO CHKBAK
;<2-MONITOR>FILINI.MAC.130, 20-Sep-76 15:05:18, EDIT BY KIRSCHEN
;ASSIGN ENOUGH SPACE TO HOLD FILE NAME IN CREBAK
;<2-MONITOR>FILINI.MAC.129, 7-Sep-76 16:21:46, EDIT BY MILLER
;make psnam be a core location
;<2-MONITOR>FILINI.MAC.128, 2-Sep-76 16:17:50, EDIT BY HALL
;CHANGED INISTR TO FORCE STRUCTURE 0 TO HAVE A NAME OF PS IN DEVNAM
;<2-MONITOR>FILINI.MAC.127, 20-Aug-76 15:35:51, EDIT BY HURLEY
;<2-MONITOR>FILINI.MAC.126, 18-Aug-76 17:04:22, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.125, 18-Aug-76 16:52:51, EDIT BY KIRSCHEN
;FIX CPYBAK TO DO GTJFN OF FILE ON CORRECT STRUCTURE
;<2-MONITOR>FILINI.MAC.124, 18-Aug-76 14:48:35, EDIT BY KIRSCHEN
;<1KIRSCHEN>FILINI.MAC.2, 11-Aug-76 11:10:26, EDIT BY KIRSCHEN
;MAKE FILCRD DO NEW FORM OF CRDIR; FIX CPYBAK TO WORK ON ANY STRUCTURE
;<2-MONITOR>FILINI.MAC.123, 8-Aug-76 21:27:08, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.122, 8-Aug-76 19:42:29, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.121, 8-Aug-76 17:09:14, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.120, 7-Aug-76 20:39:13, EDIT BY KIRSCHEN
;MAKE FILCRD DO CRDIR'S ON SPECIFIED STRUCTURE
;<2-MONITOR>FILINI.MAC.119, 4-Aug-76 19:07:37, EDIT BY HURLEY
;<2-MONITOR>FILINI.MAC.118, 4-Aug-76 14:37:42, EDIT BY HURLEY
;<2-MONITOR>FILINI.MAC.117, 3-Aug-76 19:02:17, EDIT BY HURLEY
;EXPAND DIRECTORY NUMBERS TO 36 BITS
;<HESS>FILINI.MAC.2, 29-Jul-76 15:03:49, Edit by HESS
;TCO 1478 - QUOTA CHECKING
;<2-MONITOR>FILINI.MAC.115, 3-Aug-76 14:08:46, EDIT BY KIRSCHEN
;MAKE FILCRD INTERNAL
;<2-MONITOR>FILINI.MAC.114, 3-Aug-76 13:58:56, EDIT BY KIRSCHEN
;MAKE NEWIB INTERNAL
;<2-MONITOR>FILINI.MAC.113, 2-Aug-76 15:25:03, EDIT BY HALL
;FIXED TYPO IN JBFINI
;<2-MONITOR>FILINI.MAC.112, 2-Aug-76 13:06:07, EDIT BY HALL
;FIXED TYPO IN PREVIOUS EDIT
;<2-MONITOR>FILINI.MAC.111, 2-Aug-76 12:31:28, EDIT BY HALL
;IN JBFINI CHANGED INITIALIZATION OF STRUCTURE NUMBER IN JSB
;<2-MONITOR>FILINI.MAC.110, 1-Aug-76 15:53:01, EDIT BY HALL
;FIXED USE OF BAD DEFSTRS
;<2-MONITOR>FILINI.MAC.109, 30-Jul-76 10:50:08, EDIT BY KIRSCHEN
;REMOVE CODE TO FUDGE SPECIAL-DIRECTORY TABLE TO CREATE ROOT-DIRECTORY
;<2-MONITOR>FILINI.MAC.108, 30-Jul-76 10:45:50, EDIT BY KIRSCHEN
;FIX TYPO, JSFIN1==>JBFIN1
;<2-MONITOR>FILINI.MAC.107, 30-Jul-76 10:12:50, EDIT BY HALL
;ADDED TO JBFINI THE CODE TO INITIALIZE THE JSSTR BLOCK IN THE JSB
;<2-MONITOR>FILINI.MAC.106, 30-Jul-76 09:49:16, EDIT BY KIRSCHEN
;SET STCRD WHEN CREATING ROOT-DIRECTORY IN FILCRD
;<2-MONITOR>FILINI.MAC.105, 24-Jul-76 11:31:25, EDIT BY HALL
;COMMENT IN JBFINI
;<2-MONITOR>FILINI.MAC.104, 24-Jul-76 11:05:35, EDIT BY HALL
;IN JBFINI INITIALIZED CONNECTED STRUCTURE AND DIRECTORY TO BE
;PS:<SYSTEM>
;<2-MONITOR>FILINI.MAC.103, 7-Jul-76 11:08:38, EDIT BY KIRSCHEN
;ADD FLAGS TO CALLING SEQUENCE OF CHKBT
;<2-MONITOR>FILINI.MAC.102, 30-Jun-76 13:11:06, EDIT BY HALL
;ADDED COMMENTS ON INISTR
;<2-MONITOR>FILINI.MAC.101, 29-Jun-76 13:44:20, EDIT BY KIRSCHEN
;ADD NEW CALLING SEQUENCE FOR CHKBAT
;<2-MONITOR>FILINI.MAC.52, 23-Jun-76 11:37:26, EDIT BY KIRSCHEN
;FIXED TYPO FROM PREVIOUS EDIT
;<2-MONITOR>FILINI.MAC.51, 22-Jun-76 18:08:38, EDIT BY HALL
;ADDED 'REBUILD BIT TABLE' QUESTION
;<1B-MONITOR>FILINI.MAC.98, 16-Jun-76 14:55:30, EDIT BY HURLEY
;TCO # 1429 - MAKE OPERATOR BE CREATED WITH SC%OPR
;<2-MONITOR>FILINI.MAC.49, 17-Jun-76 12:20:48, EDIT BY MILLER
;ADD MLJFN. REMOVE SJFN
;<2-MONITOR>FILINI.MAC.48, 1-JUN-76 16:25:31, EDIT BY HALL
;MADE FRESTR INTERNAL
;<2-MONITOR>FILINI.MAC.47, 1-JUN-76 14:29:25, EDIT BY HALL
;ADDED CALL TO FEFSYS IN REFRESH CODE
;<2-MONITOR>FILINI.MAC.46, 25-MAY-76 17:29:00, EDIT BY HALL
;GOT RID OF A SETZ ON STRUCTURE NUMBER
;<2-MONITOR>FILINI.MAC.45, 25-MAY-76 13:16:13, EDIT BY HALL
;FIXED STKVARS TO HAVE DIFFERENT NAMES FOR STRUCTURE NUMBER
;<2-MONITOR>FILINI.MAC.44, 25-MAY-76 13:10:54, EDIT BY HALL
;REORDERED CODE SO THAT FILCRD AND CREBAK ARE OUT OF THE WAY
;<2-MONITOR>FILINI.MAC.43, 25-MAY-76 12:48:08, EDIT BY KIRSCHEN
;MADE CREIDX, IDXINI, AND SETRDO INTERNAL
;<2-MONITOR>FILINI.MAC.42, 25-MAY-76 12:27:43, EDIT BY HALL
;REORDERED STKVARS TO PUT STRNUM FIRST
;<2-MONITOR>FILINI.MAC.41, 24-MAY-76 17:14:42, EDIT BY HALL
;FIX TO PREVIOUS EDIT IN FILCRD
;<2-MONITOR>FILINI.MAC.40, 24-MAY-76 11:32:30, EDIT BY HALL
;CHANGED FILCRD TO ACCEPT STRUCTURE NUMBER AND PASS IT TO CREBAK,
;FILINI TO ASSUME STRUCTURE 0 IN CAL TO FILCRD, CREBAK TO GET 14 WORDS FOR
;FILE SPEC
;<2-MONITOR>FILINI.MAC.39, 20-MAY-76 11:08:24, EDIT BY KIRSCHEN
;BUG FIX- ONLY GET OFN OF ROOT-DIR FOR EXTANT STRUCTURES
;<2-MONITOR>FILINI.MAC.38, 20-MAY-76 11:03:47, EDIT BY KIRSCHEN
;ELIMINATE DOUBLE SKIP RETURN FROM DIRLKX
;<2-MONITOR>FILINI.MAC.37, 19-MAY-76 09:59:15, EDIT BY KIRSCHEN
;ASSUME STRUCTURE 0 IN CALL TO DIRLKX IN ISDIRT
;<2-MONITOR>FILINI.MAC.36, 17-MAY-76 11:08:14, EDIT BY KIRSCHEN
;ADD SUBROUTINE SETRDO TO SET UP ROOT-DIRECTORY OFN FOR A STRUCTURE
;<2-MONITOR>FILINI.MAC.35, 14-MAY-76 09:24:35, EDIT BY KIRSCHEN
;REMOVE REFERENCES TO LSTDRN (REFER TO SDB INSTEAD)
;<2-MONITOR>FILINI.MAC.34, 13-MAY-76 09:52:32, EDIT BY KIRSCHEN
;REMOVE REFERENCES TO DIDSCB; MAKE CREBAK USE STRUCTURE NUMBER
;<2-MONITOR>FILINI.MAC.33, 12-MAY-76 17:34:36, EDIT BY HALL
;ADD STRNUM TO STKVAR LIST IN CPYBAK
;<2-MONITOR>FILINI.MAC.32, 11-MAY-76 14:15:42, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.31, 11-MAY-76 13:04:28, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.30, 11-MAY-76 13:03:14, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.29, 11-MAY-76 11:35:57, EDIT BY KIRSCHEN
;GET OFN OF ROOT-DIRECTORY FOR ALL STRUCTURES, MAKE IDXTAB SIMILARLY
;<2-MONITOR>FILINI.MAC.28, 10-MAY-76 10:25:50, EDIT BY HALL
;MADE CHKBAT NOT BE CALLED FOR STRUCTURE 0 - DONE IN MEXEC (AGAIN)
;<2-MONITOR>FILINI.MAC.27, 10-MAY-76 10:15:12, EDIT BY KIRSCHEN
;MOVE STRST ROUTINE TO FUTILITY
;<2-MONITOR>FILINI.MAC.26, 10-MAY-76 09:32:59, EDIT BY KIRSCHEN
;ADD CODE TO GET HANDLE ON INDEX TABLE FOR ALL STRUCTURES
;<2-MONITOR>FILINI.MAC.25, 8-MAY-76 13:56:11, EDIT BY HALL
;FIXED A TYPO...
;<2-MONITOR>FILINI.MAC.24, 8-MAY-76 13:35:47, EDIT BY HALL
;CHANGES TO GET RID OF ASSUMPTIONS ABOUT STRUCTURE 0
;<2-MONITOR>FILINI.MAC.23, 7-MAY-76 14:31:51, EDIT BY KIRSCHEN
;ADD CODE TO SAVE AND RETRIEVE OFN OF ROOT-DIR FROM SDB (STRRDO)
;<2-MONITOR>FILINI.MAC.22, 7-MAY-76 11:40:51, EDIT BY KIRSCHEN
;ASSUME STRUCTURE 0 IN CALL TO DIRINI
;<2-MONITOR>FILINI.MAC.21, 7-MAY-76 11:00:06, EDIT BY KIRSCHEN
;PROVIDE STRUCTURE # (TEMPORARILY 0) FOR CALL TO MAPDIR IN CPYBAK
;<2-MONITOR>FILINI.MAC.20 - MADE IDXINI DO GTJFN FOR PROPER STRUCTURE
;<2-MONITOR>FILINI.MAC.19, 7-MAY-76 09:00:11, EDIT BY HALL
;MERGED STKVARS IN FILINI CODE
;<2-MONITOR>FILINI.MAC.18, 6-MAY-76 17:41:24, EDIT BY HALL
;FIXED BUG AT FILIN6
;<2-MONITOR>FILINI.MAC.17, 6-MAY-76 11:38:28, EDIT BY HALL
;ADDED NOTES ABOUT MISSING STRUCTURE NUMBERS
;<2-MONITOR>FILINI.MAC.16, 6-MAY-76 11:09:56, EDIT BY HALL
;MERGED IN CHANGES FOR MULTIPLE STRUCTURES (CALL INITIALIZATION ROUTINES
;FOR ALL STRUCTURES)
;<2-MONITOR>FILINI.MAC.15, 3-MAY-76 22:39:18, EDIT BY KIRSCHEN
;ADD PER-PROCESS MAPPING OF IDXTAB
;<2-MONITOR>FILINI.MAC.14, 3-MAY-76 08:37:09, EDIT BY KIRSCHEN
;RESTORE CORRECT VERSION - GENERATIONS 12 AND 13 WERE INTERIM DEVELOPMENT
;<2-MONITOR>FILINI.MAC.11, 22-APR-76 13:54:32, EDIT BY KIRSCHEN
;FIX BUG IN CREIDX
;<2-MONITOR>FILINI.MAC.10, 22-APR-76 13:11:49, EDIT BY HALL
;REMOVED INITIALIZATION OF BTBORA AND BTBLCK (MOVED TO STG)
;<2-MONITOR>FILINI.MAC.9, 21-APR-76 16:11:28, EDIT BY HALL
;ADDED STRUCTURE NUMBER TO CALLS TO DSKASA, ETC.
;<2-MONITOR>FILINI.MAC.8, 21-APR-76 14:11:25, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.7, 21-APR-76 14:00:27, EDIT BY KIRSCHEN
;<2-MONITOR>FILINI.MAC.6, 21-APR-76 13:38:06, EDIT BY KIRSCHEN
;ADD CREIDX ROUTINE
;<2-MONITOR>FILINI.MAC.5, 20-APR-76 15:52:13, EDIT BY HALL
;BUG FIXES FOR MOUNTABLE STRUCTURES
;<2-MONITOR>FILINI.MAC.3, 19-APR-76 17:40:11, EDIT BY HALL
;MOVED CHKBT, CHKBAK, AND CHKBAT CALLS INTO FILIN2 FROM MEXEC
;<2-MONITOR>FILINI.MAC.2, 19-APR-76 15:13:19, EDIT BY HALL
;CHANGED CALLS TO BIT TABLE ROUTINES
;<2-MONITOR>FILINI.MAC.1, 18-APR-76 18:11:56, EDIT BY MILLER
;NOTED CALLS TO ASOFN
;<1A-MONITOR>FILINI.MAC.97, 1-APR-76 14:10:27, EDIT BY HURLEY
;TCO # 1233 - SET RETENTION COUNT OF SYSTEM TO 0
;<1A-MONITOR>FILINI.MAC.96, 1-APR-76 13:56:14, EDIT BY HURLEY
;<1A-MONITOR>FILINI.MAC.95, 1-APR-76 13:50:58, EDIT BY HURLEY
;TCO # 1230 - FIX SPELLING ERRORS IN BUGCHK MESSAGES
;<2MONITOR>FILINI.MAC.94, 27-JAN-76 18:27:11, EDIT BY HURLEY
;MCO 29 - SET RETENTION COUNT OF SPOOL TO 0
;<2MONITOR>FILINI.MAC.93, 16-JAN-76 17:47:24, EDIT BY MURPHY
;<2MONITOR>FILINI.MAC.92, 31-DEC-75 17:09:15, EDIT BY MILLER
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
SEARCH PROLOG
IFNDEF EXADRF,< TTITLE FILINI>
IFDEF EXADRF,< TTITLE FILINI,EFILIN>
SWAPCD
;LOCAL ITEMS IN STG.MAC
PSNUM==:0 ;STRUCTURE NUMBER (OFFSET IN STRTAB) FOR
;THE PUBLIC STRUCTURE
EXTN <INIDEV>
ROOTDN==:1 ;ROOT-DIRECTORY DIRECTORY NUMBER
SYSTDN==:2 ;SYSTEM DIRECTORY NUMBER
SUBSDN==:3 ;SUBSYS DIRECTORY NUMBER
ACNTDN==:4 ;ACCOUNTS DIRECTORY NUMBER
OPERDN==:5 ;OPERATOR DIRECTORY NUMBER
SPOLDN==:6 ;SPOOL DIRECTORY NUMBER
NSYSDN==:7 ;<NEW-SYSTEM>
NSUBDN==:10 ;<NEW-SUBSYS>
NRESDN==:17 ;NUMBER OF RESERVED DIR NUMBERS FOR DEC
;SPECIAL AC DEFINITIONS USED HEREIN
DEFAC (STS,P1)
DEFAC (JFN,P2) ;SEE GTJFN FOR FUNCTIONS
DEFAC (DEV,P4)
DEFAC (F1,P5)
RS BKOFN,1 ;OFN OF BACKUP FILE DURING RECONSTRUCTION
; Initialize file stuff
;CALLED BY MEXEC WHEN A JOB IS STARTED. INITIALIZES THE JSB
JBFINI::MOVEI A,JSFREE ; Origin of free area in jsb
HRLOM A,JSBFRE ; To header
MOVEI A,IJSFRE
HRRZM A,JSFREE ; One big block free
MOVEM A,JSBFRE+2
SETOM JSBFRE+1
MOVE A,[XWD JSFREE+IJSFRE,JSFREE]
MOVEM A,JSBFRE+4
MOVEI A,MAXLW+1
MOVEM A,JSBFRE+3
MOVE A,[XWD JBCOR,JBCOR+1]
SETZM JBCOR
BLT A,JBCOR+3
UNLOCK JBCLCK
UNLOCK JSFLCK ; INIT DEALL STACK LOCK
UNLOCK JSSTLK ;INITIALIZE JSB STRUCTURE LOCK
MOVEI C,FREJP ; Start with frejp page
IJFRLP: MOVE A,C
LSH A,9
PUSH P,C
CALL RELPAG
POP P,C
CAIGE C,JSLST-1
AOJA C,IJFRLP
SETOM PRIMRY ; Primary io to controlling tty
SETOM JFNLCK ; Unlock jfnlck
SETOM LNMLCK ; UNLOCK LOGICAL NAME LOCK
MOVEI A,1
MOVEM A,MAXJFN
MOVE A,STRTAB+PSNUM ;GET SDB ADDRESS OF STRUCTURE 0 (PUBLIC)
LOAD A,STRUC,(A) ;GET ITS UNIQUE STRUCTURE CODE
STOR A,JSUC ;SAVE AS CONNECTED STRUCTURE CODE
MOVEI A,SYSTDN ;GET DIRECTORY NUMBER FOR <SYSTEM>
STOR A,JSDIR ;MAKE THIS THE CONNECTED DIRECTORY
MOVE A,[[3
ASCIZ "OPERATOR"],,USRNAM]
BLT A,USRNAM+2 ;INIT USER NAME STRING
MOVE A,[[3
ASCIZ "OPERATOR"],,ACCTSL]
BLT A,ACCTSR+1 ;INIT ACCT STRING
SETZRO JSCDF ;MARK THAT THERE IS NO DIR STRING
MOVE B,JOBNO
SETZM JOBDIR(B) ;INDICATE NOT YET LOGGED IN
MOVE A,[XWD 777000,-1]
MOVEM A,CAPMSK
MOVEM A,CAPENB
;INITIALIZE THE 3-WORD BLOCKS IN THE JSB FOR STRUCTURES. THIS CODE MERELY
;SETS THE STRUCTURE NUMBER TO -1 TO INDICATE THE SLOT IS FREE. GTSTOF
;INITIALIZES THE REST OF THE BLOCK WHEN IT IS ASSIGNED.
MOVSI T1,-STRN
HRRI T1,JSSTRT ;T1/(-COUNT,,ADDRESS OF WORD 0 OF BLOCK)
JBFIN1: MOVX T2,JSFRST
STOR T2,JSSTN,(T1) ;INITIALIZE STRUCTURE NUMBER TO -1
ADDI T1,JSSTMX-1 ;GO TO NEXT BLOCK OF WORDS
AOBJN T1,JBFIN1 ;..
RET
;INITBT - BITTABLE INITILIZATION
; CALL BTINIT
;RETURNS +1 ALWAYS
;R4 - INDEX INTO MMAP FOR BITTABLE ENTRIES FOR NON/EXTENDED BITTABLES
;
;THIS ROUTINE INITALIZES THE ADDRESSES FOR THE BITTABLE
;
RESCD
INITBT::
IFDEF EXADRF,<
SETOM EXADDR ;SET LARGE DIRECTORY
>
IFNDEF EXADRF,<
MOVEI T1,1 ;SET NON/ZERO SECTION
MOVEM T1,EXADDR>
SKIPN EXADFL ;CHECK TO SEE IF EXAD MACHINE
SETZM EXADDR ;NO PROTECT FROM ATTEMPT TO USE NONZERO SECTIONS
MOVNI T4,<BTBMAX+777>/1000 ;NON EXTENDED
HRLZS T4
MOVEI T1,BTB ;FIND BASE OF BITTABLE FOR NON EX
SKIPE EXADDR ;WHICH
MOVE T1,[BTSEC,,0] ;EXTENDED
MOVEM T1,BTBORA ;SET ORIGIN
LSH T1,-PGSFT ;MAKE PAGE ADDRESS
MOVEM T1,BTSTRT ;SAVE START
HRR T4,T1 ;SET PAGE NUMBER FOR RETURN
ADDI T1,<BTBMAX-1>/1000 ;SET END PAGE NUMBER
MOVEM T1,BTEND ;SET END OF BITMAP
MOVEI T1,BTBMAX ;BITTABLE MAX FOR NON/EXTENDED
IFDEF EXADRF,<
SKIPGE EXADDR
MOVEI T1,BTMXSZ ;EXTENDED
>
MOVEM T1,BTBSIZ ;SET SIZE
RET
SWAPCD
;FILINI - File system initialization
; CALL FILINI
;RETURNS +1: ALWAYS
;THIS CODE IS CALLED BY JBI0 IN MEXEC AS PART OF SYSTEM STARTUP
;IF THE MONITOR WAS STARTED AT SYSGO1, STARTF IS 0
;IF IT WAS STARTED AT SYSLOD, STARTF HAS SOME COMBINATION OF THE FOLLOWING BITS SET:
; MI%RFS IF THE USER REQUESTED REFRESHING THE FILE SYSTEM
; MI%RCN IF THE USER DID NOT REQUEST REFRESH
; MI%HMB IF THE HOME BLOCKS WERE REWRITTEN
;IF THE SYSTEM WAS STARTED AT SYSGO1, OR IF IT WAS STARTED AT SYSLOD,
;BUT ALL QUESTIONS WERE ANSWERED 'NO', STARTF IS 0
FILINI::STKVAR <FILINZ>
CALL DEVINI ;INIT DEVICE TABLES
MOVEI T1,<NIDXPG*PGSIZ>/.IDXLN ;MAXIMUM DIRECTORY NUMBER
IFDEF EXADRF,<
SKIPGE EXADDR ;IF EXADDR -1 THEN LARGE DIRECTORY NUMBER LEGAL
MOVEI T1,<MXDRNM*PGSIZ>/.IDXLN ;MAX LARGE DIRECTORY NUMBER
>
MOVEM T1,MXDIRN ;SET UP MAX DIRECTORY NUMBER
MOVE A,[XWD MSEC1,DIRPGA] ;GET ADDRESS OF DIRECTORY MAPPING AREA
SKIPE EXADDR ;IF EXADDR 0 THEN ALL SEC 0
MOVE A,[DRSECN,,0] ;DIRECT SECTION (SEC DRSECN)
MOVEM A,DIRORA ;INITIALIZE THE BASE ADDRESS WORD
MOVEI A,DRMASZ ; MAGIC NUMBER OF DIRECTORY PAGES
IFDEF EXADRF,<
SKIPGE EXADDR ;SET DIRECTORY SIZE 0=SEC 0 30PGS
;1=SEC 1 SIZE 30 PGS -1=SEC1 777PGS
MOVEI A,DRMXSZ
>
MOVEM A,NDIRPG
MOVE A,[<30+^D35>/^D36+1] ;SET SIZE OF FREE BIT TABLE
IFDEF EXADRF,<
SKIPGE EXADDR
MOVE A,[<DRMXSZ+^D35>/^D36+1]
>
MOVEM A,FBTSIZ
MOVE A,[EXP IDXPGA] ;GET ADDRESS OF INDEX TABLE
SKIPE EXADDR ;CHECK FOR EXADDR HERE
MOVE A,[IDXSEC,,0] ;SET IDX SECTION
MOVEM A,IDXORA ;SET UP BASE OF INDEX TABLE
UNLOCK LDTLCK ;INITIALIZE THE DIRECTORY LOCK TABLE
SETZM FILINZ ;ASSUME NO NEED TO FIX FRONT END FILE SYSTEM
SKIPN B,STARTF ;ZERO IF STARTED AT SYSGO1
JRST FILIN1 ;DIDN'T START AT SYSLOD. DO USUAL STARTUP
;STARTED THE MONITOR AT SYSLOD. SEE WHAT THEY WANT TO DO
TXNE B,MI%RFS ;DO WE WANT A FULL REFRESH?
JRST FILRFS ;YES. GO DO IT
TXNE B,MI%HMB ;NO. WERE THE HOME BLOCKS REWRITTEN?
SETOM FILINZ ;YES. INDICATE POINTER TO FRONT END FILE SYSTEM
; HAS BEEN CLOBBERED
;NOT REFRESHING. SEE IF RECONSTRUCTING ROOT-DIRECTORY
HRROI A,[ASCIZ /RECONSTRUCT ROOT-DIRECTORY? /]
PSOUT
CALL YESNO ;SEE IF RECONSTRUCTING
JUMPN A, [ MOVEI A,PSNUM ;YES. A/STRUCTURE NUMBER FOR PS
CALL FILREC ;GO DO RECONSTRUCTION
BUG(HLT,BADREC,<FILINI - Reconstruction of ROOT-DIRECTORY failed>)
HRROI A,RCDMSG ;GET POINTER TO ADVISORY MESSAGE
PSOUT ;INFORM USER EVERYTHING OK SO FAR
MOVX B,MI%BTB ;INDICATE REBUILD BIT TABLE
IORM B,STARTF ; FOR MEXEC TO SEE LATER
JRST FILIN1] ;THEN PROCEED NORMALLY
;IF EXPANDING A STRUCTURE WITHOUT REFRESHING, ANSWER TO NEXT QUESTION
;SHOULD BE YES
MOVX A,MI%RCN ;NOT RECONSTRUCTING. CLEAR THE BIT
ANDCAM A,STARTF ; IN STARTF (SET BY FSSINI)
HRROI A,[ASCIZ/REBUILD BIT TABLE? /]
PSOUT ;ASK ABOUT BIT TABLE
CALL YESNO ;GET THE ANSWER
JUMPN A,[MOVX B,MI%BTB ;INDICATE REBUILD BIT TABLE
IORM B,STARTF ; FOR MEXEC TO SEE LATER
JRST FILIN1] ;THEN PROCEED NORMALLY
;USER DIDN'T WANT TO REFRESH, RECONSTRUCT, OR REBUILD. ASSUME NORMAL STARTUP
SETZM STARTF ;ACT AS IF NOTHING HAD HAPPENED
HRROI A,[ASCIZ /NORMAL STARTUP ASSUMED.
/]
PSOUT
; Make directory and index known to system
FILIN1:
MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
CALL SETRDO ;SET UP ROOT-DIRECTORY OFN
BUG(HLT,IBOFNF,<FILINI: ASOFN FAILURE FOR ROOT DIRECTORY IB>)
MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
SKIPN B,STRTAB(A) ;GET SDB ADDRESS FOR THIS STRUCTURE
JRST FILERR ;PS MUST BE DEFINED
CALL INISTR ;GO SET UP DEVNAM, ETC.
MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER FOR PS
CALL MNTBTB ;GET AN OFN ON THE BIT TABLE FILE
JRST [ BUG(CHK,NOBTB,<FILINI - UNABLE TO OPEN BIT TABLE FILE>)
MOVX T4,SF%BTE!SF%CDE ;FAILED. INDICATE BIT TABLE ERRORS
IORM T4,FACTSW ;SO THAT SYSJOB WON'T START
MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER FOR PS
CALL CRTBTB ;INITIALIZE A PRIVATE COPY OF THE BIT
; TABLE SO WE CAN RUN
BUG(HLT,BTBCR1,<FILINI - NO BIT TABLE FILE AND UNABLE TO CREATE ONE>)
MOVEI T1,PSNUM ;GET STRUCTURE NUMBER FOR PS
HRRZ T2,STRTAB(T1) ;POINT TO ITS SDB
MOVX T4,MI%ASG ;FORBID ASSIGNING PAGES UNTIL CHECKD CAN
IORM T4,SDBSTS(T2) ; RUN AND REBUILD THE BIT TABLE
ADDI T1,DVXST0 ;POINT TO THIS STRUCTURE IN DEVICE TABLES
MOVX T4,D1%INI ;CLEAR THE 'INI' BIT ON THE ASSUMPTION
ANDCAM T4,DEVCH1(T1) ; THAT CHECKD WILL REBUILD THE BIT TABLE
JRST .+1]
MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER FOR PS
CALL FNDIDX ;GET OFN FOR INDEX TABLE
JRST [ MOVEI T1,PSNUM ;FAILED.T1/ STRUCTURE NUMBER FOR PS
CALL MAKIDX ;NOT THERE, MAKE A NEW ONE
BUG(HLT,BADXT1,<INDEX TABLE MISSING AND CAN NOT BE CREATED>)
BUG(CHK,BADXT2,<INDEX TABLE MISSING AND WAS CREATED>)
MOVX A,MI%XTB ;INDICATE NEEDS TO BE INITIALIZED LATER
IORM A,STARTF
MOVX A,SF%BTE ;FORCE CHECKD TO BE RUN BEFORE
IORM A,FACTSW ; SYSTEM COMES UP FOR TIME-SHARING
JRST .+1]
JRST FILIN2 ;PROCEED TO COMMON CODE
;FILRFS - HERE WHEN REFRESHING FILE SYSTEM
FILRFS: SE1ENT
MOVEI A,PSNUM ;A/STRUCTURE NUMBER
SKIPN B,STRTAB(A) ;B/ADDRESS OF SDB
JRST FILERR ;PS MUST BE DEFINED
CALL INISTR ;SET UP DEVNAM, INDICATE BEING INITED
MOVEI A,PSNUM ;A/STRUCTURE NUMBER
CALL CRTBTB ;INITIALIZE A BIT TABLE IN CORE
BUG(HLT,BTBCRT,<FILINI - COULD NOT INITIALIZE BIT TABLE FOR PUBLIC STRUCTURE>)
;CREATE INDEX BLOCK FOR PRIMARY COPY OF ROOT-DIRECTORY
MOVE A,DIDSCI ;GET INITIAL INDEX BLOCK ADR FOR ROOT
MOVEI B,PSNUM ;B/STRUCTURE NUMBER
CALL NEWIB ;GET THE INDEX BLOCK FOR THE ROOT DIR
BUG(HLT,NEWROT,<FILRFS - NEWIB FAILURE FOR ROOT-DIRECTORY>)
MOVE C,STRTAB+PSNUM ;GET ADDRESS OF SDB
STOR A,STRRDO,(C) ;REMEMBER THE OFN OF THE ROOT-DIR INDEX BLOCK
;CREATE INDEX BLOCK FOR BACKUP COPY OF ROOT-DIRECTORY
MOVE A,DIDSCJ ;GET AN OFN FOR BACKUP FILE ALSO
MOVEI B,PSNUM ;B/STRUCTURE NUMBER
CALL NEWIB ;SO BACKUP FILE STARTS IN A KNOWN SPOT
BUG(HLT,NEWBAK,<FILRFS - NEWIB FAILURE FOR BACKUP ROOT-DIR>)
MOVEM A,BKOFN ;SAVE ITS OFN
;SET UP THE INDEX TABLE FOR ROOT-DIRECTORY. THIS CODE MAKES A TEMPORARY
;COPY OF IDXTAB IN JSB FREE SPACE IN ORDER TO CREATE THE FIRST FEW
;DIRECTORIES ON THE SYSTEM. IDXORA POINTS TO THAT FREE SPACE TEMPORARILY.
PUSH P,IDXORA ;SAVE THE OLD IDXTAB ORIGIN
CALL ASGPAG ;GET PAGE TO PUT TEMPORARY IDXTAB INTO
BUG(HLT,IDXNOS,<FILINI - COULD NOT ASSIGN FREE SPACE FOR IDXTAB>)
MOVEM A,IDXORA ;SAVE THE ADDRESS FOUND
;PUT AN ENTRY FOR ROOT-DIRECTORY IN THE TEMPORARY IDXTAB, AND INITIALIZE
;THE DIRECTORY
MOVEI A,ROOTDN ;NOW SET UP THE INDEX TABLE
MOVEI B,0 ;DONT HAVE AN FDB ADDRESS YET
MOVE C,DIDSCI ;GET DISK ADR OF INDEX BLOCK
MOVEI D,ROOTDN ;SETUP SUPERIOR AS ROOT DIRECTORY
CALL SETIDX ;SETUP THE INDEX TABLE FOR THE ROOT DIR
BUG(HLT,FILRID,<FILINW: INDEX TABLE ALREADY SET UP FOR ROOT DIR>)
MOVEI A,ROOTDN ;NOW INITIALIZE THE DIRECTORY FILE
MOVEI B,PSNUM ;ASSUME THE PUBLIC STRUCTURE
CALL DIRINI ; TO LOOK LIKE A DIRECTORY (SETS UP HEADER)
INIROT: BUG(HLT,FILIRD,<FILINW: COULD NOT INITIALIZE THE ROOT DIRECTORY>)
;CREATE A FEW SPECIAL DIRECTORIES
MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
CALL FILCRD ;GO CREATE ALL THE DIRECTORIES
MOVE A,BKOFN ;A/OFN OF BACKUP FILE
CALL RELOFN ;RELEASE OFN OF BACKUP FILE
SETZM BKOFN
MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
;CREATE A BIT TABLE FILE AND COPY THE TEMPORARY ONE INTO IT.
CALL WRTBTB ;GO CREATE BIT TABLE FILE
JRST [ CAIE T1,MSTRX6 ;DID HOME BLOCK WRITE FAIL?
BUG(HLT,FILBTB,<UNABLE TO WRITE BIT TABLE FILE>)
BUG(CHK,FILHOM,<UNABLE TO REWRITE HOME BLOCKS IN WRTBTB>)
JRST .+1] ;THIS ISN'T FATAL UNLESS OLD STYLE HOME BLOCKS
;CREATE A PERMANENT IDXTAB FILE AND MAKE IDXORA POINT TO THE STANDARD
;PLACE IN THE MONITOR MAP. RELEASE THE JSB FREE SPACE
MOVEI A,PSNUM ;GET NUMBER OF THE PUBLIC STRUCTURE
CALL MAKIDX ;GO CREATE INDEX FILE
JRST IDXBAD ;COULD NOT SET UP INDEX TABLE FILE
MOVX T1,MI%XTB ;INDICATE INDEX TABLE MUST BE INITIALIZED
IORM T1,STARTF ; FOR COMMON CODE TO SEE LATER
MOVEI A,JSBFRE ;RELEASE THE IDXTAB PAGE
MOVE A,IDXORA ;GET THE ADDRESS
CALL RELPAG ;RELEASE FREE PAGE
POP P,IDXORA ;RESTORE THE IDXTABLE ADDRESS
;CREATE THE FRONT END FILE SYSTEM
SE0ENT
MOVEI A,PSNUM ;GET NUMBER OF PUBLIC STRUCTURE
SKIPGE T2,FEFSIZ ;SEE IF FE FILE SYSTEM SIZE WAS GIVEN
JRST [ MOVEI T1,PSNUM ;NO. T1/STRUCTURE NUMBER FOR PS
CALL GTFESZ ;GET THE SIZE FROM THE HOME BLOCKS
BUG(HLT,NOFEFS,<FILINI - UNABLE TO GET SIZE OF FRONT END FILE SYSTEM>)
MOVE T2,T1 ;T2/NUMBER PAGES IN FE FILE SYSTEM
JRST .+1]
MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER
CALL FEFSYS ;CREATE A FRONT END FILE SYSTEM
BUG(CHK,FILFEF,<Could not create Front End File System>)
;CREATE BOOTSTRAP.BIN
MOVEI T1,PSNUM ;GET NUMBER OF PUBLIC STRUCTURE
SKIPGE T2,BOTSIZ ;SEE IF BOOTSTRAP.BIN WAS GIVEN
JRST [ MOVEI T1,PSNUM ;NO. T1/STRUCTURE NUMBER FOR PS
CALL GTBTSZ ;GET THE SIZE FROM THE HOME BLOCKS
BUG(HLT,NOBTBN,<FILINI - UNABLE TO GET SIZE OF BOOTSTRAP.BIN FILE>)
MOVE T2,T1 ;T2/NUMBER OF PAGES IN BOOTSTRAP.BIN
JRST .+1]
CALL BOTSYS ;CREATE A BOOTSTRAP.BIN FILE
BUG(CHK,FILBOT,<COULD NOT CREATE BOOTSTRAP.BIN FILE>)
;UPDATE THE DISK FOR ROOT-DIRECTORY
MOVE T1,STRTAB+PSNUM ;GET SDB FOR PS
LOAD T1,STRRDO,(T1) ;GET OFN ON <ROOT-DIRECTORY>
HRLZS T1 ;OFN,,0
MOVEI T2,1000 ;ALL PAGES
CALL UPDPGS ;UPDATE ON DISK
MOVE T1,STRTAB+PSNUM ;GET SDB AGAIN
LOAD T1,STRRDO,(T1) ; OFN
CALL UPDOFN ;UPDATE OFN ALSO
;..
;HERE FOR NORMAL STARTUP OR WHEN INITIALIZATION IS COMPLETE
;..
FILIN2: SKIPN B,STRTAB+PSNUM ;GET SDB ADDRESS FOR PS
JRST FILERR ;PS MUST BE DEFINED
MOVEI A,ROOTDN ;NOW CHECK ROOT-DIR
LOAD C,STRUC,(B) ;GET UNIQUE CODE
HRL A,C ;A/UNIQUE CODE,,DIRECTORY
CALL SETDIR ;MAP IN ROOT-DIR AND LOCK IT
BUG(HLT,FILMAP,<FILIN2: COULD NOT MAP IN ROOT-DIRECTORY>)
CALL BLKSCN ;MAKE SURE IT IS VALID
BUG(HLT,BADROT,<FILIN2: ROOT-DIRECTORY IS INVALID>)
CALL USTDIR ;UPDATE AND UNLOCK THE DIR
MOVE B,STARTF ;GET STARTUP FLAGS
TXZE B,MI%XTB ;DO WE NEED TO INIT INDEX TABLE?
JRST [ MOVEI A,PSNUM ;YES. A/ NUMBER OF PS
CALL IDXINI ;INITIALIZE IT
JRST IDXBAD
JRST .+1]
CALL ISDIRT ;INIT SPECIAL DIR TABLE
CALL INIDEV ;INITIALIZE DEVICE DRIVERS
CALL ENQINI ;INITIALIZE THE ENQ/DEQ DATA BASE
CALL SNPINI ;INITIALIZE THE SNOOP DATA BASE
CALL DMPINI ;INITIALIZE THE DUMP MODE DATA BASE
CALL NETINI ;INITIALIZE THE ARPANET STORAGE
MOVX T3,MI%BTB ;DON'T CHECK BIT TABLE IF REBUILDING
TDNE T3,STARTF
JRST FILIN3
MOVE T1,STRTAB+PSNUM ;GET POINTER TO SDB FOR PS
MOVX T3,MI%ASG ;IF ASSIGNMENTS ARE PROHIBITED, BIT TABLE
TDNE T3,SDBSTS(T1) ; DOESN'T EXIST. DON'T TRY TO CHECK IT
JRST FILIN3 ;OR CHECK THE ROOT-DIRECT ORY BACKUP
MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER
MOVX T2,MI%MSG ;T2/REQUEST MESSAGES ON CONSOLE
CALL CHKBT ;CHECK CONSISTENCY OF BIT TABLE AND FIX IT
JRST [ MOVX T3,SF%BTE ;FAILED. INDICATE BIT TABLE ERRORS ON PS
IORM T3,FACTSW ; FOR MEXEC TO SEE LATER
JRST .+1] ; AND THEN PROCEED NORMALLY
MOVX T3,MI%RCN ;DON'T CHECK THE BACKUP IF RECONSTRUCTING
TDNN T3,STARTF ; (FILREC DELETED IT)
JRST [ MOVEI T1,PSNUM ;T1/STRUCTURE NUMBER FOR PS
CALL CHKBAK ;CHECK BACKUP OF ROOT-DIRECTORY
BUG(CHK,BADBAK,<FILIN2 - BACKUP COPY OF ROOT DIRECTORY IS NOT GOOD>)
JRST .+1]
FILIN3:
SKIPE FILINZ ;DID WE REWRITE HOME BLOCKS?
JRST [ MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
CALL FIXFES ;YES. PUT POINTER TO FE FILE SYSTEM BACK IN
BUG(CHK,FIXBAD,<Could not re-write Home Blocks to point to FE Filesystem>)
JRST .+1] ; HOME BLOCKS
SKIPE FILINZ ;DID WE REWRITE HOME BLOCKS?
JRST [ MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
CALL FIXBOT ;YES -- PUT POINTER TO BOOT FILE BACK
BUG(CHK,FIXBDB,<COULD NOT RE-WRITE HOME BLOCKS TO POINT TO BOOTSTRAP.BIN>)
JRST .+1]
MOVEI A,PSNUM ;A/STRUCTURE NUMBER FOR PS
SKIPN STRTAB(A) ;IS THERE AN ENTRY FOR PS?
JRST FILERR ;PS MUST BE DEFINED
CALL FRESTR ;GO CLEAR SLOT IN DEVNAM, ETC.
RET
FILERR: BUG(HLT,STZERO,<FILINI: STRTAB ENTRY FOR PS IS 0>)
RET
IDXBAD: BUG(HLT,BADXTB,<FILIN2: Could not initialize index table>)
;ROUTINE TO CREATE ALL THE STANDARD DIRECTORIES
;ACCEPTS:
; T1/STRUCTURE NUMBER
; CALL FILCRD
;RETURNS +1: ALWAYS
;CALLED DURING REFRESH ONLY
BLKSIZ==<.CDDGP+1>+<MAXLW+2> ;SPACE FOR CRDIR BLOCK+DEV:<DIR> STRING
FILCRD::SAVEQ ;PRESERVE SOME ACCUMULATORS
MOVEM A,Q3 ;SAVE STRUCTURE NUMBER
MOVEI B,BLKSIZ ;ASSIGN SPACE FOR CRDIR BLOCK AND DIR STRING
CALL ASGJFR ;USE JSB FREE SPACE
JRST [ BUG(CHK,FILJB1,<FILCRD: No room to create standard system directories>)
RET ] ;RETURN
MOVEI Q2,1(A) ;SAVE ADDRESS OF CRDIR BLOCK
MOVSI Q1,-CRDTBL ;SET UP AOBJN COUNTER
FILCR1: HRROI A,[ASCIZ/DEC-20/] ;GET DEFAULT PASSWORD
MOVEM A,.CDPSW(Q2) ;SET UP PARAMETER BLOCK FOR CRDIR
MOVX A,SC%OPR ;MAKE THE DIR BE OPERATOR
MOVEM A,.CDPRV(Q2) ;ONLY FOR DIR'S THAT ARE NOT FILES-ONLY
MOVX A,MD%FO ;SET UP FOR FILES-ONLY DIRECTORIES
MOVEM A,.CDMOD(Q2) ;ONLY SET ID CD%MOD IS SET
HRLZI A,377777 ;SET INFINITY FOR THOSE DIRS
MOVEM A,.CDLIQ(Q2) ; WITH QUOTAS
MOVEM A,.CDLOQ(Q2) ; ...
HRROI A,.CDDGP+1(Q2) ;GET DESTINATION FOR COMPLETE STRING
MOVE B,Q3 ;GET STRUCTURE NUMBER
HRRO C,CRDTAB(Q1) ;GET POINTER TO DIRECTORY NAME
CALL STRST ;FORM COMPLETE DIRECTORY STRING (INCLUDING STR)
JRST [ BUG(CHK,FILCCD,<Could not create directory>)
JRST FILCR3 ] ;GO ON TO NEXT DIRECTORY
MOVEI A,1(Q1) ;GET DIRECTORY NUMBER BEING SET
MOVEM A,.CDNUM(Q2)
MOVE B,STRTAB(Q3) ;GET ADDRESS OF SDB FOR THIS STRUCTURE
CAIE A,ROOTDN ;CREATING ROOT-DIRECTORY ?
JRST FILCR2 ;NO, GO ON
SETONE STCRD,(B) ;YES, NOTE ROOT-DIRECTORY BEING CREATED
FILCR2: MOVEI A,SYSDPT ;GET PROTECTION OF SYSTEM AND SUBSYS
MOVEM A,.CDDPT(Q2) ;SET UP PROTECTION WORD
MOVEI A,SYSFPT ;GET FILE PROTECTION OF SYSTEM AND SUBSYS
MOVEM A,.CDFPT(Q2)
SETZM .CDRET(Q2) ;SET RETENTION COUNT TO 0
HRROI A,.CDDGP+1(Q2) ;GET POINTER TO DIRECTORY NAME
HLLZ B,CRDTAB(Q1) ;GET FLAGS FOR THIS DIR
HRR B,Q2 ;GET ADDRESS OF PARAMETER BLOCK
CRDIR ;CREATE THE DIR
HRRZ A,A ;GET THE DIRECTORY NUMBER
CAIN A,ROOTDN ;WAS ROOT-DIR JUST CREATED?
JRST [ MOVE B,STRTAB(Q3) ;GET ADDRESS OF SDB
SETZRO STCRD,(B) ;ROOT-DIRECTORY NO LONGER BEING CREATED
MOVE A,Q3 ;GET STRUCTURE NUMBER
CALL CREBAK ;GO CREAtE BACKUP FILE
BUG(CHK,FILBAK,<FILCRD: COULD NOT CREATE BACKUP OF ROOT-DIR>)
JRST .+1]
FILCR3: AOBJN Q1,FILCR1 ;LOOP BACK UNTIL ALL DIR'S ARE CREATED
MOVEI A,JSBFRE ;NOW RETURN THE SPACE TO THE JSB
MOVEI B,-1(Q2) ;GET ADDRESS OF FREE BLOCK
CALLRET RELFRE ;RELEASE THE SPACE AND RETURN
CRDTAB: CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<ROOT-DIRECTORY>/]
CD%RET!CD%FPT!CD%DPT!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<SYSTEM>/]
CD%FPT!CD%DPT!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<SUBSYS>/]
CD%RET!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<ACCOUNTS>/]
CD%PSW!CD%PRV!CD%NUM+[ASCIZ/<OPERATOR>/]
CD%RET!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<SPOOL>/]
CD%RET!CD%FPT!CD%DPT!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<NEW-SYSTEM>/]
CD%FPT!CD%DPT!CD%MOD!CD%NUM!CD%LIQ!CD%LOQ+[ASCIZ/<NEW-SUBSYS>/]
CRDTBL==.-CRDTAB
;ROUTINE TO CREATE THE BACKUP FILE TO HOLD A COPY OF THE ROOT-DIR
;ACCEPTS IN A/ STRUCTURE NUMBER
; CALL CREBAK
;RETURNS +1: FAILED
; +2: OK
;CALLED DURING REFRESH ONLY
CREBAK: ASUBR <CREBKS,CREBKJ,CREBLK>
MOVEI B,^D15 ;GET ENOUGH SPACE FOR NAME OF BACKUP FILE
CALL ASGJFR ;GO ASSIGN JSB FREE SPACE
RETBAD ;FAILED
MOVEM A,CREBLK ;SAVE ADDRESS OF BLOCK
HRROI A,1(A) ;FORM POINTER TO WHERE NAME WILL GO
MOVE B,CREBKS ;GET STRUCTURE NUMBER
HRROI C,[ASCIZ/<ROOT-DIRECTORY>BACKUP-COPY-OF-ROOT-DIRECTORY.IMAGE;P770000/]
CALL STRST ;FORM COMPLETE FILE NAME
JRST CREBK1 ;FAILED, GO RELEASE SPACE AND RETURN
MOVX A,GJ%NEW+GJ%PHY+GJ%SHT
HRRZ B,CREBLK ;GET ADDRESS OF FREE BLOCK
HRROI B,1(B) ;FORM POINTER TO FILE NAME
GTJFN ;CREATE BACKUP FILE
JRST CREBK1 ;FAILED, RELEASE SPACE AND RETURN
MOVEM A,CREBKJ ;SAVE JFN
HRRZ JFN,A ;NOW MAP IN FDB
IMULI JFN,MLJFN
MOVE STS,FILSTS(JFN)
HRRI DEV,DSKDTB
HRL DEV,CREBKS ;GET STRUCTURE NUMBER
SE1CAL
CALL GETFDB
JRST [ MOVE A,CREBKJ ;COULD NOT GET FDB
RLJFN ;RELEASE JFN
JFCL
JRST CREBK1 ] ;GO RELEASE SPACE AND RETURN
MOVE B,CREBKS ;GET STRUCTURE NUMBER
MOVE B,STRTAB(B) ;GET ADDRESS OF SDB
LOAD B,STRBXB,(B) ;GET ADDRESS OF INDEX BLOCK
STOR B,FBADR,(A) ;PLUNK IN THE DISK ADR (MAGIC)
SETZRO FBNXF,(A) ;FILE NOW EXISTS
SETONE <FBNOD,FBDIR>,(A) ;THIS FILE IS NOT TO BE DUMPED
;MAKE IT SO THE FILE CANNOT BE DELETED
;BY SETTING THE FBDIR BIT
CALL USTDIR ;UNLOCK DIR
MOVE A,CREBKJ ;GET BACK JFN
RLJFN ;RELEASE THE JFN
JFCL
MOVEI A,JSBFRE ;GET FREE HEADER
MOVE B,CREBLK ;GET ADDRESS OF FREE BLOCK
CALL RELFRE ;RELEASE FREE BLOCK
RETSKP ;GIVE OK RETURN
; HERE ON ERRORS TO RELEASE SPACE AND GIVE FAIL RETURN
CREBK1: MOVEI A,JSBFRE ;GET FREE HEADER
MOVE B,CREBLK ;GET ADDRESS OF FREE BLOCK
CALLRET RELFRE ;RELEASE SPACE AND GIVE FAIL RETURN
;INISTR - INITIALIZE STRUCTURE
;ACCEPTS:
; A/STRUCTURE NUMBER
; B/START OF SDB
;RETURNS +1: ALWAYS
;CALLED WHEN A STRUCTURE IS MOUNTED BUT IS NOT YET GENERALLY AVAILABLE.
;THE CALLING FORK IS GIVEN CONTROL OF THE STRUCTURE UNTIL FRESTR
;IS CALLED. THE RIGHT HALF OF SDBSTS HOLDS THE FORK NUMBER
;ALSO, CLEARS D1%NIU IN DVCH1 TO INDICATE SLOT HAS A REAL STRUCTURE
INISTR:
SAVET
HRRZ A,A ;GET STRUCTURE NUMBER
MOVEI C,DVXST0 ;GET START OF STRUCTURES IN DEVXXX
ADD C,A ;GET DEVXXX INDEX FOR THIS UNIT
SKIPN A ;IS THIS STRUCTURE 0?
SKIPA D,PSNAM ;YES. MAKE ITS ALIAS BE 'PS'
MOVE D,SDBNAM(B) ;NO. GET STRUCTURE NAME FROM SDB
MOVEM D,DEVNAM(C) ; AND STORE IN DEVNAM
MOVX D,D1%INI ;INDICATE STRUCTURE BEING INITED
IORM D,DEVCH1(C)
MOVX D,D1%NIU ;CLEAR INDICATOR THAT SLOT IS NOT IN
ANDCAM D,DEVCH1(C) ; USE
MOVE D,JOBNO ;GET CURRENT JOB
STOR D,STRJB,(B) ;INDICATE IT IS THE INITING JOB
; AND THUS THE ONLY LEGAL USER WHILE
; D1%INI IS SET
RET
;FRESTR - FREE A STRUCTURE
;ACCEPTS:
; T1/STRUCTURE NUMBER
; CALL FRESTR
;RETURNS +1: ALWAYS
;MAKES A STRUCTURE AVAILABLE FOR GENERAL USE
FRESTR::
SAVET
HRRZ A,A
MOVEI C,DVXST0
ADD C,A
MOVX D,D1%INI ;INDICATE NOT BEING INITIALIZED
ANDCAM D,DEVCH1(C)
HRROS DEVUNT(C) ;INDICATE AVAILABLE TO ALL JOBS
RET
;SET UP OFN OF ROOT-DIRECTORY FOR A STRUCTURE
;
; CALL:
; ACCEPTS IN T1/ STRUCTURE #
; CALL SETRDO
; RETURNS: +1 ERROR
; +2 SUCCESS
;CALLED DURING NORMAL STARTUP ONLY
SETRDO::STKVAR <STRDOS> ;ALLOCATE SPACE FOR SDB ADDRESS
MOVE T2,T1 ;COPY STRUCTURE NUMBER
SKIPN T1,STRTAB(T2) ;IS THERE AN SDB FOR THIS STRUCTURE ?
RET ;NO, ERROR
MOVEM T1,STRDOS ;YES, SAVE ADDRESS OF SDB
LOAD T1,STRRXB,(T1) ;GET DISK ADDRESS OF XB FOR ROOT-DIRECTORY
TXO T1,FILWB+THAWB ;GET ACCESS BITS
CALL ASROFN ;GET AN OFN FOR THE ROOT-DIRECTORY
RET ;ERROR, RETURN
MOVE T2,STRDOS ;GET BACK ADDRESS OF SDB
STOR T1,STRRDO,(T2) ;STORE OFN FOR ROOT-DIRECTORY IN SDB
RETSKP ;RETURN SUCCESS
;INIT SPECIAL DIRECTORY TABLE WITH ACTUAL DIRNUMS.
; CALL ISDIRT
; RETURNS +1 ALWAYS
;CALLED FROM COMMON CODE
ISDIRT: SAVEQ
MOVNI Q1,NSDIR0 ;GET NEG OF LENGTH OF INITIAL TABLE
MOVSI Q1,0(Q1) ;SETUP AS AOBJN PTR
SETZM NSDIRT ;INIT COUNT OF ENTRIES IN RUNTIME TABLE
ISDIR1: HRRZ B,SDIRT0(Q1) ;GET LOC OF DIR NAME STRING
HRLI B,(POINT 7,0)
ILDB A,B ;COUNT CHARS IN NAME
JUMPN A,.-1 ;SCANNING UNTIL NULL
HRRZ A,SDIRT0(Q1) ;CONSTRUCT LOOKUP PTR FOR CALL
MOVEI A,-1(A) ;RH OF LOOKUP PTR IS ADR-1
SUBM A,B ;COMPUTE NEG # OF WORDS IN NAME STRING
HRLI A,1(B) ;LH OF LOOKUP PTR IS -(NWORDS-1)
MOVE Q2,A ;SAVE A
MOVEI A,PSNUM ;THIS FEATURE IS FOR PS ONLY
CALL STRCNV ;GET UNIQUE CODE
JRST ISDIR2 ;FAILED, SKIP THIS ONE
HRRZ B,A ;GET UNIQUE CODE
MOVE A,Q2 ;GET BACK ADDRESS OF STRING BLOCK
CALL DIRLKX ;LOOKUP THIS DIRECTORY THE USUAL WAY
JRST ISDIR2 ;FAILED, IGNORE IT
MOVM B,NSDIRT ;GET INDEX TO NEXT FREE ENTRY IN SDIRTB
HRLM A,SDIRTB(B) ;SUCCESS, SAVE DIRNUM IN TABLE
HRRZ A,SDIRT0(Q1)
HRRM A,SDIRTB(B) ;SAVE STRING ADR IN TABLE
SOS NSDIRT ;UPDATE NEG COUNT OF ENTRIES IN TABLE
ISDIR2: AOBJN Q1,ISDIR1 ;DO ALL DIRS
RET
;FILREC - RECONSTRUCT ROOT-DIRECTORY
;ACCEPTS:
; A/STRUCTURE NUMBER
; CALL FILREC
;RETURNS +1:ALWAYS
;ROUTINE TO RECONSTRUCT THE ROOT-DIRECTORY
;THIS IS DONE BY COPYING THE INDEX BLOCK OF THE BACKUP ROOT-DIR
;INTO THE INDEX BLOCK FOR THE ROOT-DIRECTORY
;AFTER COPYING THE BACKUP INDEX BLOCK, THE ROOT-DIR SHOULD BE INTACT
;THE BACKUP INDEX BLOCK IS ZEROED
;NOTE: A NEW BACKUP FILE IS NOT MADE HERE; THE NEXT CALL TO CPYBAK
;WILL CREATE IT. THIS EXITS WITHOUT AN OFN FOR ROOT-DIRECTORY. THE CALLER MUST
;ASSIGN THE OFN
FILREC::STKVAR <STRN02,FILRER,FILREB,FILREO>
MOVEM A,STRN02 ;SAVE STRUCTURE NUMBER
MOVE A,STRTAB(A) ;GET ADDRESS OF SDB
LOAD A,STRBXB,(A) ;GET ADDRESS OF XB FOR BACKUP FILE
TLO A,(FILWB+THAWB) ;OPEN FOR WRITE AND THAWED
MOVE B,STRN02 ;B/STRUCTURE NUMBER
CALL ASROFN ;GET AN OFN FOR BACKUP FILE
RETBAD () ;FAILED, RETURN
MOVEM A,BKOFN ;SAVE THE OFN FOR THE BACKUP FILE
MOVE A,DIDSCI ;GET ADR OF ROOT-DIR
TLO A,(FILWB+FILNB+THAWB)
MOVE B,STRN02 ;B/STRUCTURE NUMBER
CALL ASROFN ;GET AN OFN FOR ROOT-DIR
JRST FLRER1 ;FAILED, GO RELEASE BACKUP FILE OFN AND RETURN
MOVEM A,FILREO ;SAVE THE OFN
MOVE B,STRN02 ;GET STRUCTURE NUMBER
MOVE B,STRTAB(B) ;GET ADDRESS OF SDB
STOR A,STRRDO,(B) ;SAVE OFN OF ROOT-DIRECTORY
CALL ASGPAG ;GET A PAGE TO MAP ROOT-DIR INTO
JRST FLRER2 ;FAILED, RELEASE OFN'S AND RETURN ERROR
MOVEM A,FILRER ;SAVE ADDRESS
MOVE B,A ;NOW MAP IN THE IB OF THE ROOT
TLO B,(PTRW) ;READ WRITE
MOVE A,FILREO ;GET THE OFN
CALL SETMPG
CALL ASGPAG ;NOW GET A PAGE FOR THE BACKUP IB
JRST FLRER3 ;FAILED, CLEAN UP AND RETURN ERROR
MOVEM A,FILREB ;SAVE ADDRESS OF PAGE
MOVE B,A ;MAP IN IB OF BACKUP FILE
TLO B,(PTRW)
MOVE A,BKOFN ;GET OFN
CALL SETMPG ;MAP IN IB
MOVE A,FILREB ;SEE IF THERE IS A BACKUP FILE
SKIPN 0(A) ;PAGE 0 MUST BE THERE
JRST FLRER4 ;NO PAGE 0, CLEAN UP AND RETURN ERROR
HRL A,FILREB ;GET SOURCE ADR
HRR A,FILRER ;GET DESTINATION ADR
MOVEI B,777(A) ;GET FINAL ADR
BLT A,0(B) ;COPY BACKUP IB TO ROOT-DIR IB
HRL A,FILREB ;NOW ZERO BACKUP IB
HRR A,FILREB
MOVEI B,777(A) ;GET FINAL ADR
SETZM 0(A) ;ZERO FIRST WORD
HRRI A,1(A) ;GET DESTINATION ADR
BLT A,0(B) ;ZERO THE IB
MOVE A,FILREO ;NOW CAUSE THE OFN TO BE WRITTEN OUT
MOVX B,OFNWRB ;GUARANTEE IT WILL BE WRITTEN
IORM B,SPTH(A) ;...
CALL UPDOFN ;WRITE OFN TO DISK
MOVE A,BKOFN ;DO THE SAME FOR BACKUP OFN
MOVX B,OFNWRB
IORM B,SPTH(A)
CALL UPDOFN
MOVEI A,0 ;NOW UNMAP THE TEMP PAGES
MOVE B,FILRER
CALL SETMPG
MOVEI A,0
MOVE B,FILREB
CALL SETMPG
MOVE A,FILRER ;AND RELEASE THE TEMP PAGES
CALL RELPAG
MOVE A,FILREB
CALL RELPAG
MOVE A,BKOFN ;RELEASE THE OFN OF BACKUP FILE
CALL RELOFN
MOVE A,FILREO ;1/OFN FOR ROOT-DIRECTORY
CALL RELOFN ;RELEASE THE OFN FOR ROOT-DIRECTORY
; (CALLER WILL DO ASOFN LATER)
MOVE A,STRN02 ;GET STRUCTURE NUMBER
MOVE A,STRTAB(A) ;POINT TO ITS SDB
SETZRO STRRDO,(A) ;CLEAR THE OFN FOR ROOT-DIRECTORY
RETSKP
RCDMSG: ASCIZ/
[RECONSTRUCTION PHASE 1 COMPLETED]
/
; ERROR RETURN ROUTINES FOR FILREC
FLRER4: MOVE A,FILREB ;GET PAGE FOR BACKUP XB
CALL RELPAG ;RELEASE THE PAGE
FLRER3: MOVE A,FILRER ;GET ADDRESS OF PAGE
CALL RELPAG ;RELEASE THE PAGE
FLRER2: MOVE A,FILREO ;GET OFN OF ROOT-DIRECTORY
CALL RELOFN ;RELEASE THE OFN
FLRER1: MOVE A,BKOFN ;GET OFN OF BACKUP FILE
CALLRET RELOFN ;RELEASE THE OFN AND RETURN ERROR
;CPYBAK - COPY THE ROOT-DIRECTORY FILE TO THE BACKUP FILE
;ACCEPTS: A/ STRUCTURE NUMBER
; CALL CPYBAK
;RETURNS +1: ERROR DURING COPYING
; +2: OK
;NOT CALLED FROM WITHIN FILINI
CPYBAK::SAVEQ
SE1CAL
STKVAR <STRN03,CPYBKA,CPYBKJ,CPYBKO>
MOVEM A,STRN03 ;SAVE STRUCTURE NUMBER
NOINT ;DONT ALLOW INTERRUPTS OUT OF THIS
SETZM Q2 ;ASSUME SUCCESS
MOVEI B,^D14 ;GET ENOUGH SPACE FOR NAME OF BACKUP FILE
CALL ASGJFR ;ASSIGN SPACE FOR COMPLETE NAME
RETBAD (,OKINT) ;FAILED, GIVE UP
MOVE Q1,A ;SAVE ADDRESS OF BLOCK
HRROI A,1(A) ;FORM POINTER TO WHERE NAME WILL GO
MOVE B,STRN03 ;GET STRUCTURE NUMBER
HRROI C,[ASCIZ/<ROOT-DIRECTORY>BACKUP-COPY-OF-ROOT-DIRECTORY.IMAGE/]
CALL STRST ;FORM COMPLETE FILE NAME
JRST [ SETOM Q2 ;MARK THAT FAIL RETURN IS NEEDED
JRST CPYBK6 ] ;GO RELEASE SPACE AND GIVE FAIL RETURN
MOVX A,GJ%OLD!GJ%PHY!GJ%SHT
HRROI B,1(Q1) ;GET POINTER TO NAME
GTJFN ;GET JFN FOR BACKUP FILE
SETOM Q2 ;MARK THAT FAIL RETURN IS NEEDED
MOVEM A,CPYBKJ ;SAVE JFN
CPYBK6: MOVEI A,JSBFRE ;GET ADDRESS OF FREE HEADER
MOVE B,Q1 ;GET ADDRESS OF BLOCK
CALL RELFRE ;RELEASE FREE SPACE
JUMPN Q2,R ;GIVE FAIL RETURN IF NEEDED
;CLEAR THE 'DIR' BIT IN THE FDB FOR BACKUP-COPY-OF-ROOT-DIRECTORY.
;THIS IS TO INSURE THAT THE BACKUP NO LONGER HAS THE BIT SET SO THAT
;WE CAN OPEN THE FILE FOR WRITE
HRRZ A,CPYBKJ ;GET JFN
IMULI A,MLJFN ;INDEX INTO JFN TABLES
CALL GETFDT ;GET THE FDB FOR THIS FILE
JRST CPYBK4 ;FAILED. GO REPORT ERROR
SETZRO <FBDIR>,(A) ;CLEAR THE 'DIR' BIT
CALL USTDIR ;UNLOCK THE DIRECTORY
HRRZ A,CPYBKJ ;GET JFN AGAIN
MOVE B,[440000,,OF%RD+OF%WR+OF%THW]
OPENF ;OPEN THE FILE FOR READ AND WRITE
RETBAD (,<MOVE A,CPYBKJ
RLJFN
JFCL
OKINT>)
CALL ASGPAG ;GET A TEMPORARY PAGE FOR PMAPING
JRST CPYBK4 ;FAILED TO GET A PAGE
MOVEM A,CPYBKA ;SAVE ADR OF PAGE
MOVEI A,ROOTDN ;NOW MAP IN ROOT-DIR
MOVE B,STRN03 ;GET STRUCTURE NUMBER
CALL MAPDIR ;...
JRST CPYBK5 ;FAILED
CALL BLKSCN ;MAKE SURE THIS IS A STILL VALID
JRST CPYBK5 ;ROOT-DIR IS SICK, DONT KILL BACKUP
CALL SYMCHK ;CHECK VALIDITY OF SYMBOL TABLE ALSO
JRST CPYBK5 ;NO, DONT DESTROY OLD GOOD COPY
HRLZ A,CPYBKJ ;GET OFN OF THIS FILE
CALL JFNOFN ;FOR USE BY SETMPG
JRST CPYBK5 ;FAILED
HLRZM A,CPYBKO ;SAVE OFN
MOVN Q1,NDIRPG ;SET UP AOBJN COUNTER
HRLZS Q1
;..
;..
CPYBK1: MOVE B,STRN03 ;GET STRUCTURE NUMBER
MOVE B,STRTAB(B) ;GET ADDRESS OF SDB
LOAD A,STRRDO,(B) ;GET OFN OF ROOT-DIRECTORY
HRLZ A,A ;CHECK IF ROOT-DIR PAGE EXISTS
HRR A,Q1 ;GET PAGE NUMBER
CALL MRPACS ;GET ACCESSIBILITY
TXNN A,PA%PEX ;PAGE EXIST?
JRST CPYBK2 ;NO, SKIP THIS PAGE
HRR A,Q1 ;GET PAGE #
HRL A,CPYBKO ;GET OFN OF FILE
MOVX B,PTRW ;READ AND WRITE ACCESS
HRR B,CPYBKA ;GET ADR OF WHERE TO MAP FILE PAGE
CALL SETMPG ;GET PAGE OF BACKUP FILE MAPPED IN
MOVEI B,0(Q1) ;NOW SET UP TO BLT ROOT-DIR TO FILE
LSH B,PGSFT ;GET ADDRESS OF ROOT-DIR PAGE
ADD B,DIRORA ;ADD IN BASE ADR
MOVE C,CPYBKA ;GET DEST ADDRESS
MOVEI A,1000
CALL XBLTA ;COPY ROOT-DIR TO BACKUP FILE
MOVEI A,0 ;UNMAP THE PAGE
MOVE B,CPYBKA
CALL SETMPG
CPYBK2: AOBJN Q1,CPYBK1 ;LOOP BACK FOR ALL PAGES IN DIR
CPYBK3: MOVE A,CPYBKA ;NOW RELEASE TEMP PAGE
CALL RELPAG ;...
MOVE A,CPYBKJ ;AND RELEASE JFN
CLOSF
JFCL
OKINT
RETSKP ;COPY HAS BEEN MADE SUCCESSFULLY
CPYBK5: MOVE A,CPYBKA ;RELEASE TEMP PAGE
CALL RELPAG
CPYBK4: MOVE A,CPYBKJ ;AND RELEASE JFN
RLJFN
JFCL
OKINT
RET ;GIVE ERROR RETURN
;ROUTINE TO GET AN OFN FOR THE INDEX TABLE FILE
;
; ACCEPTS:
; T1/ STRUCTURE NUMBER
; CALL FNDIDX IF FILE EXISTS
; OR
; CALL MAKIDX TO CREATE FILE
; RETURNS: +1 ERROR
; +2 SUCCESS, HANDLE FOR INDEX TABLE FILE STORED IN SDB
;CALLED FROM REFRESH AND NORMAL STARTUP CODE AND WELL AS MSTR
FNDIDX::TDZA T3,T3 ;INDICATE MUST FIND OLD FILE
MAKIDX::SETOM T3 ;INDICATE CREATING NEW FILE
STKVAR <CRIDXS,CRIDXB,CRIDXE,CRIDXJ,CRIDXF>
SE1CAL
MOVEM T3,CRIDXF ;SAVE INDICATOR OF ENTRY POINT
MOVEM T1,CRIDXS ;SAVE STRUCTURE NUMBER
SETZM CRIDXE ;INITIALIZE ERROR FLAG
MOVEI T2,12 ;GET # OF WORDS NEEDED FOR FILE NAME
CALL ASGJFR ;ASSIGN SOME FREE SPACE
RETBAD (MONX01) ;RETURN "INSUFFICIENT RESOURCES"
MOVEM T1,CRIDXB ;SAVE ADDRESS OF BLOCK ASSIGNED
; GET A JFN FOR THE INDEX TABLE FILE
HRROI T1,1(T1) ;FORM POINTER TO WHERE NAME WILL GO
MOVE T2,CRIDXS ;GET STRUCTURE NUMBER
HRROI T3,[ASCIZ/<ROOT-DIRECTORY>INDEX-TABLE.BIN.1/]
CALL STRST ;FORM COMPLETE FILE NAME
JRST [ SETOM CRIDXE ;FAILED, NOTE THAT AN ERROR OCCURRED
JRST CRIDX2 ] ;FAILED, NOTE ERROR AND GO RELEASE SPACE
MOVE T2,CRIDXB ;GET ADDRESS OF BLOCK CONTAINING NAME
HRROI T2,1(T2) ;FORM POINTER TO FILE NAME
SKIPE CRIDXF ;WANT TO CREATE IDXTAB?
JRST MAKID1 ;YES. GO DO IT
MOVX T1,GJ%SHT!GJ%PHY!GJ%OLD ;SHORT CALL, PHYSICAL ONLY, OLD FILE
GTJFN ;GET A JFN FOR THE INDEX TABLE FILE
JRST [ SETOM CRIDXE
JRST CRIDX2]
MOVEM T1,CRIDXJ ;SAVE JFN OF INDEX TABLE FILE
JRST CRIDX2
;HERE WHEN CREATING NEW IDXTAB
MAKID1: MOVX T1,GJ%SHT!GJ%PHY ;TRY TO CREATE FILE
GTJFN ;GET A JFN FOR THE NEW FILE
JRST [ SETOM CRIDXE ;FAILED, NOTE ERROR
JRST CRIDX2 ] ;GO RELEASE SPACE AND RETURN ERROR TO USER
MOVEM T1,CRIDXJ ;SAVE JFN OF NEW FILE
HRLI T1,.FBCTL ;GET OFFSET TO WORD TO BE CHANGED
MOVX T2,FB%NOD ;CHANGE THE FB%NOD BIT
MOVX T3,FB%NOD ;INDEX TABLE FILE IS NOT DUMP-ABLE
CHFDB ;CHANGE THE FDB OF THE NEW FILE
ERJMP .+1 ;IGNORE FAILURE
HRRZ T1,CRIDXJ ;GET JFN OF NEW INDEX TABLE FILE
MOVX T2,<FLD(^D36,OF%BSZ)+OF%WR>
OPENF ;OPEN THE FILE TO CREATE THE INDEX BLOCK
JRST [ SETOM CRIDXE ;NOTE OCCURRANCE OF ERROR
MOVE T1,CRIDXJ ;GET JFN
RLJFN ;RELEASE THE JFN
JFCL ;IGNORE ERRORS HERE
JRST CRIDX2] ;GO RELEASE SPACE AND RETURN ERROR
TXO T1,CO%NRJ ;DON'T RELEASE THE JFN
CLOSF ;CLOSE THE FILE
JFCL ;IGNORE ERROR HERE
MOVE T1,CRIDXS ;GET STRUCTURE NUMBER
CALL CPYBAK ;UPDATE BACKUP COPY OF ROOT-DIRECTORY
JFCL ;IGNORE FAILURE TO UPDATE BACKUP ROOT-DIR
; RELEASE SPACE USED TO HOLD FILE NAME - RETURN ERROR IF ANYTHING HAS FAILED
CRIDX2: MOVEI T1,JSBFRE ;GET FREE HEADER
MOVE T2,CRIDXB ;GET ADDRESS OF FREE BLOCK
CALL RELFRE ;RELEASE THE SPACE
SKIPE CRIDXE ;ANY ERRORS SO FAR ?
RETBAD (MSTX11) ;YES, RETURN ERROR
; ASSIGN AN OFN FOR THE INDEX TABLE FILE AND SAVE IN THE SDB FOR THIS STRUCTURE
MOVE T1,CRIDXJ ;GET THE JFN OF THE INDEX TABLE FILE
IMULI T1,MLJFN ;COMPUTE OFFSET TO JFN BLOCK
CALL GETFDT ;GET THE ADDRESS OF THE FDB FOR THIS FILE
JRST [ SETOM CRIDXE ;FAILED, NOTE THAT AN ERROR OCCURRED
JRST CRIDX4 ] ;GO RELEASE THE JFN AND RETURN ERROR TO USER
LOAD T1,FBADR,(A) ;GET ADDRESS OF INDEX BLOCK
TXO T1,FILWB+THAWB ;OPEN FOR WRITE, THAWED
MOVE T2,CRIDXS ;GET STRUCTURE NUMBER
CALL ASROFN ;ASSIGN AN OFN IN THE ROOT-DIRECTORY
JRST [ SETOM CRIDXE ;FAILED, NOTE THAT AN ERROR OCCURRED
JRST CRIDX3 ] ;GO UNLOCK DIRECTORY AND RETURN ERROR
MOVE T2,CRIDXS ;GET STRUCTURE NUMBER
MOVE T2,STRTAB(T2) ;GET ADDRESS OF SDB FOR THIS STRUCTURE
STOR T1,STRIDX,(T2) ;STORE OFN OF INDEX TABLE IN SDB
SETONE STIDX,(T2) ;NOTE THAT INDEX TABLE OFN HAS BEEN SET UP
CRIDX3: CALL USTDIR ;UNLOCK THE DIRECTORY
CRIDX4: MOVE T1,CRIDXJ ;GET JFN OF INDEX TABLE FILE
RLJFN ;RELEASE THE JFN
JFCL ;FAILED, IGNORE FAILURE
SETZRO <CURSTR,CURUC,IDXFLG>
SKIPE CRIDXE ;ANY ERRORS OCCUR ?
RETBAD (MSTX11) ;YES, RETURN ERROR CODE
RETSKP ;NO, RETURN SUCCESS
;ROUTINE TO INITIALIZE THE INDEX TABLE
; CALL: ACCEPTS IN T1/ STRUCTURE NUMBER
; CALL IDXINI
;RETURNS +1: ERROR
; +2: SUCCESS
;CALLED FROM COMMON CODE
IDXINI::STKVAR <IDXINS,IDXINR> ;VARIABLES FOR STRUCTURE NUMBER AND FWDN FOR ROOT
SE1CAL
SAVEP ;SAVE PERMANENT ACS
MOVEM A,IDXINS ;SAVE STRUCTURE NUMBER
;CHECK ROOT-DIRECTORY AND REBUILD IT IF NECESSARY
MOVE A,STRTAB(A) ;GET SDB
LOAD B,STRUC,(A) ;GET UNIQUE CODE FOR THIS STRUCTURE
HRLZS B ;B/ UNIQUE CODE,,DIRECTORY NUMBER
HRRI B,ROOTDN ; FOR ROOT-DIRECTORY ON THIS STRUCTURE
MOVEM B,IDXINR ;SAVE 36-BIT DIRECTORY NUMBER
MOVX A,DD%CHK ;CHECK SYMBOL TABLE
DELDF ;CHECK ROOT-DIRECTORY
ERJMP [MOVX A,DD%RST ;ERRORS - REBUILD
MOVE B,IDXINR ;GET DIR NUMBER BACK
DELDF ;REBUILD SYMBOL TABLE
ERJMP R ;IF FAILED, TELL CALLER
JRST .+1] ;REBUILD SUCCEEDED
;MAP IN ROOT-DIRECTORY AND INITIALIZE ITS MAXIMUM ALLOWABLE SUBDIRECTORIES
MOVE A,IDXINS ;GET STRUCTURE NUMBER
MOVE A,IDXINR ;A/ (UNIQUE CODE,,DIRECTORY NUMBER) FOR ROOT-DIRECTORY
CALL SETDIR ;MAP ROOT-DIRECTORY
RETBAD ;FAILED
MOVE A,DIRORA ;CHECK SUBDIR COUNT
LOAD B,DRSDC,(A) ; ...
SKIPN B ;ZERO?
MOVE B,MXDIRN ;YES - ROOT DIR ALWAYS HAS AT LEAST
STOR B,DRSDC,(A) ;ITSELF
CALL CLRIDX ;START BY ZEROING IDXTAB
CALL USTDIR ;AND UNLOCK THE ROOT-DIR
;STEP THROUGH ALL DIRECTORIES AND CREATE THEIR ENTRIES IN IDXTAB
HLLZ A,IDXINR ;GET STRUCTURE UNIQUE CODE
MOVX F1,DIRSF!STEPF ;INDICATE STEPPING
IDXIN1: SETZ C, ;NO WILD MASK
CALL MDDDIR ;STEP THROUGH DIRS AND SETUP INDEX
JRST IDXIN2 ;ANALYZE ERROR
JRST IDXIN2 ; ...
CALL USTDIR ;UNLOCK
JRST IDXIN1 ;LOOP
;HERE WHEN MDDDIR RETURNS FAILURE. ALWAYS GET HERE WHEN IT REACHES
;LAST DIRECTORY
IDXIN2: CAIE A,GJFX32 ;NO MORE DIRECTORIES?
BUG(CHK,BADIDX,<IDXINI: PARTIALLY UNSUCCESSFUL INDEX TABLE REBUILD>)
MOVE B,IDXINS ;GET STRUCTURE NUMBER
MOVE B,STRTAB(B) ;GET ADDRESS OF SDB
LOAD A,STRIDX,(B) ;GET OFN OF IDXTAB
HRLZS A
MOVEI T2,1000
CALL UPDPGS
MOVE A,IDXINS
MOVE A,STRTAB(A)
LOAD A,STRIDX,(A)
CALL UPDOFN ;UPDATE ON DISK
RETSKP ;RETURN SUCCESS
;SETUP NEW INDEX BLOCK FOR ROOT-DIRECTORY
;ACCEPTS:
; A/DESIRED ADR OF INDEX BLOCK
; B/STRUCTURE NUMBER
; CALL NEWIB
; RETURN +1: FAILURE
; +2: SUCCESS, WITH
; 1/ OFN
; 2/ DISK ADR
;CALLED FROM REFRESH CODE
NEWIB:: STKVAR<STRN04,DSKADR,IBOFN>
MOVEM B,STRN04 ;SAVE STRUCTURE NUMBER
MOVSI C,(FILWB+FILNB+THAWB) ;CONSTRUCT BITS FOR CALL TO ASOFN
MOVEM C,DSKADR ;SAVE TO MERGE WITH ADDRESS LATER
CALL DSKASA ; Get a blank disc address
RET ;FAILED, RETURN ERROR
EXCH A,DSKADR ;SAVE DSK ADR, RECOVER BITS
IOR A,DSKADR ;MERGE ADR WITH BITS
MOVE B,STRN04 ;B/STRUCTURE NUMBER
CALL ASROFN
RET ;FAILED, RETURN ERROR
MOVEM A,IBOFN ;SAVE THE OFN
CALL UPDOFN ;WRITE THE INDEX BLOCK TO THE DISK
MOVE A,IBOFN ;RESTORE THE OFN
MOVE B,DSKADR ;RESTORE THE DISK ADDRESS
RETSKP
TNXEND
END