10 EXTEND 11 ! & ! & ! & ! C O P Y R I G H T N O T I C E & ! & ! & ! No Copyright (C) 1981, 1982, 1983, 1984 by & ! Whittier College, Whittier Ca. & ! & ! & !This software is furnished under no license and may be used & !and copied in accordance with the nonexistent terms of such & !license and with or without the inclusion of the above & !copyright notice. This software or any other copies thereof & !may be provided or otherwise made available to any other & !person. No title to and ownership of the software is hereby & !transferred. & ! & !The information in this software is subject to change without & !notice and should not be construed as a commitment by Whittier & !College or the author. & ! & !Whittier College assumes no responsibility for the use or & !reliability of its software on equipment that is not supplied & !by Whittier College. Whittier College supplies no equipment. & ! & !***************************************************************& ! 12 ! & ! This program was written for internal use and has not & !been significantly modified for export. You may need to make & !changes to fit your system or needs. If you have any problems & !please contact: & ! & ! David Garland & ! Whittier College & ! Whittier CA 90601 & ! (213) 693-0771 ext 289 & ! 20 ! & ! PACKID & ! & !A program to look up and change a disk Pack ID. & !See DISK.DOC & ! 300 ! & !constants & ! 310 TRUE% = -1% \ & FALSE% = 0% 320 BELL$ = CHR$(7%) 1000 ! & ! & ! MAIN PROGRAM & ! & ! & !get the disk number & ! 1010 PRINT "This program will find the Pack ID of a disk." \ & PRINT 1020 INPUT "Disk number"; DISK$ \ & DISK$ = CVT$$(DISK$,-1%) 1030 IF LEFT(DISK$,2%) = "DR" & THEN DISK% = VAL(MID(DISK$,3%,1%)) & ELSE DISK% = VAL(DISK$) 1040 DISK$ = "DR" + NUM1$(DISK%) + ":" 2000 ! & !open the disk non-file structured and field it & ! 2010 OPEN DISK$ AS FILE #1% 2020 FIELD #1%, 512% AS BUFF$ 3000 ! & !print current value & ! 3010 GET #1%, BLOCK 1% 3020 CHANGE MID(BUFF$,13%,4%) TO ID% 3030 ID$ = RAD$( ID%(1%) + SWAP%(ID%(2%)) ) + & RAD$( ID%(3%) + SWAP%(ID%(4%)) ) 3040 PRINT "Current Pack ID:"; ID$ 3050 PRINT 4000 ! & !ask about a change & ! 4010 INPUT "Change pack ID "; ANS$ \ & ANS$ = CVT$$(LEFT(ANS$,1%),-1%) 4020 IF ANS$ <> "Y" THEN GOTO 9000 4030 PRINT "The disk must be dismounted." \ & INPUT "Is the disk dismounted "; ANS$ \ & ANS$ = CVT$$(LEFT(ANS$,1%),-1%) 4040 IF ANS$ <> "Y" THEN GOTO 9000 5000 ! & !They wanted to make a change & ! 5010 INPUT "New pack ID"; ID$ \ & ID$ = CVT$$(ID$,-1%) 5020 Z$ = SYS( CHR$(6%) + CHR$(-10%) + ID$ ) \ & ID$ = MID(Z$,7%,4%) & !use File Name String Scan to convert to RAD50 5030 LSET BUFF$ = LEFT(BUFF$,12%) + ID$ + RIGHT(BUFF$,17%) 5040 PUT #1%, BLOCK 1% 9000 ! & !normal exit & ! 9010 CLOSE #1% 9990 GOTO 32767 32767 END