home *** CD-ROM | disk | FTP | other *** search
- '******************************CLUSTER.BAS*******************************
- '
- 'I'm Getting a 535 MB Hard drive. Want to know how to use FDISK.EXE to
- 'partition it most effectively. Most files are NOT 8K (8192 bytes) long
- 'and only one file fits per cluster. Using 8K Clusters on a 100 MB drive
- 'gave me 12 MB (sic) of "Slack Space"; Using MS-DOS 5.0 (or greater)
- 'with FDISK.EXE and reformating the drive gave me 2 K Clusters and regained
- '6 MegaByte&s of disk space... Worth doing.... If you are the fearless type
- 'and have really and truly backed up your hard drive to TWO tapes and run
- 'the tape compare on BOTH of them.
- '
- 'John De Palma on CompuServe 76076,571
- '11/12/93
- 'can't compile with PDQ because of:
- 'Exteral error with Setborder because it was in BORDER2.BAS with a
- 'different TYPE declaration, putting it here makes it work!, now to fix
- 'the next two errors
- 'B$USNG error "Print Using" <--- fixed
- 'B$POW4 error "Raising a number to a power" <--- fixed
- 'fixed the SETBORDER ERROR had to change the USER DEFINED TYPE to the
- 'PDQ one and make it a sub here, though not sure that was necessary
- DECLARE SUB SetBorder (ColrByte%)
- DEFINT A-Z
- '$INCLUDE: 'PDQDECL.BAS'
-
- 'DEFLNG A-Z
- COLOR 15, 1
- CLS
- 'KiloByte& = 2 ^ 10
- 'MegaByte& = 2 ^ 20
- 'EightKCluster& = 2 ^ 13
- 'FourKCluster& = 2 ^ 12
- 'TwoKCluster& = 2 ^ 11
- CONST Row% = 2
- 'NumberPerMega& = MegaByte& / EightKCluster&
- CALL SetBorder(13)
- text$ = "Cluster Size vs Hard Drive Size"
- LOCATE Row%, 41 - LEN(text$) / 2, 0
- COLOR 11, 0: PRINT text$
- text$ = "-ALMOST- Every Thing you Need to Know about Clusters..."
- LOCATE Row% + 1, 41 - LEN(text$) / 2
- COLOR 11, 2: PRINT text$
- text$ = "Or... How many Hard Drive Partitions to Make with 2K Clusters"
- COLOR 11, 3: LOCATE Row% + 2, 41 - LEN(text$) / 2
- PRINT text$
-
- COLOR 15, 1
- LOCATE Row% + 4, 10
- PRINT "One KiloByte equals: "; TAB(55); "1024"; " bytes"
- LOCATE Row% + 5, 10
- PRINT "One MegaByte equals: "; TAB(50); "1,048,576"
- LOCATE Row% + 7, 10
- PRINT "Eight K Cluster equals: "; TAB(55); "8192 bytes"
- LOCATE Row% + 8, 10
- PRINT "Four K Cluster equals: "; TAB(55); "4096"
- LOCATE Row% + 9, 10
- PRINT "Two K Cluster equals: "; TAB(55); "2048"
- LOCATE Row% + 11, 10
- PRINT "Eight K Clusters per MB is: "; TAB(56); "128 Number"
- LOCATE Row% + 12, 10
- PRINT "Four K Clusters per MB is: "; TAB(56); "256"
- LOCATE Row% + 13, 10
- PRINT "Two K Clusters per MB is: "; TAB(56); "512"
-
- 'use integer divisor to round down
-
- LOCATE Row% + 15, 10
- PRINT "Max Hard disk size with 2 MB clusters is: "; TAB(56); : COLOR 11 + 16, 1: PRINT "127"; : COLOR 15, 1: PRINT " MB"
- COLOR 15, 1
- LOCATE Row% + 16, 10
- PRINT "Max Hard disk size with 4 MB clusters is: "; TAB(56); "255 MB"
- LOCATE Row% + 17, 10
- PRINT "Max Hard disk size with 8 MB clusters is: "; TAB(56); "511 MB"
-
- text$ = "MAXIMUM Number of Clusters = 65,518"
- LOCATE Row% + 20, 41 - LEN(text$) / 2
- COLOR 11, 0: PRINT text$
- text$ = "Press any key to END..."
- LOCATE Row% + 21, 41 - LEN(text$) / 2
- COLOR 14, 6: PRINT text$
- text$ = "John De Palma on CompuServe 76076,571"
- LOCATE 25, 41 - LEN(text$) / 2
- COLOR 11, 0: PRINT text$;
- WHILE INKEY$ <> "": WEND 'clear keyboard
- DO
- kee$ = INKEY$
- LOOP UNTIL LEN(kee$) 'pause
- LOCATE , , 1
- CALL SetBorder(0)
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_NOERROR C:\QB45\PDQ\_CPRINT C:\QB45\PDQ\_NOVAL C:\QB45\PDQ\_NOREAD+
- ' /nod /noe /packcode /far
- '
- ' nul
- ' C:\QB45\PDQ\PDQ
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o /d;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_CPRINT+
- ' /nod /noe /packcode /far
- '
- ' nul
- ' C:\QB45\PDQ\PDQ
-
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_CPRINT+
- ' /nod /noe /packcode /far /ex
- '
- ' nul
- ' PDQ
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_CPRINT+
- ' /nod /noe /packcode /far /ex
- '
- ' nul
- ' PDQ
-
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_CPRINT+
- ' /nod /noe /packcode /far /ex
- '
- ' nul
- ' PDQ
-
- SUB SetBorder (ColrByte%) STATIC
- DIM Regs AS RegType
- Regs.ax = &H1001
- Regs.bx = ColrByte% * &H100
- CALL INTERRUPT(&H10, Regs)
- END SUB
-
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_NOERROR C:\QB45\PDQ\_CPRINT C:\QB45\PDQ\_NOVAL C:\QB45\PDQ\_LOCATE C:\QB45\PDQ\_NOREAD+
- ' /nod /noe /packcode /far
- '
- ' nul
- ' C:\QB45\PDQ\PDQ
- 'This file was last compiled with:
- 'BC C:\QB45\PDQ\CLUS_PDQ.BAS /o;
- 'LINK CLUS_PDQ+
- ' C:\QB45\PDQ\_CPRINT+
- ' /nod /noe /packcode /far /ex
- '
- ' nul
- ' PDQ
-