DISK BAS(DISK DOC) DISK OBJ5ii rem disk.bas all system info on specified disk drive integer i,directory.entries real total.space,available.space string disk.free.space,percent.used %include cbc i= match(";",command$,1) if i>0 then operation$=ucase$(right$(command$,len(command$)-i)) if i<1 then print.options%=-1 disk$=ucase$(left$(command$,1)) if disk$<"A" or disk$>"P" then disk$=seldsk("") disk%=asc(disk$)-65 rem main code if match("L",operation$,1) then lprinter print "DISK v1.1 " print tab(10); print using "Drive &: Characteristics";disk$:print print tab(10); print "Drive Status: "; call asm(050h,0,21,(-1*256)+disk%,0) rem T21 get/set drive status l%=mod(gethl,256) if l%=0 then\ print "Not ready.":stop h%=gethl/256 if h%=-1 then print " :Read Only"; if h%= 0 then print " :Read/Write"; call asm(050h,0,19,disk%,0) rem allocation info s%=mod(getpsw,256) fixed%=s%>=80h s%=mod(s%,80h) directory.blocks%=mod(getbc,256) blocks.unused%=getde total.blocks%=gethl blocks.used%=total.blocks%-blocks.unused% block.size%=4 rem default if s%=3 then block.size%=1 if s%=4 then block.size%=2 if s%=5 then block.size%=4 if s%=6 then block.size%=8 if s%=7 then block.size%=16 total.space=float(total.blocks%)*float(block.size%) directory.entries=directory.blocks%*block.size% directory.entries=directory.entries*32 DISK.FREE.SPACE=STR$(float(blocks.unused%)*float(block.size%)) call asm(050h,0,20,(-1*256)+disk%,0) rem sector size call sx%=mod(getpsw,256) if sx%=0 then sector.size%=128 if sx%=1 then sector.size%=256 if sx%=2 then sector.size%=512 if sx%=3 then sector.size%=1024 if sx%=4 then sector.size%=2048 if sx%=5 then sector.size%=4096 if sx%=6 then sector.size%=8192 if sx%=7 then sector.size%=16384 reserved.tracks%=getbc num.tracks%=getde num.sectors%=gethl percent.used = str$(int(100-(blocks.used%/total.space*100))) available.space=total.space-(block.size%*directory.blocks%) print tab(55); if fixed% then print "(Fixed media)" else print "(Removable media)" print tab(10); print "Total space :";str$(total.space)+"k" print tab(10); print "Useable file space :";str$(available.space)+"k" print tab(10); print "Free space :";disk.free.space+"k" print print tab(10); print "Sector size :";str$(sector.size%) print tab(10); print "Reserved tracks :";str$(reserved.tracks%) print tab(10); print "Tracks on disk :";str$(num.tracks%) print tab(10); print "Sectors/track :";str$(num.sectors%) print tab(10); print "Block size :";str$(block.size%)+"k" print tab(10); print "Directory blocks :";str$(directory.blocks%) print tab(10); print "Directory entries :";str$(directory.entries) print tab(10); print "Allocation Blocks :";str$(total.blocks%) print tab(10); print "Allocation blks used:";str$(blocks.used%)+" ("+percent.used+"%)" print tab(10); print "Allocation blks left:";str$(total.blocks%-blocks.used%) print console if match("L",operation$,1) then \ print "Disk characteristics sent to printer." if match("M",operation$,1) then gosub fixmap if match("F",operation$,1) then gosub fixdir if print.options% then\ print "Options ;L (send to printer)":\ print " ;M (rebuild disk map)":\ print " ;F (fix directory)" stop rem end prog fixmap: print print "OK to regenerate disk map on drive ";disk$;":? (Y/N) "; input "";line answer$: answer$=ucase$(answer$) if left$(answer$,1)<>"Y" then return print "Regenerating map on drive ";disk$;":" call asm(050h,0,11,(-1*256)+disk%,0) rem regenerate map a%=mod(getpsw,256) if a%<>0 then print "Unable to regenerate disk map.": return if a%=0 then print "Disk map regenerated." call asm(050h,0,19,disk%,0) rem allocation info new.blocks.unused%=getde new.blocks.used%=total.blocks%-new.blocks.unused% if new.blocks.used%=blocks.used% then return if new.blocks.used%>blocks.used% then a$="gained" else a$="lost" print abs(blocks.used%-new.blocks.used%);" allocation blocks ";a$ return fixdir: print print "It would be good to BACK UP drive ";+disk$+": before starting." print "OK to reorganize directory on drive ";disk$;" (Y/N) "; input "";line answer$:answer$=ucase$(answer$) if left$(answer$,1)<>"Y" then return print "Reorganizing directory on drive ";disk$;"- DO NOT INTERRUPT!"; call asm(050h,0,42,(-1*256)+disk%,0) rem regenerate map a%=mod(getpsw,256) if a%<>0 then print "Unable to reorganize directory.": return if a%=0 then print "Directory reorganized." return rem ****************************** disk.com documentation ================================ Version 1.0 May 8, 1986 Jay Faubion PO Box 768 Ringgold, GA 30736 (615) 624=2667 ================================ Disk.com is for use under TurboDOS v. 1.4 or greater. It combines the capabilities of DRIVE.com, FIXMAP.com and FIXDIR.com into one utility, with some enhancements. To execute, enter DISK <;options> Options: L = send disk characteristics to printer M = Perform "Fixmap" on specified drive F = Perform "Fixdir" on specified drive Disk.com is written in CB80. System calls possible thru the use of CBC Tools, from Minnow Bear Computers. Sample Output: ============== Drive C: Characteristics Drive Status: :Read/Write Total space : 22668 k Free space : 3556k Sector size : 1024 Reserved tracks : 687 Tracks on disk : 916 Sectors/track : 99 Block size : 4 k Directory blocks : 24 Directory entries : 3072 Allocation Blocks : 5667 Allocation blks used: 4778 Allocation blks left: 889 Fixed media. ================================================================ END ================================================================ 2#DISK < $2DM}|*ڋ"^#V{^#V{_zWڋ{z*w#ww#w###s#rq#p#!5#ʋOM+F+N*}|!"~#fo"{z }|"~#~#~#O~G(}|*##^#V}|Fs#r##q#pw#w#~w#~w7!N#F#~#foov}|w`i}^:0!9BKå DM!9ͥ !9! 9N#F#ͥ ;ÝBK~ !9DM~ ͝DM~ !9DM! 9DM~ !9DM͝;͵!9DMÒ ͵Ò DM~ !9DM1!9DM~ !9DM;ͻͻ1S;ͲqͲ!9DM~ k͓Ͳ! 9DM~ !9DM;͊q͊ò͓͊ÌDMa!9DM~ !9!9!9DM ~ ͵ @PP"6͇*6!9~w{_!y+##!62*6  |g"6!H\ >'-sw# T>@2626 6͒ Ç*%*6®6*6"6>26:6W~ !6:6w 6͒ ~ !66ͥ !6:6w:6W!696~ r2696o&G>Ow# +q#3:6!6]6 T>|6n i!6C 6!6ڂ7>' #p +>'w#>'w #:626 !6~PT:6T6!6~ \+w# @ 6w{266!6~#!6~#!6q#!6"6~#T6G6*6 2#4?#TG6*6'w# A!65*6# 6n !6~ȯw+6+wv:6<26OF!6 怮w Q_#~ȓAWw>26`i"6266*6>'#>'#>'#>'#>'#>'#>'>'wڵ*6 #~'w!6~w:6=?26!6ó6ͥ  6n iDZA26x26pOG>F26!6r#{i`)!6~'w#Œ … !6 + #?¼! C !6=> pT]w+ ~w!66G# :6з( !6!65q!66w+0 p!655 p6 + + + + + + 't P'> 't o g"6`i6é *6|œ ɵ!6é ~#~#~#~#~#~#~#~#!6'w#'w#'w#'w#'w#'w#'w!9~A 6/OG #6= x>#w|" DM!x- y)3 )9 )? )E )K )Q )W )|Q| | ʢ z| x)yOxGyxڔ GyO#=€ ogeo| | )ڷ #¯ OÙ \ `i!:6A$:6ð * ͳ*/ >* . ͳ#>. 26_ - ͳ# .>- >2626O_ >267 \̳ͳð 26? > 26 ͳ#> ,T >26> !6q.p >26ͳ#p d !6q^ƒ ͳv !6q-” >26ͳ>266͒ :6O 2626!6r#³ :6 =26:6> î :6 7:6!66C y@G  /%2626266~ >:626Gy@w:6!6>k 7>k 4!65<26:6!6G:6„ :6OxGxҮ 6W?< =‘ zg zn !6~ʮ iÔ :6 :6!67:6+ :6+ >-G:6OW* $ $ :6!67O zy:6ʵ£:6£:6µã:6>> >0> 266n i!6~2667:6@26!6 x~6!6p26/O!6 #ʊ ʘ y26=/26:6>0õ:6=!65:626!6~>.:6!6/:6:6G:6G26x:6!65:6:6Y>E!6:635~ >/<-Gyx/ F Gyx0:6j72626:6:6262"6|–:6:6~W#^#:6¿zʵ~#)å|~:626]NS"6"6:6/! &\̳ͳͳ/ͳõ U +s :6> !54O:6F* YU Us >25> 6> 6U ps :6:5x> 2<~yUy:6u*5&|TL:5~X>~͡u͡U!6:5=U26!6~5*6~+"60G>0)0:6:6:6''>,3*6:6> >-*6|PU|ʛ>26~G#N#"6"6`i"6"6ʛ!#€&é/ʧ&ʧ!ʧ\© x©26]UN. xu"6*6|*6"6*6+"6*6~#"626*6~#"6*6|+"6> 2"6!6454!]:6#/!&$*ͳ$>$*:ͳ*>*$-Mͳ#.>-$\̳ͳ *6++!"6ö:00!{~Gwog:00! !*|F#N#Nͩ# x ͩr" 727́ *6#"6 5 ͩ ͩ>25:7ʆ2 726GW2 7͸~"d͸U͸~"[2 7~,ʀ͸t#* 7c:5ʱo&##h6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