home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 80 / 080.d81 / farm (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  10KB  |  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,