home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 80 / 080.d81 / farm (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1991-01-01  |  9.4 KB  |  225 lines

  1. 1 fori=49152to49270:readj:pokei,j:next:data032,204,255,169,002,162,112
  2. 3 data160,192,032,189,255,169,001,162,008,160,000,032,186,255
  3. 5 data032,192,255,162,001,032,198,255,032,207,255,032,207,255
  4. 7 data032,207,255,032,207,255,165,144,201,000,208,043,032,099
  5. 9 data192,032,207,255,141,115,192,032,207,255,141,114,192,173
  6. 11 data114,192,174,115,192,032,205,189,032,207,255,208,008,169
  7. 13 data013,032,210,255,076,035,192,032,210,255,076,071,192,169
  8. 15 data001,032,195,255,032,204,255,096,160,000,169,032,032,210
  9. 17 data255,200,192,006,208,248,096,036,048,000,000,153,153,151:nc=24:nf=5
  10. 20 poke53281,0:poke53280,11:printchr$(8);chr$(14)
  11. 40 n=0:dima$(200,25),fd$(nf),c$(25),m$(10),df$(7),tp$(25):fori=1to10:readm$(i):next
  12. 43 data"[204]oad [198]ile     ","[211]ave [198]ile     ","[193]dd [210]ecord    ","[195]hange [210]ecord 
  13. 44 [131]"str$elete (NULL)ecord ","str$isplay ascile  ","(NULL)rint ascile    ","# (NULL)ecords     
  14. 45 data"[196]isk [198]unctions","[197]xit          ":fori=1to7:readdf$(i):next
  15. 47 data"[214]iew [196]irectory   ","[211]cratch [198]ile     ","[210]ename [198]ile      
  16. 48 [131]"valrror (NULL)tatus     ","ascormat str$isk      
  17. 49 data"[214]alidate [196]isk    ","[210]eturn to [208]rogram":fori=1tonf:readfd$(i):next:fori=1tonc:readc$(i):next
  18. 80 sp$="                           
  19. 90 [153]"loadcont             ascarm str$eductions            ":[129]i[178]1[164]10:[153][163]13)""m$(i):[130]
  20. 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
  21. 110 [161]k$:[139]k$[178]""[167]110
  22. 111 [139]k$[178][199](13)[167]240
  23. 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
  24. 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
  25. 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
  26. 240 [145]m[141]270,1400,440,530,640,790,960,1330,1590,4000:[139]m[178]10[167]110
  27. 255 [137]90::
  28. 270 [153]"loadcont                (NULL)oad ascile               ":[153]"ascilename: ";
  29. 290 l[178]15:ty[178]4:[141]3210:[139]f3[167][142]
  30. 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
  31. 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]
  32. 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]::
  33. 440 n[178]n[170]1:x[178]n:[153]"load";:[141]2470:[139]f3[167]n[178]n[171]1:[142]
  34. 480 [153]"cont        (NULL)ore? [y/n]
  35. 490 getk$:ifk$=""then490
  36. 500 ifk$="y"then440
  37. 510 return::
  38. 530 print"[147][154]              [195]hange [210]ecord             ":gosub3420:ifflthenreturn
  39. 550 fl=0:f=3:print"[150][210]ecord # to change: ";:ty=2:l=3:gosub3210:x=val(v$):iff3thenreturn
  40. 585 ifx>nthenreturn
  41. 590 gosub2240:iffl=1thenreturn
  42. 595 fori=1tonc:tp$(i)=a$(x,i):next:gosub3400:print"":gosub2470:iff3thenfori=1tonc:a$(x,i)=tp$(i):next
  43. 620 return::
  44. 640 print"[147][154]              [196]elete [210]ecord             ":gosub3420:ifflthenreturn
  45. 660 fl=0:f=3:print"[150][210]ecord # to delete: ";:ty=2:l=3:gosub3210:x=val(v$):iff3thenreturn
  46. 695 ifx>nthenreturn
  47. 700 gosub2240:iffl=1thenreturn
  48. 710 n=n-1:fori=xton:forj=1tonf:a$(i,j)=a$(i+1,j):next:next:printtab(12)">[210]ecord deleted<":gosub2310:return
  49. 780 :
  50. 790 print"[147][154]              [196]isplay [198]ile              ":gosub3420:ifflthenreturn
  51. 810 r=0:f=0:tl=0:gosub2620:iff3thenreturn
  52. 830 print"[147][154]              [196]isplay [198]ile              
  53. 840 [139]r[178]2[175]f$[179][177]a$(s,1)[167]920
  54. 850 [141]3400:[153]"":[153]"     (NULL)ecord #:"s:[153]fd$(1);a$(s,1);" ";c$([197](a$(s,1)))
  55. 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
  56. 900 [153]"def   lenum. (NULL)otal:wait "xx$:[141]2380:[139]f3[167][142]
  57. 920 s[178]s[170]1:[139]s[179][178]e[167]840
  58. 930 [153][163]13)">valnd of file<":[141]2310:[142]::
  59. 960 [153]"loadcont               (NULL)rint ascile               ":[141]3420:[139]fl[167][142]
  60. 980 r[178]0:f[178]0:tl[178]0:[141]2620:[139]f3[167][142]
  61. 1000 [153]"print(NULL)rinter ready? [y/n]
  62. 1010 getk$:ifk$=""then1010
  63. 1020 ifk$<>"y"thenreturn
  64. 1030 print"[154][208]rinting...":open2,4,7:cmd2
  65. 1050 printtab(5)"-------------------------------------------------------------";
  66. 1060 print"-----------
  67. 1070 [153][163]5)":                           ascarm str$eductions                 ";
  68. 1080 [153]"           :
  69. 1090 printtab(5)"-------------------------------------------------------------";
  70. 1100 print"-----------":printtab(5)":  [195]ategory"spc(7)"[196]ate"spc(4)"[195]heck #"spc(2)"[196]escription";
  71. 1120 printspc(17);"[193]mount  :
  72. 1130 [153][163]5)"------------------------------------------------------------";
  73. 1140 [153]"------------":[129]i[178]s[164]e:[139]r[178]2[175]f$[179][177]a$(i,1)[167]1240
  74. 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);
  75. 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);"  :
  76. 1230 tl=tl+val(a$(i,5))
  77. 1240 next:v=tl:gosub2870
  78. 1260 printtab(5)"-------------------------------------------------------------";
  79. 1270 print"-----------":printspc(5)":";spc(28)"[212]otal: $"xx$;spc(34-len(xx$));":
  80. 1290 [153][163]5)"------------------------------------------------------------";
  81. 1300 [153]"------------":[152]2:[160]2:[142]::
  82. 1330 [153]"loadcont                # (NULL)ecords               ":[153]"  # (NULL)ecords:";n
  83. 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]::
  84. 1400 [153]"loadcont                (NULL)ave ascile               ":[141]3420:[139]fl[167][142]
  85. 1420 [153]"lenurrent ascilename: "fl$:[153]"        ascilename: ";:l[178]15:ty[178]4:[141]3210:[139]f3[167][142]
  86. 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
  87. 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]
  88. 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
  89. 1570 [142]::
  90. 1590 [153]"loadcont             str$isk ascunctions             ":[129]i[178]1[164]7:[153][163]12)""df$(i):[130]
  91. 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
  92. 1610 [161]k$:[139]k$[178]""[167]1610
  93. 1620 [139]k$[178][199](13)[167]1690
  94. 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
  95. 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
  96. 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
  97. 1690 [139]m[178]7[167][142]
  98. 1700 [145]m[141]1730,1780,1880,1960,2030,2150:[137]1590::
  99. 1730 [153]"load             (NULL)iew str$irectory             ":[158]49152:[141]2310:[142]::
  100. 1780 [153]"load              (NULL)cratch ascile              ":[153]"ascilename: ";
  101. 1800 ty[178]4:l[178]15:[141]3210:[139]v$[178][199](0)[167][142]
  102. 1820 [153]:[153]"atnre you sure?
  103. 1830 getk$:ifk$=""then1830
  104. 1840 ifk$<>"y"thenreturn
  105. 1850 open15,8,15,"s0:"+v$:close15:return::
  106. 1880 print"[147]              [210]ename [198]ile               
  107. 1890 [153]"(NULL)ld ascilename: ";:ty[178]4:l[178]15:[141]3210:f1$[178]v$:[139]v$[178][199](0)[167][142]
  108. 1910 [153]:[153]"(NULL)ew ascilename: ";:ty[178]4:l[178]15:[141]3210:f2$[178]v$:[139]v$[178][199](0)[167][142]
  109. 1930 [159]15,8,15,"r0:"[170]f2$[170]"="[170]f1$:[160]15:[142]::
  110. 1960 [153]"load             str$isk (NULL)tatus                ":[159]15,8,15:[132]15,e,e$,e1,e2:[160]15
  111. 1990 [153]"str$isk (NULL)tatus: "e;e$;e1;e2:[141]2310:[142]::
  112. 2030 [153]"load              ascormat str$isk               
  113. 2040 print"[150][201]nsert disk to be formatted.":print"[196]isk name: ";:ty=4:l=15:gosub3210:dn$=v$
  114. 2060 ifv$=chr$(0)thenreturn
  115. 2070 print:print"[196]isk [201][196]: ";:ty=3:l=2:gosub3210:di$=v$:ifv$=chr$(0)thenreturn
  116. 2090 print:print"[193]re you sure?
  117. 2100 [161]k$:[139]k$[178]""[167]2100
  118. 2110 [139]k$[179][177]"y"[167][142]
  119. 2120 [159]15,8,15,"n0:"[170]dn$[170]","[170]di$:[160]15:[142]::
  120. 2150 [153]"load             (NULL)alidate str$isk              
  121. 2160 print"[208]ress [153][198]7 to validate, any key to exit
  122. 2170 [161]k$:[139]k$[178]""[167]2170
  123. 2180 [139]k$[179][177][199](136)[167][142]
  124. 2190 [153]"cont(NULL)alidating...":[159]15,8,15,"v0":[160]15:[142]::::
  125. 2240 [153]:[153][163]2)fd$(1);" ";a$(x,1);" ";c$([197](a$(x,1)))
  126. 2250 [129]i[178]2[164]nf:[153][163]2)fd$(i);" ";a$(x,i):[130]:[153]"defright$s this the record? [y/n]
  127. 2270 getk$:ifk$<>"y"andk$<>"n"then2270
  128. 2280 ifk$="y"thenreturn
  129. 2290 fl=1:return::
  130. 2310 printtab(8)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]":printtab(8)"[221] [154][208]ress [153][198]7 [154]to continue [221]
  131. 2330 [153][163]8)"/tantantantantantantantantantantantantantantantantantantantantantanexp
  132. 2340 getk$:ifk$=""then2340
  133. 2350 ifk$<>chr$(136)then2340
  134. 2360 return::
  135. 2380 f3=0:print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]
  136. 2400 [153]" (NULL) print(NULL)val(NULL)(NULL)(NULL)(NULL) contto continue.   printasc7 cont to exit. (NULL)
  137. 2410 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]
  138. 2420 [161]k$:[139]k$[178]""[167]2420
  139. 2430 [139]k$[179][177][199](136)[175]k$[179][177][199](13)[167]2420
  140. 2440 [139]k$[178][199](136)[167]f3[178]1
  141. 2450 [142]::
  142. 2470 [141]3450:[153]"     (NULL)ecord #:"x:[129]i[178]1[164]nf:[153]fd$(i):[130]:[153]"onononononon
  143. 2490 printtab(15);:ty=2:l=2:gosub3210:a$(x,1)=v$:iff3thenreturn
  144. 2500 v=val(v$):ifv<1orv>ncthenprint"[147]":goto2470
  145. 2510 printtab(15);:ty=4:l=6:gosub3210:a$(x,2)=v$:iff3thenreturn
  146. 2520 printtab(15);:ty=4:l=6:gosub3210:a$(x,3)=v$:iff3thenreturn
  147. 2530 printtab(15);:ty=4:l=20:gosub3210:a$(x,4)=v$:iff3thenreturn
  148. 2540 printtab(15);:ty=2:l=11:gosub3210:a$(x,5)=v$:iff3thenreturn
  149. 2550 print"[150]     [195]orrect? [y/n]
  150. 2560 [161]k$:[139]k$[178]""[167]2560
  151. 2570 [139]k$[178]"n"[167][153]"load":[137]2470
  152. 2580 [139]k$[178][199](13)[167]f3[178]1:[142]
  153. 2590 v[178][197](a$(x,5)):[141]2870:a$(x,5)[178]xx$:[142]::
  154. 2620 [153]"loadcont           str$isplay/(NULL)rint asciles          ":s[178]1:e[178]n:f3[178]0
  155. 2630 [153][163]5)"1]  all records":[153][163]5)"2]  by category
  156. 2650 getr$:ifr$=""then2650
  157. 2660 ifr$=chr$(13)thenf3=1:return
  158. 2670 r=val(r$):ifr<1orr>2then2650
  159. 2680 ifr=1then2780
  160. 2690 gosub3400:print"":gosub3450:printtab(5)"[195]ategory: ";:l=2:ty=2:gosub3210:iff3thenf3=1:return
  161. 2750 f=val(v$):iff<1orf>ncthen2620
  162. 2760 f$=v$:return::
  163. 2780 print"[212]here are"n"records in this file.
  164. 2790 [153]"start record #:    cmdcmdcmd";:ty[178]4:l[178]3:[141]3210:s[178][197](v$):[139]f3[167]f3[178]1:[142]
  165. 2810 [139]s[179]1[176]s[177]n[167][153]"ononon":[137]2780
  166. 2820 [153]"  end record #:    cmdcmdcmd";:ty[178]4:l[178]3:[141]3210:e[178][197](v$):[139]f3[167]f3[178]1:[142]
  167. 2840 [139]e[179]s[176]e[177]n[167][153]"onon":[137]2820
  168. 2850 [142]::
  169. 2870 x$[178]"":xx$[178]"":vv[178][181](v[172]10[174](3)):x$[178][196](vv):[139][197]([201](x$,1))[177]4[167]vv[178]vv[170]10
  170. 2900 x$[178][196](vv):l[178][195](x$):[139]l[177]4[167]2940
  171. 2910 xx$[178]"0.":[139]l[178]4[167]2930
  172. 2920 [129]j[178]1[164](4[171]l):xx$[178]xx$[170]"0":[130]
  173. 2930 xx$[178]xx$[170][202](x$,2,l[171]2):[137]2950
  174. 2940 xx$[178]xx$[170][202](x$,2,l[171]4)[170]"."[170][202](x$,l[171]2,2)
  175. 2950 [142]:::[131]"   lenategory #: ","         str$ate: ","      lenheck #: 
  176. 2980 data"  [196]escription: ","       [193]mount: 
  177. 2990 [131]"peekreeding","lenhemicals","lenonservation","lenustom left$ire","str$epreciation
  178. 3000 data"[194]enefits","[198]eed","[198]ertilizer","[198]reight
  179. 3001 [131]"ascuel","right$nsurance","right$nterest","(NULL)abor","(NULL)ensions
  180. 3002 data"[210]ent/[204]ease","[210]epairs","[211]eeds","[211]torage","[211]upplies","[212]axes
  181. 3003 [131]"(NULL)tilities","(NULL)eterinary","(NULL)ages","(NULL)ther"::
  182. 3210 v$[178]"":k$[178]"":ct[178]0:[153]"tocmd";:f3[178]0
  183. 3220 k$[178]"":[161]k$:[139]k$[178]""[167]3220
  184. 3230 [139]k$[178][199](13)[167]3360
  185. 3240 [139]k$[178][199](20)[175]ct[179][177]0[167][153]" cmdcmdtocmd";:ct[178]ct[171]1:v$[178][200](v$,ct):[137]3220
  186. 3250 [139]k$[178]" "[167]3330
  187. 3260 [139]ty[178]1[176]ty[177]2[167][139](k$[177]"@")[175](k$[179]"[")[167]3330
  188. 3270 [139]ty[177]1[167][139](k$[177]"/")[175](k$[179]":")[167]3330
  189. 3280 [139]ty[178]2[167][139]k$[178]"."[167]3330
  190. 3290 [139]ty[178]1[176]ty[177]2[167][139](k$[177]"tan")[175](k$[179]"(NULL)")[167]3330
  191. 3300 [139]ty[178]4[167][139](k$[177]" ")[175](k$[179]"0")[167]3330
  192. 3310 [139]ty[178]4[167][139](k$[177]"9")[175](k$[179]"@")[167]3330
  193. 3320 [137]3220
  194. 3330 [139]ct[177][178]l[167]3220
  195. 3340 ct[178]ct[170]1:v$[178]v$[170]k$:[153]k$;:[151]212,0:[153]"tocmd";:[137]3220
  196. 3360 [139]ct[178]0[167]v$[178][199](0):f3[178]1
  197. 3380 [153]" ":[142]::
  198. 3400 [129]j[178]1[164]10:[151]781,j:[158]59903:[130]:[142]::
  199. 3420 fl[178]0:[139]n[179]1[167]fl[178]1
  200. 3430 [139]fl[167][153]"(NULL)o file in memory.":[141]2310
  201. 3440 [142]
  202. 3450 [153][163]2)"printortantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan^
  203. 3480 printtab(2)"[221]  1 [193]dvertising    2 [194]ad [196]ebts    [153][221]
  204. 3490 [153][163]2)"(NULL)  3 peekank ascees      4 lenar/(NULL)ruck    print(NULL)
  205. 3500 printtab(2)"[221]  5 [195]ommisions     6 [196]epletion    [153][221]
  206. 3505 [153][163]2)"(NULL)  7 str$epreciation   8 str$ues/(NULL)ub     print(NULL)
  207. 3506 printtab(2)"[221]  9 [194]enefits      10 [198]reight      [153][221]
  208. 3507 [153][163]2)"(NULL) 11 right$nsurance     12 right$nterest     print(NULL)
  209. 3508 printtab(2)"[221] 13 [204]aundry       14 [204]egal [198]ees   [153][221]
  210. 3509 [153][163]2)"(NULL) 15 (NULL)ffice        16 (NULL)ensions     print(NULL)
  211. 3510 printtab(2)"[221] 17 [210]ent          18 [210]epairs      [153][221]
  212. 3511 [153][163]2)"(NULL) 19 (NULL)upplies      20 (NULL)axes        print(NULL)
  213. 3512 printtab(2)"[221] 21 [212]ravel/[205]eals  22 [213]tilities    [153][221]
  214. 3513 [153][163]2)"(NULL) 23 (NULL)ages         24 (NULL)ther        print(NULL)
  215. 3515 printtab(2)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][154]":return::.
  216. 3600 poke214,20:print:print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]
  217. 3610 [153]" (NULL)  cont(NULL)se len(NULL)(NULL)(NULL)(NULL)(NULL) keys/(NULL)val(NULL)(NULL)(NULL)(NULL) to select. (NULL)
  218. 3615 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":return::
  219. 4000 poke214,17:print:printtab(11)"[150][193]re you sure? [y/n]
  220. 4005 [161]k$:[139]k$[178]""[167]4005
  221. 4010 [139]k$[179][177]"y"[167][153]"on                                  ":[142]
  222. 4015 [159]15,8,15,"r0:tax boot=tax boot":[132]15,er%:[160]15:[139]er%[179][177]63[167][153]"load":[128]
  223. 4030 [151]646,[194](53281):[153]"loadload"[199](34)"tax boot"[199](34)",8":[153]"run
  224. 4045 poke631,13:poke632,13:poke633,13:poke198,3:end:open15,8,15,"s0:farm":close15:save"0:farm",8
  225.