home *** CD-ROM | disk | FTP | other *** search
- 4 poke56,102:clr:printchr$(142)
- 5 ifpeek(49182)=203then60
- 6 poke53281,0:poke53280,0:print"[147]"
- 7 cd=peek(186):sys57812"screen",cd,0:poke780,0:poke781,0:poke782,4:sys65493
- 9 forx=55296to56319:pokex,7:next
- 55 sys57812"binc000",cd,0:poke780,0:poke781,0:poke782,192:sys65493
- 60 poke53280,7:poke53281,7:poke646,0
- 61 pk=12*4096:pv=pk+30:syspk:cd=0
- 69 dimt,r,b,i,a$,c,dt$,fl$,il$,x,x$,xx$,g,z$,c$,m$,xx,fc,f,mf,mc,dv,bl,dc,bh,gg
- 70 dims,t$,db,dp,d$,sz,q$,ma,ca,cc,cm,j,h,m1,c1
- 71 cm$="dmftc+-q "+chr$(13)+chr$(145)+chr$(17)+chr$(157)+chr$(29)+chr$(19)
- 72 cm$=cm$+chr$(147)+"/rnx"+chr$(92)
- 75 dl=-1:cf=-1:me=0
- 80 dimdi$(1,30),cl(30),sz(30),dp(30),cn$(30)
- 100 fl$=""
- 110 il$=fl$:fori=1to18:il$=il$+chr$(17):next
- 120 goto500
- 140 ifcm<>1thenprint"[147]ms-dos device number not allocated":goto2030
- 141 print"loading ms-dos directory...":print:open15,dv,15:print#15,"uj":close15
- 150 m1=1:syspk:syspk+3:forx=1to30:di$(0,x)="":next
- 170 dl=0:bl=peek(52048):bh=peek(52050):s=peek(52051):ifpeek(52049)>0thendc=1
- 180 if(sand1)thengosub380:dl=-1:return
- 190 print"scanning ms-dos directory...":print
- 200 db=bl+256*bh
- 205 syspk+21:bl=peek(52048):x=peek(52049):bh=peek(52050)
- 206 ma=bl+bh*256+x*65536
- 210 ifdc=0then360
- 220 fordp=dbto27135step32
- 230 ifpeek(dp)=0orpeek(dp)=229then345
- 240 ifpeek(dp+11)and24then345
- 250 dl=dl+1:ifdl>30thendl=30:dp=db:goto360
- 260 d$=right$(" "+str$(dl),3)+" bin prg "
- 270 a$="":fori=0to10:a$=a$+chr$(peek(dp+i)):next
- 277 a$=left$(a$,8)+" "+right$(a$,3)
- 290 printdl;a$
- 300 d$=d$+a$+" "
- 310 cl(dl)=peek(dp+26)+256*peek(dp+27)
- 320 sz=peek(dp+28)+256*peek(dp+29)+65536*peek(dp+30)
- 330 di$(0,dl)=d$+right$(" "+str$(sz),6)
- 335 dp(dl)=dp
- 340 sz(dl)=sz
- 345 ifdb>27135thendp=db:goto360
- 350 nextdp
- 360 sys46374:return
- 380 e=peek(pv+2)
- 381 printchr$(18);"[144]ms-dos disk error #";mid$(str$(e),2)
- 383 ife=0thenprint"** disk full?? **"
- 385 poke49184,0
- 390 print"type a key[146]":gosub5000:return
- 420 print"[147]";
- 421 ifme=0thenprint"ms-dos";
- 422 ifme<>0thenprint"cbmdos";
- 423 print"[146]";" ms=";mid$(str$(dv),2);
- 430 print" cbm=";mid$(str$(cd),2);
- 435 ifme=0thenprint" fre="ma
- 436 ifme<>0thenprint" fre="ca
- 440 return
- 460 printil$;"d=dir m=msdev f=cbmdev c=copy q=quit "
- 470 print "t=toggle r=remove x=cbmcpy /=menu +-=pg";
- 480 return
- 500 t=1:c=0:r=0
- 510 ifme=0thenmf=dl:mc=2
- 515 ifme<>0thenmf=cf:mc=1
- 520 gosub420
- 521 ifme<>0then542
- 530 print"num s trn typ filename ext length"
- 540 print"--- - --- --- -------- --- ------"
- 541 goto550
- 542 print"num s trn filename t length"
- 543 print"--- - --- ---------------- - ------"
- 550 gosub460
- 560 b=t+16:ifb>mfthenb=mf
- 575 printfl$;:ift>mfthen590
- 580 fori=ttob:printdi$(me,i):next
- 590 ifmf<0thenprint"<directory not loaded>[146]";
- 591 ifmf=0thenprint"<no files>[146]"
- 600 ifmf<=0then660
- 610 printleft$(il$,r+5);chr$(18);
- 620 onc+1goto630,640,650
- 630 printspc(4);mid$(di$(me,t+r),5,3):goto660
- 640 printspc(7);mid$(di$(me,t+r),8,5):goto660
- 650 printspc(12);mid$(di$(me,t+r),13,5):goto660
- 660 geta$:ifa$=""then660
- 670 forg=1tolen(cm$):ifa$=mid$(cm$,g,1)theni=g
- 675 next
- 680 ifmf>0thenprintleft$(il$,r+5);di$(me,t+r)
- 690 ifi=0then600
- 700 onigoto760,1050,1110,950,1150,1000,1020,730,860,860,770,790,810,830,850
- 705 oni-15goto500,713,1400,713,1499,713
- 710 stop
- 713 me=-(me=0)
- 714 goto500
- 730 close5:close15:print"[147]thanks craig bruce!!":print:print:poke186,cd
- 740 print:print"adapted for the c64 from":print"little red reader[146] for the c128"
- 741 print"by craig bruce":print
- 742 print"adaption by":print"doreen horne":print"brisbane, australia"
- 743 :print:print"august 2000":end
- 760 ifme=1andc1thensys46374
- 761 ifme=1thengosub420:gosub2499:goto500
- 762 ifme=0andm1thensys46374
- 765 gosub420:gosub140:goto500
- 770 r=r-1:ifr<0thenr=b-t
- 780 goto600
- 790 r=r+1:ift+r>bthenr=0
- 800 goto 600
- 810 c=c-1:ifc<0thenc=mc
- 820 goto600
- 830 c=c+1:ifc>mcthenc=0
- 840 goto600
- 850 r=0:c=0:goto600
- 860 ifmf<=0then600
- 870 x=t+r:onc+1gosub890,910,930
- 880 printleft$(il$,r+5);di$(me,x):goto600
- 890 ifmid$(di$(me,x),6,1)=" "thenx$="*"
- 895 ifmid$(di$(me,x),6,1)<>" "thenx$=" "
- 896 l=len(di$(me,x))
- 897 l$=left$(di$(me,x),5)+x$+right$(di$(me,x),l-6)
- 900 di$(me,x)=l$:return
- 910 ifmid$(di$(me,x),9,1)="a"thenx$="bin"
- 915 ifmid$(di$(me,x),9,1)<>"a"thenx$="asc"
- 916 l=len(di$(me,x))
- 917 l$=left$(di$(me,x),8)+x$+right$(di$(me,x),l-11)
- 920 di$(me,x)=l$:return
- 930 ifmid$(di$(me,x),14,1)="s"thenx$="prg"
- 935 ifmid$(di$(me,x),14,1)<>"s"thenx$="seq"
- 936 l=len(di$(me,x))
- 937 l$=left$(di$(me,x),13)+x$+right$(di$(me,x),l-16)
- 940 di$(me,x)=l$:return
- 950 ifmf<=0then600
- 960 forx=1tomf
- 970 onc+1gosub890,910,930
- 980 nextx
- 990 goto520
- 1000 r=0:ifb=mfthent=1:goto510
- 1010 t=t+17:goto510
- 1020 ifmf<=0then660
- 1025 r=0:ift=1thent=mf-(mf-int(mf/17)*17)+1:ift<=mfthen510
- 1030 t=t-17:ift<1thent=1
- 1040 goto510
- 1050 printil$;:print" "
- 1052 print" "
- 1060 printil$;:print"ms-dos device number (8-30) ";:input"[157][157][157][157]";dv
- 1062 ifcd=dvthenprint"ms-dos & cbm-dos devices must differ":gosub5000:goto1050
- 1090 pokepv+3,dv:pokepv+4,dt:syspk:dl=-1
- 1100 cm=1:goto500
- 1110 printil$;:print" "
- 1115 print" "
- 1120 printil$;:print"cbm-dos device number (0-30) ";:input"[157][157][157][157]";cd
- 1130 ifcd=dvthenprint"ms-dos & cbm-dos devices must differ":gosub5000:goto1110
- 1140 cf=-1:cc=1:close5:open5,cd,15:goto500
- 1150 ifcc<>1thenprint"[147]cbm device number not all0cated":goto2030
- 1151 ifme=1then2000
- 1152 print"[147]copy ms-dos -> cbm-dos":print:print
- 1160 ifdl<=0thenfc=0:goto1190
- 1170 fc=0:forf=1todl:ifmid$(di$(0,f),6,1)="*"thengosub1200
- 1180 nextf
- 1190 print:print"files copied =";fc;" - type key":gosub5000
- 1191 print"[147]to view the files copied to the cbm directory, use '/' then
- 1192 [153]"'dir' again.":[153]:[153]"type a key":[141]5000:[137]520
- 1200 fc[178]fc[170]1
- 1210 x$[178][202](di$(0,f),19,8)[170]"."[170][202](di$(0,f),29,3)
- 1220 cf$[178]"":[129]i[178]1[164][195](x$):[139][202](x$,i,1)[179][177]" "[167]cf$[178]cf$[170][202](x$,i,1)
- 1230 [130]
- 1231 [139][201](cf$,1)[178]"."[167]cf$[178][200](cf$,[195](cf$)[171]1)
- 1232 cf$[178]cf$[170]","[170][202](di$(0,f),14,1)
- 1240 [153][196](fc);". ";[199](34);cf$;[199](34);[163]20);sz(f)"bytes";
- 1245 [153][163]35);[202](di$(0,f),9,3)
- 1250 cl[178]cl(f):lb[178]sz(f)[171][181](sz(f)[173]65536)[172]65536
- 1254 a$[178]"":x[178][195](cf$):[129]i[178]1[164]x
- 1255 a$[178]a$[170][202](cf$,i,1)
- 1256 [139][198]([202](cf$,i,1))[178]126[167]a$[178][200](cf$,i[171]1):a$[178]a$[170][199](32)[170][201](cf$,x[171]i):i[178]x:[137]1258
- 1257 [130]
- 1258 cf$[178]a$
- 1260 [159]1,cd,7,(cf$)[170]",w"
- 1270 [141]3050:[139]ds[179]20[175]ds[179][177]63[167]1320
- 1271 [139]ds[177]19[175]ds[179][177]63[167]1310
- 1275 [153]"cbm file exists; overwrite (y/n)";
- 1280 [160]1:[133]x$:[139]x$[178]"n"[167]fc[178]fc[171]1:[142]
- 1285 [152]5,"s0:"cf$
- 1286 [159]1,cd,7,(cf$)[170]",w"
- 1300 [141]3050:[139]ds[179]20[167]1320
- 1310 [153]"cbm disk error: "[170]ds$:fc[178]fc[171]1:[160]1:[142]
- 1320 [151]pv[170]6,cl[173]256:[151]pv[170]5,cl[171][194](pv[170]6)[172]256
- 1330 [151]pv[170]8,lb[173]256:[151]pv[170]7,lb[171][194](pv[170]8)[172]256
- 1340 tr[178]0:[139][202](di$(0,f),9,1)[178]"a"[167]tr[178]255
- 1350 [151]182,tr:[158]pk[170]6
- 1355 s[178][194](52051)
- 1357 [139](s[175]1)[167][141]380:fc[178]fc[171]1
- 1370 [141]3050:[139]ds[177]19[167]1310
- 1380 [160]1:[142]
- 1400 [153]"loadremove (delete) selected ms-dos files:":[153]
- 1401 [139]me[179][177]0[167][153]"ms-dos menu must be selected!":[137]2030
- 1402 [153]"deletion irreversible":[133]"continue (y/n)";a$
- 1403 [153]:[139]a$[179][177]"y"[167]520
- 1410 [139]dl[179][178]0[167]fc[178]0:[137]1440
- 1420 fc[178]0:f[178]1:[158]52736
- 1425 [139][202](di$(0,f),6,1)[178]"*"[167][141]1470:fc[178]fc[170]1:f[178]f[171]1
- 1430 f[178]f[170]1:[139]f[179][178]dl[167]1425
- 1434 [129]g[178]49227[164]49229:[151]g,255:[130]:[153]"flushing...":[158]pk[170]12
- 1440 [153]:[153]"files removed =";fc
- 1445 [158]pk[170]21:a[178][194](52048):x[178][194](52049):y[178][194](52050)
- 1446 ma[178]a[170]y[172]256[170]x[172]65536
- 1448 [153]"type a key":[141]5000:[137]500
- 1470 [153]"removing ";[199](34);[202](di$(0,f),19,13);[199](34)
- 1490 [151]pv[170]10,dp(f)[173]256:[151]pv[170]9,dp(f)[171][194](pv[170]10)[172]256
- 1492 [158]pk[170]15
- 1494 di$(0,f)[178]di$(0,dl):sz(f)[178]sz(dl):dp(f)[178]dp(dl):cl(f)[178]cl(dl)
- 1495 dl[178]dl[171]1
- 1496 [142]
- 1499 [153]"loadcopy cbm-dos to cbm-dos:":[153]
- 1500 [139]cc[179][177]1[167][153]"loadsource cbm device number not all0cated":[137]2030
- 1501 [139]cf[179][178]0[167][153]"commodore directory not loaded":[137]2030
- 1502 x[178]0:[133]"device number to copy to";x:[153]
- 1503 [139]x[179]8[176]x[177]30[167][153]"bad device number!":[137]2030
- 1504 [139]x[178]cd[167][153]"cannot copy to same device":[137]2030
- 1505 [159]8,x,15
- 1506 [129]f[178]1[164]cf:[139][202](di$(1,f),6,1)[179][177]"*"[167]1570
- 1507 [153]di$(1,f):[159]1,cd,2,cn$(f)[170]",r":[141]3050:[139]ds[177]19[167]1530
- 1508 cf$[178]cn$(f)[170]","[170][202](di$(1,f),31,1)[170]",w"
- 1509 [159]2,x,3,cf$
- 1510 [141]3051:[139]ds[179]20[175]ds[179][177]63[167]1550
- 1511 [139]ds[177]19[175]ds[179][177]63[167]1530
- 1512 [133]"file exists: overwrite (y/n)";x$:[139]x$[179][177]"y"[167]1560
- 1520 [160]2:[152]8,"s0:"[170](cn$(f))
- 1525 [159]2,x,3,cf$:[141]3051:[139]ds[179]20[167]1550
- 1530 [153]"cbm dos error: ";ds$:[137]1560
- 1550 [158]pk[170]24
- 1555 [141]3050:[139]ds[177]19[167][153]"loaddisk error",ds$:[137]1560
- 1556 [141]3051:[139]ds[177]19[167][153]"loaddisk error",ds$
- 1560 [160]1:[160]2
- 1570 [130]f
- 1580 [153]"done - type a key":[160]8:[141]5000:[137]510
- 2000 [153]"loadcopy cbm-dos to ms-dos:":[153]:[153]
- 2010 [139]dl[177][178]0[167]2035
- 2020 [153]"ms-dos directory must be loaded first"
- 2030 [153]"type a key":[141]5000:[137]510
- 2035 fc[178]0
- 2036 [129]f[178]1[164]cf:[139][202](di$(1,f),6,1)[179][177]"*"[167]2045
- 2040 fc[178]fc[170]1:c$[178]cn$(f)
- 2041 [153][202]([196](fc),2);" ";[202](di$(1,f),14,16);[202](di$(1,f),34);":";
- 2042 [141]6000:[153]m$
- 2043 tr[178]0:[139][202](di$(1,f),9,1)[178]"a"[167]tr[178]255
- 2044 [158]46374:[141]2100
- 2045 [130]:[139]fc[178]0[167]2049
- 2046 [129]g[178]49227[164]49229:[151]g,255:[130]:[153]"flushing...":[158]pk[170]12
- 2047 [158]pk[170]21:a[178][194](52048):x[178][194](52049):y[178][194](52050)
- 2048 ma[178]a[170]y[172]256[170]x[172]65536
- 2049 [153]:[153]"files copied =";fc:[137]2030
- 2100 [153]"finding free ms-dos directory entry!":[158]52736:[129]i[178]0[164]30[171]1
- 2105 [129]dp[178]db[164]27135[169]32
- 2110 [139][194](dp)[178]0[176][194](dp)[178]229[167]2140
- 2120 [130]dp
- 2130 [153]"no free ms-dos directory entries":fc[178]fc[171]1:[142]
- 2140 [130]i
- 2160 [129]i[178]1[164][195](m$):[151]dp[170]i[171]1,[198]([202](m$,i,1))[175]127:[130]
- 2170 [129]i[178]11[164]31:[151]dp[170]i,0:[130]
- 2180 [151]dp[170]26,255:[151]dp[170]27,15
- 2190 [151]pv[170]10,dp[173]256:[151]pv[170]9,dp[171][194](pv[170]10)[172]256:[158]52773
- 2200 [153]"on copying! ":[159]1,cd,2,c$
- 2300 [151]182,tr:[158]pk[170]9:s[178][194](52051)
- 2301 [160]1
- 2305 [141]3050:[139]ds[177]19[167][153]"loadcbm disk error",ds$:fc[178]fc[171]1:[142]
- 2306 [139]s[175]1[167]fc[178]fc[171]1:[141]380:[142]
- 2310 [158]52736:x$[178]" asc seq ":[139]tr[178]0[167]x$[178]" bin prg "
- 2320 dl[178]dl[170]1:d$[178][201](" "[170][196](dl),3)[170]x$
- 2330 d$[178]d$[170][200](m$,8)[170]" "[170][201](m$,3)
- 2340 cl(dl)[178][194](dp[170]26)[170]256[172][194](dp[170]27)
- 2350 sz[178][194](dp[170]28)[170]256[172][194](dp[170]29)[170]65536[172][194](dp[170]30)
- 2360 di$(0,dl)[178]d$[170][201](" "[170][196](sz),8)
- 2370 dp(dl)[178]dp
- 2380 sz(dl)[178]sz
- 2395 [142]
- 2499 [158]46374:z$[178]"":[139]cc[179][177]1[167][153]"loadcbm device number not all0cated":[137]2030
- 2500 [153]"loading commodore dos directory":[153]:g[178]0:c1[178]1:[129]x[178]1[164]30:di$(1,x)[178]"":[130]
- 2501 [159]1,cd,0,"$0:!#$%&":[141]3050:[139]ds[177]19[167][153]"loaddisk error",ds$:[160]1:[142]
- 2502 [129]x[178]1[164]34:[161]#1,x$:[130]
- 2503 [161]#1,x$:x[178][195](x$):[139]x[167]x[178][198](x$)
- 2504 [161]#1,x$:y[178][195](x$):[139]y[167]y[178][198](x$)
- 2505 ca[178](x[170]y[172]256)[172]256:[160]1
- 2506 [159]1,cd,0,"$0":[161]#1,a$,a$:cf[178][171]1:q$[178][199](34):xx[178]0
- 2507 [139]z$[177]""[175]g[178]0[167][153]"disk ="z$:g[178]1:[153]
- 2508 [158]pk[170]27:[141]3050:[139]ds[177]19[167][153]"loaddisk error",ds$:[160]1:[142]
- 2509 b[178][194](pv[170]11)[170]256[172][194](pv[170]12):t$[178][199]([194](pv[170]13))
- 2510 x[178][194](pv[170]14)
- 2520 [139]x[178]0[167]2670
- 2530 x$[178]"":[129]i[178]pv[170]15[164]pv[170]15[170]x[171]1:x$[178]x$[170][199]([194](i)):[130]
- 2575 cf[178]cf[170]1
- 2590 [139]cf[178]0[167]z$[178]q$[170]x$[170]q$:[137]2650
- 2600 cn$(cf)[178]x$
- 2610 a$[178][200](x$[170]" ",17)[170]t$[170][201](" "[170][196](b[172]254),8)
- 2620 [139]t$[178]"s"[167]di$(1,cf)[178][201](" "[170][196](cf),3)[170]" asc "[170]a$
- 2625 [139]t$[178]"p"[167]di$(1,cf)[178][201](" "[170][196](cf),3)[170]" bin "[170]a$
- 2630 [153]di$(1,cf)
- 2650 xx[178]xx[170]1:[139]xx[178]31[167]2670
- 2655 [137]2507
- 2670 [158]46374:[160]1:[142]
- 3050 [132]5,ds,ds$,j,h:[142]
- 3051 [132]8,ds,ds$,j,h:[142]
- 5000 [151]198,0:[146]198,1:[151]198,0:[142]
- 6000 gg[178]0:x[178][195](c$):zz$[178]" "
- 6001 [139]x[178][179]3[167]m$[178]c$:[137]6094
- 6005 g[178][195](c$)[171]3:[139][202](c$,g,1)[178]"."[167]z$[178][201](c$,3):gg[178]1:[137]6085
- 6010 [139]gg[178]0[175]x[177][178]12[167]x[178]12:m$[178][200](c$,12):[137]6094
- 6015 [139]gg[178]0[175]x[179]12[167]m$[178][200](c$,x):[137]6094
- 6085 [139]x[178][177]12[167]m$[178][200](c$,8):x[178]12:[137]6094
- 6090 m$[178][200](c$,x[171]4)
- 6094 xx$[178]"":z[178][195](m$):[129]i[178]1[164]z
- 6095 x$[178][199]([198]([202](m$,i,1))[175]127):[139]x$[178]"."[176]x$[178]" "[167]x$[178]"_"
- 6096 xx$[178]xx$[170]x$
- 6097 [130]i:[139]gg[167]m$[178][200](xx$,x[171]4)[170][200](zz$,12[171]x[170]1)[170]z$:[137]6101
- 6098 [139]x[178]12[167]m$[178]xx$:[137]6101
- 6099 [139]x[179]12[167]m$[178][200](xx$,x)[170][200](zz$,12[171]x)
- 6101 m$[178][200](m$,8)[170][201](m$,3):[142]
-