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 & ! 10 EXTEND 20 ! & ! PLB & ! & !A program to access the information in the Pack Label Block & ! 900 ! & !explain the program & ! 910 PRINT "This program prints the information in the Pack Label Block." \ & PRINT "See DISK.DOC for more details." 1000 ! & ! & ! MAIN PROGRAM & ! & ! & !get the disk number & ! 1010 PRINT "Disk"; \ & INPUT DISK$ 1020 IF LEFT(DISK$,2%) <> "DR" & THEN DISK$ = "DR" + DISK$ 1030 IF RIGHT(DISK$,LEN(DISK$)) <> ":" & THEN DISK$ = DISK$ + ":" 2000 ! & !open disk non-file structured & !field according to data & !and get DCN #1 & ! 2010 OPEN DISK$ AS FILE #1% 2020 FIELD #1%, 4% AS JUNK$, 2% AS DCN.MFD$, 1% AS VERSION$, & 1% AS LEVEL$, 2% AS CLUSTER.SIZE$, 2% AS STATUS.WORD$, & 4% AS LABEL$ 2030 GET #1%, BLOCK 1% 3000 ! & !print the info & ! 3030 DCN.MFD% = ASCII( LEFT(DCN.MFD$,1%) ) & + SWAP%( ASCII( RIGHT(DCN.MFD$,2%) ) ) 3040 PRINT "DCN of MFD is"; DCN.MFD% 3050 VERSION% = ASCII(VERSION$) \ & LEVEL% = ASCII(LEVEL$) \ & PRINT "Version: "; NUM1$(VERSION%);".";NUM1$(LEVEL%) 3060 PRINT "Pack cluster size is"; ASCII(CLUSTER.SIZE$) 3070 GOSUB 10000 !pack status word 3080 CHANGE LABEL$ TO LABEL% \ & LABEL$ = RAD$( LABEL%(1%) + SWAP%(LABEL%(2%)) ) & + RAD$( LABEL%(3%) + SWAP%(LABEL%(4%)) ) \ & PRINT "Pack Label: "; LABEL$ 9000 ! & !normal exit & ! 9010 GOTO 32767 10000 ! & ! & ! SUBROUTINE: Pack Status Word & ! & ! 10010 STATUS.WORD% = ASCII(RIGHT(STATUS.WORD$,2%)) & !the first byte of the status word is not used 10020 B% = ( STATUS.WORD% AND 2% ) / 2% \ & IF B% = 1% & THEN PRINT "New files listed first." & ELSE PRINT "New files listed last." 10030 B% = ( STATUS.WORD% AND 8% ) / 8% \ & IF B% = 1% & THEN PRINT "Date of last write." & ELSE PRINT "Date of last access." 10040 B% = ( STATUS.WORD% AND 16% ) / 16% \ & IF B% = 1% & THEN PRINT "Read only." 10050 B% = ( STATUS.WORD% AND 64% ) / 64% \ & IF B% = 1% & THEN PRINT "Pack is private." & ELSE PRINT "Pack is system." 10060 B% = ( STATUS.WORD% AND 128% ) / 128% \ & IF B% = 1% & THEN PRINT "Pack is mounted read/write." & ELSE PRINT "Pack is not mounted read/write." 10990 RETURN 32767 END