home *** CD-ROM | disk | FTP | other *** search
- 5 ifpeek(49152)<>160thenload"alpha.ml",8,1
- 15 print"[147]"tab(11)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 20 printtab(11)"[221]a - alphabetize[221]":printtab(11)"[221]d - directory [221]"
- 25 printtab(11)"[221]q - quit [221]":printtab(11)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 27 poke56,142:clr:dimfp$(144),sp$(144),ss%(144)
- 30 geta$:ifa$="a"then80
- 40 ifa$="d"thensys49411:goto680
- 60 ifa$<>"q"then30
- 70 print"[147]";:end
- 80 print"reading directory";:open1,8,15,"i":gosub660:close1
- 90 sys49152:i1=peek(7):printi1"files"
- 230 print"alphabetizing":fort=1toi1:sp$(t)=sp$(t)+fp$(t):next
- 240 n=i1:li=1:b(li)=n+1:m=1
- 250 j=b(li):i=m-1:ifj-m<3then360
- 260 mi=int((i+j)/2)
- 270 i=i+1:ifi=jthen320
- 280 ifsp$(i)<=sp$(mi)then270
- 290 j=j-1:ifi=jthen320
- 300 ifsp$(j)>=sp$(mi)then290
- 310 sp$=sp$(i):sp$(i)=sp$(j):sp$(j)=sp$:goto270
- 320 ifi>=mitheni=i-1
- 330 ifj=mithen350
- 340 sp$=sp$(i):sp$(i)=sp$(mi):sp$(mi)=sp$
- 350 li=li+1:b(li)=i:goto250
- 360 ifj-m<2then390
- 370 ifsp$(m)<sp$(m+1)then390
- 380 sp$=sp$(m):sp$(m)=sp$(m+1):sp$(m+1)=sp$
- 390 m=b(li)+1:li=li-1:ifli>0then250
- 400 fort=1toi1:fp$(t)=right$(sp$(t),5):sp$(t)=left$(sp$(t),27):next
- 410 open1,8,15,"i":gosub660:open8,8,8,"#":i2=1:print"writing directory"
- 420 print#1,"b-p";8;0
- 430 c=0:reads:ifi1-i2<8thenprint#8,chr$(0)chr$(255);:goto450
- 440 print#8,chr$(18)chr$(s);
- 450 print#8,right$(fp$(i2),3);:goto470
- 460 print#8,fp$(i2);
- 470 print#8,sp$(i2);
- 480 ifi2=i1then510
- 490 i2=i2+1:c=c+1:ifc<8then460
- 500 reads:print#1,"u2";8;0;18;s:goto420
- 510 a$="":fort=1to32:a$=a$+chr$(0):next
- 520 c=c+1:ifc=8then540
- 530 print#8,a$;:goto520
- 540 reads:print#1,"u2";8;0;18;s:close8:sys49411:goto680
- 550 data 4,1,7,4,10,7,13,10,16,13,2,16,5,2,8,5,11,8,14,11,17,14,3,17,6,3,9,6
- 560 data 12,9,15,12,18,15,0,18
- 660 input#1,a,b$,c,d:ifa=0thenreturn
- 670 printa;b$;c;d
- 680 close1:print"press return"
- 690 geta$:ifa$<>chr$(13)then690
- 700 run
-