home *** CD-ROM | disk | FTP | other *** search
- 1000 rem@s0:q&d dir display
- 1010 rem_q&d dir display
- 1020 open15,8,15,"i0":rem initialize in case disk was swapped out
- 1030 z$=chr$(0):q$=chr$(34):sp$=chr$(160):il$=chr$(128)
- 1040 dimf$(29):rem for file name
- 1050 ty$(0)="del":ty$(1)="seq":ty$(2)="prg":ty$(3)="usr":ty$(4)="rel":rem file typs
- 1060 open8,8,8,"$":rem open directory
- 1070 bu=0
- 1080 forc1=1to142:get#8,k$:next:rem space up to disk name
- 1090 print"name:";:forc1=144to160:get#8,k$:printk$;:next:print"[146] ";:rem prt name
- 1100 get#8,l$,m$,n$:print"id:"m$;n$:rem prt id
- 1110 forc1=164to255:get#8,k$:next:rem space up to first file
- 1120 forfile=1to144: rem count through files
- 1130 forbyte=0to29:get#8,f$(byte):next:ifst=66thenfile=150:goto1240:rem get file
- 1140 f$(0)=f$(0)+z$
- 1150 iff$(0)<il$then1220:rem deleted or illegal files
- 1160 printty$(asc(f$(0))-128);": ";:rem display file type
- 1170 printq$;:forlttr=3to18:iff$(lttr)<>sp$thenprintf$(lttr);:rem display file name
- 1180 next:printq$;
- 1190 sz=256*asc(f$(29)+z$)+asc(f$(28)):rem calc file size
- 1200 printtab(23-(sz<100)-(sz<10))sz"block";:ifsz<>1thenprint"s";:rem print size
- 1210 print:rem c/r for next file name
- 1220 iffile/8<>int(file/8)thenget#8,l$,m$:rem irregularity at block boundary
- 1230 bu=bu+sz:sz=0
- 1240 nextfile:printbu"of 664 blocks used."
- 1250 close8:close15
-