home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 80
/
080.d81
/
farm
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
225 lines
1 fori=49152to49270:readj:pokei,j:next:data032,204,255,169,002,162,112
3 data160,192,032,189,255,169,001,162,008,160,000,032,186,255
5 data032,192,255,162,001,032,198,255,032,207,255,032,207,255
7 data032,207,255,032,207,255,165,144,201,000,208,043,032,099
9 data192,032,207,255,141,115,192,032,207,255,141,114,192,173
11 data114,192,174,115,192,032,205,189,032,207,255,208,008,169
13 data013,032,210,255,076,035,192,032,210,255,076,071,192,169
15 data001,032,195,255,032,204,255,096,160,000,169,032,032,210
17 data255,200,192,006,208,248,096,036,048,000,000,153,153,151:nc=24:nf=5
20 poke53281,0:poke53280,11:printchr$(8);chr$(14)
40 n=0:dima$(200,25),fd$(nf),c$(25),m$(10),df$(7),tp$(25):fori=1to10:readm$(i):next
43 data"[204]oad [198]ile ","[211]ave [198]ile ","[193]dd [210]ecord ","[195]hange [210]ecord
44 [131]"str$elete (NULL)ecord ","str$isplay ascile ","(NULL)rint ascile ","# (NULL)ecords
45 data"[196]isk [198]unctions","[197]xit ":fori=1to7:readdf$(i):next
47 data"[214]iew [196]irectory ","[211]cratch [198]ile ","[210]ename [198]ile
48 [131]"valrror (NULL)tatus ","ascormat str$isk
49 data"[214]alidate [196]isk ","[210]eturn to [208]rogram":fori=1tonf:readfd$(i):next:fori=1tonc:readc$(i):next
80 sp$="
90 [153]"loadcont ascarm str$eductions ":[129]i[178]1[164]10:[153][163]13)""m$(i):[130]
101 [141]3600:r[178]4:m[178]1:[151]214,r:[153]:[153][163]13)"print"m$(m):r1[178]r:m1[178]m
110 [161]k$:[139]k$[178]""[167]110
111 [139]k$[178][199](13)[167]240
115 [139]k$[178]""[167]r[178]r[170]1:m[178]m[170]1:[139]m[178]11[167]m[178]1:r[178]4
120 [139]k$[178]"on"[167]r[178]r[171]1:m[178]m[171]1:[139]m[178]0[167]m[178]10:r[178]13
125 [151]214,r1:[153]:[153][163]13)""m$(m1):[151]214,r:[153]:[153][163]13)"print"m$(m):r1[178]r:m1[178]m:[137]110
240 [145]m[141]270,1400,440,530,640,790,960,1330,1590,4000:[139]m[178]10[167]110
255 [137]90::
270 [153]"loadcont (NULL)oad ascile ":[153]"ascilename: ";
290 l[178]15:ty[178]4:[141]3210:[139]f3[167][142]
300 fl$[178]v$:[153]:[159]15,8,15,"io":[159]2,8,2,"0:"[170]fl$[170]",s,r":[132]15,e,e$,e1,e2
340 [153]"defstr$isk (NULL)tatus:"e;e$;e1;e2:[139]e[167][160]2:[160]15:[153]"ascile (NULL)ot (NULL)oaded":[141]2310:[142]
360 [132]2,n:[129]i[178]1[164]n:[129]j[178]1[164]nf:[132]2,a$(i,j):[130]:[130]:[160]2:[160]15:[142]::
440 n[178]n[170]1:x[178]n:[153]"load";:[141]2470:[139]f3[167]n[178]n[171]1:[142]
480 [153]"cont (NULL)ore? [y/n]
490 getk$:ifk$=""then490
500 ifk$="y"then440
510 return::
530 print"[147][154] [195]hange [210]ecord ":gosub3420:ifflthenreturn
550 fl=0:f=3:print"[150][210]ecord # to change: ";:ty=2:l=3:gosub3210:x=val(v$):iff3thenreturn
585 ifx>nthenreturn
590 gosub2240:iffl=1thenreturn
595 fori=1tonc:tp$(i)=a$(x,i):next:gosub3400:print"":gosub2470:iff3thenfori=1tonc:a$(x,i)=tp$(i):next
620 return::
640 print"[147][154] [196]elete [210]ecord ":gosub3420:ifflthenreturn
660 fl=0:f=3:print"[150][210]ecord # to delete: ";:ty=2:l=3:gosub3210:x=val(v$):iff3thenreturn
695 ifx>nthenreturn
700 gosub2240:iffl=1thenreturn
710 n=n-1:fori=xton:forj=1tonf:a$(i,j)=a$(i+1,j):next:next:printtab(12)">[210]ecord deleted<":gosub2310:return
780 :
790 print"[147][154] [196]isplay [198]ile ":gosub3420:ifflthenreturn
810 r=0:f=0:tl=0:gosub2620:iff3thenreturn
830 print"[147][154] [196]isplay [198]ile
840 [139]r[178]2[175]f$[179][177]a$(s,1)[167]920
850 [141]3400:[153]"":[153]" (NULL)ecord #:"s:[153]fd$(1);a$(s,1);" ";c$([197](a$(s,1)))
880 [129]k[178]2[164]nf:[153]fd$(k);a$(s,k):[130]:tl[178]tl[170][197](a$(s,5)):v[178]tl:[141]2870
900 [153]"def lenum. (NULL)otal:wait "xx$:[141]2380:[139]f3[167][142]
920 s[178]s[170]1:[139]s[179][178]e[167]840
930 [153][163]13)">valnd of file<":[141]2310:[142]::
960 [153]"loadcont (NULL)rint ascile ":[141]3420:[139]fl[167][142]
980 r[178]0:f[178]0:tl[178]0:[141]2620:[139]f3[167][142]
1000 [153]"print(NULL)rinter ready? [y/n]
1010 getk$:ifk$=""then1010
1020 ifk$<>"y"thenreturn
1030 print"[154][208]rinting...":open2,4,7:cmd2
1050 printtab(5)"-------------------------------------------------------------";
1060 print"-----------
1070 [153][163]5)": ascarm str$eductions ";
1080 [153]" :
1090 printtab(5)"-------------------------------------------------------------";
1100 print"-----------":printtab(5)": [195]ategory"spc(7)"[196]ate"spc(4)"[195]heck #"spc(2)"[196]escription";
1120 printspc(17);"[193]mount :
1130 [153][163]5)"------------------------------------------------------------";
1140 [153]"------------":[129]i[178]s[164]e:[139]r[178]2[175]f$[179][177]a$(i,1)[167]1240
1170 cg[178][197](a$(i,1)):[153][163]5);": ";[200](c$(cg)[170]sp$,13);[166]2);:[153][200](a$(i,2)[170]sp$,6);[166]2);
1200 [153][201](sp$[170]a$(i,3),7);[166]2);:[153][200](a$(i,4)[170]sp$,20);[166]1);:[153][201](sp$[170]"$"[170]a$(i,5),13);" :
1230 tl=tl+val(a$(i,5))
1240 next:v=tl:gosub2870
1260 printtab(5)"-------------------------------------------------------------";
1270 print"-----------":printspc(5)":";spc(28)"[212]otal: $"xx$;spc(34-len(xx$));":
1290 [153][163]5)"------------------------------------------------------------";
1300 [153]"------------":[152]2:[160]2:[142]::
1330 [153]"loadcont # (NULL)ecords ":[153]" # (NULL)ecords:";n
1350 fm[178][194](51)[170]256[172][194](52)[171][194](49)[171][194](50)[172]256:[153]"ascree (NULL)emory:";fm:[141]2310:[142]::
1400 [153]"loadcont (NULL)ave ascile ":[141]3420:[139]fl[167][142]
1420 [153]"lenurrent ascilename: "fl$:[153]" ascilename: ";:l[178]15:ty[178]4:[141]3210:[139]f3[167][142]
1450 fl$[178]v$:[153]:[159]15,8,15,"io":[159]2,8,2,"@0:"[170]fl$[170]",s,w":[132]15,e,e$,e1,e2
1490 [153]"defstr$isk (NULL)tatus:"e;e$;e1;e2:[139]e[167][160]2:[160]15:[153]"ascile (NULL)ot (NULL)aved.":[141]2310:[142]
1510 [152]2,n:[129]i[178]1[164]n:[129]j[178]1[164]nf:[152]2,a$(i,j):[130]:[130]:[160]2:[139]f1[178]0[167][160]15
1570 [142]::
1590 [153]"loadcont str$isk ascunctions ":[129]i[178]1[164]7:[153][163]12)""df$(i):[130]
1601 [141]3600:r[178]4:m[178]1:[151]214,r:[153]:[153][163]12)"def"df$(m):r1[178]r:m1[178]m
1610 [161]k$:[139]k$[178]""[167]1610
1620 [139]k$[178][199](13)[167]1690
1625 [139]k$[178]""[167]r[178]r[170]1:m[178]m[170]1:[139]m[178]8[167]m[178]1:r[178]4
1630 [139]k$[178]"on"[167]r[178]r[171]1:m[178]m[171]1:[139]m[178]0[167]m[178]7:r[178]10
1635 [151]214,r1:[153]:[153][163]12)""df$(m1):[151]214,r:[153]:[153][163]12)"def"df$(m):r1[178]r:m1[178]m:[137]1610
1690 [139]m[178]7[167][142]
1700 [145]m[141]1730,1780,1880,1960,2030,2150:[137]1590::
1730 [153]"load (NULL)iew str$irectory ":[158]49152:[141]2310:[142]::
1780 [153]"load (NULL)cratch ascile ":[153]"ascilename: ";
1800 ty[178]4:l[178]15:[141]3210:[139]v$[178][199](0)[167][142]
1820 [153]:[153]"atnre you sure?
1830 getk$:ifk$=""then1830
1840 ifk$<>"y"thenreturn
1850 open15,8,15,"s0:"+v$:close15:return::
1880 print"[147] [210]ename [198]ile
1890 [153]"(NULL)ld ascilename: ";:ty[178]4:l[178]15:[141]3210:f1$[178]v$:[139]v$[178][199](0)[167][142]
1910 [153]:[153]"(NULL)ew ascilename: ";:ty[178]4:l[178]15:[141]3210:f2$[178]v$:[139]v$[178][199](0)[167][142]
1930 [159]15,8,15,"r0:"[170]f2$[170]"="[170]f1$:[160]15:[142]::
1960 [153]"load str$isk (NULL)tatus ":[159]15,8,15:[132]15,e,e$,e1,e2:[160]15
1990 [153]"str$isk (NULL)tatus: "e;e$;e1;e2:[141]2310:[142]::
2030 [153]"load ascormat str$isk
2040 print"[150][201]nsert disk to be formatted.":print"[196]isk name: ";:ty=4:l=15:gosub3210:dn$=v$
2060 ifv$=chr$(0)thenreturn
2070 print:print"[196]isk [201][196]: ";:ty=3:l=2:gosub3210:di$=v$:ifv$=chr$(0)thenreturn
2090 print:print"[193]re you sure?
2100 [161]k$:[139]k$[178]""[167]2100
2110 [139]k$[179][177]"y"[167][142]
2120 [159]15,