home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 83 / 083.d81 / cal.track (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1991-01-01  |  15.0 KB  |  442 lines

  1. 100 poke 55,0:poke 56,128:clr
  2. 110 de=peek(186):ifde<8thende=8
  3. 115 goto230
  4. 120 sys 52496,fr,fc,tr,tc,ad,fu,co,rv
  5. 130 ad=ad+(tr-fr+1)*(tc-fc+1)*2:n=n+1
  6. 140 if ad>52495thenprint"windows abort!":end
  7. 150 fr(n)=fr:fc(n)=fc:tr(n)=tr:tc(n)=tc
  8. 160 return
  9. 170 :
  10. 180 fr=fr(n):fc=fc(n):tr=tr(n):tc=tc(n)
  11. 190 ad=ad-(tr-fr+1)*(tc-fc+1)*2:n=n-1
  12. 200 sys 52496,fr,fc,tr,tc,ad,8,1,1
  13. 210 return
  14. 220 :
  15. 230 print"[147]":dim l$(12),l(12),la(12),lw$(7),mm$(4)
  16. 240 dim la$(106),lb(106),lc(106),lp(106),pi(22)
  17. 250 l$(1)="[197]ach ":l$(2)="[199]ram ":l$(3)="[207]unce":l$(4)="[208]ound":l$(5)="[212]sp  "
  18. 260 l$(6)="[212]bl  ":l$(7)="[207]unce":l$(8)="[195]up  ":l$(9)="[208]int ":l$(10)="[209]uart"
  19. 270 l$(11)="[199]al  ":l$(12)="     "
  20. 280 l(1)=1.0:l(2)=.035273:l(3)=1.0:l(4)=16:l(5)=.16666667:l(6)=0.5
  21. 290 l(7)=1.0:l(8)=8.0:l(9)=16.0:l(10)=32.0:l(11)=64.0:l(12)=-1.0
  22. 300 a3$=chr$(125):a6$="[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]"
  23. 310 la(1)=0.:la(2)=31.:la(3)=59.:la(4)=90.:la(5)=120.:la(6)=151.
  24. 320 la(7)=181.:la(8)=212.:la(9)=243.:la(10)=273.:la(11)=304.:la(12)=334.
  25. 330 lw$(0)="[211][213][206]":lw$(1)="[205][207][206]":lw$(2)="[212][213][197]":lw$(3)="[215][197][196]":lw$(4)="[212][200][210]"
  26. 340 lw$(5)="[198][210][201]":lw$(6)="[211][193][212]"
  27. 350 mm$(1)="[194][210][197][193][203][198][193][211][212]":mm$(2)="[204][213][206][195][200]":mm$(3)="[196][201][206][206][197][210]":mm$(4)="[211][206][193][195][203]"
  28. 360 ss$="                               ":zc=0
  29. 370 gosub540:end
  30. 380 fr=21:fc=09:tr=23:tc=29:fu=7 :co=1 :rv=3:gosub120
  31. 390 yy=23:xx=10:gosub530
  32. 400 print"[159] [193]ny [203]ey [195]ontinues";
  33. 410 poke198,0:wait198,15:geta$:gosub180:return
  34. 420 if zc=1then return
  35. 430 fr=18:fc=08:tr=22:tc=32:fu=7 :co=1 :rv=3:gosub120:yy=21:xx=09:gosub530
  36. 440 print"[159] [204]oading [195]ategory [198]ile":gosub1130:gosub180:zc=1:return
  37. 450 gosub520:print"[144][147]new":print"load"chr$(34)f$chr$(34)","de
  38. 460 print"?c[200](144)c[200](142):run"
  39. 470 poke198,3:poke631,13:poke632,13:poke633,13:poke56,160:end
  40. 480 input#15,e,e$,a,b:ife<20 orre=73 then return
  41. 490 if e=50thenreturn
  42. 500 print "[147]  [196][201][211][203] [208][210][207][194][204][197][205]: [195]an't [195]ontinue!":gosub380
  43. 510 gosub520:end
  44. 520 close3:close15:open15,de,15,"i0":gosub480:fori=1to150:next:close15:return
  45. 530 poke 214,yy:poke211,xx:print"[145]";:return
  46. 540 rem hskpng
  47. 560 dim ca$(30),ci$(30),cx(30),cs(30),sd(6,7)
  48. 570 dim fr(20),fc(20),tr(20),tc(20)
  49. 580 ad=49920:fori=1to30:cx(i)=0:cs(i)=0:next
  50. 590 poke 147,0:sys57812"windows.o",de,1:sys62631
  51. 600 poke147,0:sys57812"cal.rd.o",de,1:sys62631
  52. 610 printchr$(14)
  53. 620 poke53280,0:poke53281,0
  54. 630 poke53280,0:fr=07:fc=05:tr=20:tc=33:fu=7:co=7:rv=3:gosub5000:gosub120
  55. 640 yy=10:xx=16:gosub530:print"[159][207][208][212][201][207][206][211]"
  56. 650 print"[159][163][163][163][163][163][163][163]"
  57. 660 print"[159]1. [208]lan [210]eview/[213]pdate"
  58. 670 print"2. [195]onsume [210]eview/[213]pdate"
  59. 680 print"3. [208]rint & [193]nalysis"
  60. 690 print"4. [194]rowse [195]alorie [212]able"
  61. 700 print"5. [195]alorie [212]able [213]pdate"
  62. 710 print"6. [209]uit [212]his [208]rogram"
  63. 720 print"[208]lease [211]elect"
  64. 730 poke198,0:wait198,15:geta$:ifa$<"1"ora$>"6"then730
  65. 740 if a$="1" then gosub180:zt=1:gosub2780:goto630
  66. 750 if a$="2" then gosub180:zt=0:gosub2780:goto630
  67. 760 if a$="3" then gosub180:f$="cal.print":goto450
  68. 770 if a$="5" then gosub180:f$="cal.tab.upte":goto450
  69. 780 if a$="4" thengosub180:goto810
  70. 790 if a$="6" then gosub180:f$="hello connect":de=8:goto450
  71. 800 goto 730
  72. 810 gosub420:gosub1250:goto630
  73. 820 wait198,15:geta$:gosub180:return
  74. 830 rem get routine
  75. 840 a1$=""
  76. 850 gosub1050
  77. 860 geta$:ifa$=""ora$=","ora$=";"then860
  78. 870 a=asc(a$):if a=20 thengosub1080:goto940
  79. 880 if a=13then 960
  80. 890 if a5$="a"then 1100
  81. 900 if a$="."ora$="," then930
  82. 910 if a$ = "-" and len(a1$) = 0 then 930
  83. 920 if a < 48 or a > 60 then 860
  84. 930 iflen(a1$)<al then a1$=a1$+a$
  85. 940 gosub950:goto 860
  86. 950 gosub1050:return
  87. 960 dv=0:l =len(a1$):a = 0:at = 0:p = 0:an = 1
  88. 970 if a5$="a"then return
  89. 980 for i=1 to l:a$ = mid$(a1$,i,1)
  90. 990 if a$="-" then an=-1:goto 1040
  91. 1000 ifa$=","then 1040
  92. 1010 if a$="."thendv=1:goto 1040
  93. 1020 if dv=0 then a=val(a$):at = at*10 + a
  94. 1030 if dv=1 then p=p+1:a=val(a$):at = at + a/(10^p)
  95. 1040 next:at=at*an:return
  96. 1050 a4$=left$(a6$,al)
  97. 1060 gosub530:printa7$;a2$;" "; a3$;a1$" ";spc(al-len(a1$));"[157]"a3$
  98. 1070 print a7$;spc(xx+    len(a2$)+1);chr$(173);a4$;chr$(189);"[145][145]":return
  99. 1080 l=len(a1$):ifl=0then return
  100. 1090 l=l-1:a1$=mid$(a1$,1,l):return
  101. 1100 if a> 31 and a <94 then 930
  102. 1110 if a> 159 and a <221 then 930
  103. 1120 goto 860
  104. 1130 rem get category file
  105. 1140 close15:open15,de,15,"i0":print#15,"r0:%%mast.cat=%%mast.cat"
  106. 1150 input#15,er:close15
  107. 1160 if er<>63 then 65535
  108. 1170 close15:open15,de,15,"i0":gosub1220:open3,de,3,"%%mast.cat,s,r":gosub1220
  109. 1180 i=0:input#3,nc:rem nc=nxt cat num
  110. 1190 i=i+1:input#3,ca$(i):input#3,ci$(i):input#3,cx(i)
  111. 1200 ifleft$(ca$(i),1)<>chr$(255)then1190
  112. 1210 gosub1220:close3:close15:cl=i:return
  113. 1220 input#15,e,e$,a,b:ife<20ore=73then return
  114. 1230 if e=50 then return
  115. 1240 goto500
  116. 1250 pg=0:print"[147] _ = [197]scape  f1 = [208]age  <[210]tn> = [211]elect"
  117. 1260 fr=04:fc=09:tr=22:tc=30:fu=7 :co=1:rv=3:gosub120
  118. 1270 yy=6:xx=13:gosub530:print"[159]  [195][193][212][197][199][207][210][201][197][211]":yy=7:gosub530
  119. 1280 print"  [163][163][163][163][163][163][163][163][163][163]":cp=0
  120. 1290 cp=cp+1:if cp+pg*13>clthen cp=cp-2:goto1340
  121. 1300 if cp>13 then cp=13:goto1340
  122. 1310 yy=7+cp:gosub530:print""ca$(cp+(pg*13))
  123. 1320 if cp+pg*13 =clthen gosub530:print "   [146][197]nd [204]ist[159]"
  124. 1330 goto1290
  125. 1340 pm=cp:cp=1:xx=11:cq=1
  126. 1350 gosub1470
  127. 1360 xx=11:wait198,15:geta$:ifa$=""thencr=1:goto1420
  128. 1370 if a$="[133]"then cr=pm-cp+1:goto1420
  129. 1380 if a$="_"then gosub180:return
  130. 1390 if a$="[145]"thencr=-1:goto1420
  131. 1400 a=asc(a$):ifa=13then1480
  132. 1410 goto1360
  133. 1420 cp=cp+cr:ifcp<1thencp=pm:goto1350
  134. 1430 if cp<=pmthen1350
  135. 1440 ifcl<15thencp=1:goto1350
  136. 1450 pg=pg+1:if pg>1thenpg=0
  137. 1460 gosub180:goto1260
  138. 1470 yy=cq+7:gosub530:print"[159] ":yy=cp+7:gosub530:print">":cq=cp:return
  139. 1480 ax=pg*13+cp:cr=pm:gosub1710
  140. 1490 fr=09:fc=02:tr=24:tc=37:fu=7 :co=1 :rv=5:gosub120
  141. 1500 cs=cs(ax):print"[159]";
  142. 1510 sys32771,cs,rt:dl=rt:if rt>127 then 1510
  143. 1520 if rt=64 then 1500
  144. 1530 if rt>63 then dl=dl-65
  145. 1540 dp=0:xx=4:poke198,0:dq=0
  146. 1550 gosub1640:wait198,15:geta$
  147. 1560 if a$="" then dp=dp+1:ifdp>dl then dp=0
  148. 1570 if a$="[145]" then dp=dp-1:ifdp<0  then dp=dl
  149. 1580 if asc(a$)=13 then cs=dpor64:goto1650
  150. 1590 if a$="[133]"then cs=0:goto1620
  151. 1600 if a$="_" then gosub180:pm=cr:goto1360
  152. 1610 goto1550
  153. 1620 if rt>63  then 1500
  154. 1630 goto 1510
  155. 1640 yy=dq+12:gosub530:print" ":yy=dp+12:gosub530:print">":dq=dp:return
  156. 1650 sys32771,cs,rt,n$
  157. 1660 if rt>999 thengosub180:gosub1810:goto1680
  158. 1670 goto1550
  159. 1680 ifza=1 then za=0:gosub180:return
  160. 1690 goto1360
  161. 1700 s3=int(si/1000000):si=si-s3*1000000:s1=int(si/1000):s2=si-s1*1000:return
  162. 1710 rem get subcat fle
  163. 1720 a$=ci$(ax):if cs(ax)<>0then 1800
  164. 1730 close15:open15,de,15:gosub1220
  165. 1740 open3,de,3,a$+",s,r":gosub1220:fl=cx(ax):sys32768,fl,cc,cs,rt
  166. 1750 i=0:rt=int(rt)
  167. 1760 i=i+1:ifi>clthen1790
  168. 1770 if cs(i)<=cc and cs(i)>=cs thencs(i)=0
  169. 1780 goto 1760
  170. 1790 cs(ax)=cs:gosub1220:close3:close15
  171. 1800 return
  172. 1810 fr=07:fc=02:tr=20:tc=36:fu=07:co=1:rv=3:gosub120
  173. 1820 yy=9:xx=4:gosub530:print n$:print
  174. 1830 si=rt:gosub1700
  175. 1840 b$=str$(s1):ba$=right$("    "+b$,5)
  176. 1850 print "[159][195]alories per       [212][207][212][193][204]  ";ba$:bb$=" [197]ach           "
  177. 1860 b$=str$(s2):ba$=right$("    "+b$,5):s4=s3-(int(s3/10)*10)
  178. 1870 if s4=3 then bb$=" [207]unce by [214]olume"
  179. 1880 if s4=2 then bb$=" [207]unce by [215]eight"
  180. 1890 print"[159]";bb$;"   [211][193][212] [198][193][212]";ba$
  181. 1900 gosub1930:iflq<0then gosub180:return
  182. 1910 gosub2050:gosub2080:iflq<0then gosub180:return
  183. 1920 gosub180:return
  184. 1930 if s4=1 then pt=1:lq=1:return
  185. 1940 fr=12:fc=10:tr=23:tc=19:fu=7:co=1:rv=3:gosub120:p1=2:p2=4:pl=13
  186. 1950 ifs4=3 then p1=5:p2=11:pl=10
  187. 1960 yy=14:xx=13:gosub530:print"[159][213][206][201][212]"
  188. 1970 for i=p1top2:printtab(13);"[159]";l$(i):next:pt=p1:pq=p1
  189. 1980 yy=pt+pl:xx=11:gosub530:print">":poke198,0:wait198,15:geta$
  190. 1990 if a$="_"then lq=-1:gosub180:return
  191. 2000 if a$=""thenpt=pt+1:ifpt>p2thenpt=p1
  192. 2010 if a$="[145]"thenpt=pt-1:ifpt<0thenpt=p2
  193. 2020 if asc(a$)=13 then lq=l(pt):gosub180:return
  194. 2030 if a$="_"then l=-1:gosub180:return
  195. 2040 yy=pq+pl:gosub530:print" ":pq=pt:goto1980
  196. 2050 fr=12:fc=09:tr=18:tc=29:fu=7:co=1:rv=3:gosub120
  197. 2060 yy=14:xx=12:gosub530:print"[159] [197][206][212][197][210] [209][213][193][206][212][201][212][217] "
  198. 2070 yy=16:a5$="":al=8:a2$=" ":a7$="[159]":gosub830:gosub180:return
  199. 2080 yy=15:xx=07:gosub530:print"[159]"at;l$(pt);" will produce"
  200. 2090 b=at*lq*s1:b$=right$("     "+str$(int(b)),5)
  201. 2100 print "[159]";b$;" [212]otal [195]olories, and"
  202. 2110 b=at*lq*s2:b$=right$("     "+str$(int(b)),5)
  203. 2120 print "[159]";b$;" [211]at [198]at [195]alories":gosub380:return
  204. 2130 print"[147]":poke53281,0:poke53280,0:fr=09:fc=09:tr=20:tc=31:fu=7:co=1:rv=3
  205. 2140 gosub120:yy=11:xx=10:gosub530:print"[159]";b$;" [210][197][214][201][197][215] [213][208][196][193][212][197]"
  206. 2150 a7$="[159]":a5$="a":al=8:a2$=" "
  207. 2160 print tab(11);"[197]nter ";b$;" [206]ame: ":yy=15:xx=16:gosub830:lp$=a1$
  208. 2170 yy=17:xx=11:gosub530:print"[197]nter [211]tart [196]ate:"
  209. 2180 a2$="[217][217]/[205][205]/[196][196]":yy=19:xx=12:gosub830:ld$=a1$:a1$=a1$+"/"
  210. 2190 ln$="":a$="":j=0:gosub2300:ifj<0then 2330
  211. 2200 ln$=a$:ly=val(a$):a$="":gosub2300:ifj<0then 2330
  212. 2210 ln$=ln$+a$:lm=val(a$):a$="":gosub2300:ifj<0then 2330
  213. 2220 ln$=ln$+a$:ld=val(a$):ifly<89 or ly>99 then 2330
  214. 2230 if lm<1or lm>12 then 2330
  215. 2240 if ld<1 or ld>31 then2330
  216. 2250 lf$=left$(lp$+"........",8)+ln$
  217. 2260 lw=(ly-88)*365+ld+la(lm):lw=lw+int((ly-88)/4)
  218. 2270 if (int(ly/4)-(ly/4)=0) and lm<3 then lw=lw-1
  219. 2280 lw=lw-(int(lw/7)*7):gosub180:lw=lw+5:iflw>6then lw=lw-7
  220. 2290 return
  221. 2300 j=j+1:ifmid$(a1$,j,1)="/"thenreturn
  222. 2310 ifj>8thenj=-1:return
  223. 2320 a$=a$+mid$(a1$,j,1):goto2300
  224. 2330 print tab(11)"[159][196][193][212][197] [201][211] [201][206][214][193][204][201][196]![159]":gosub380:print"[145][145][145][145][145]"
  225. 2340 print tab(10);"[159]                     ":goto2170
  226. 2350 if mm=99 then return
  227. 2360 fr=12:fc=2:tr=22:tc=38:fu=7:co=1:rv=3:gosub120:print"[159]"
  228. 2370 yy=13:xx=16:gosub530:print x$:print"";n$
  229. 2380 print tab(6);"[196][193][217]= ";lw$(md);spc(9);"[205][197][193][204]= ";mm$(mm)
  230. 2390 m1$=right$("     "+str$(mf),5):m2$=right$("     "+str$(mt),5)
  231. 2400 printtab(5);"[195][193][204][207][210][201][197][211]: [198]at ";m1$;"  [212]otal ";m2$
  232. 2410 print tab(12);"for ";str$(mx/1000);"  ";l$(mq)
  233. 2420 if a=1 then print tab(12);"[211]ee [195]hange [205]enu":return
  234. 2430 print tab(5);"[159]_ = [195][193][206][195][197][204]    <[210]tn> = [197][216][197][195][213][212][197]"
  235. 2440 poke 198,0:wait198,15:geta$:ifa$="_" then a=0:gosub180:return
  236. 2450 if asc(a$)=13 then a=1:gosub180:print"":return
  237. 2460 goto2440
  238. 2470 fr=12:fc=10:tr=23:tc=19:fu=7:co=1:rv=3:gosub120
  239. 2480 yy=14:xx=13:gosub530:print"[159][196][193][217]":print
  240. 2490 forl=0to6:print tab(13);"";lw$(l):next
  241. 2500 l=1:lz=1:ll=1:gosub2550
  242. 2510 poke198,0:wait198,15:geta$:ifa$=""thenl=l+1:gosub2550:goto2510
  243. 2520 ifa$="[145]"thenl=l-1:gosub2550:goto2510
  244. 2530 if asc(a$)=13then gosub180:l=l-1:return
  245. 2540 goto2510
  246. 2550 if l>7thenl=1
  247. 2560 if l<1thenl=7
  248. 2570 yy=ll+15:xx=11:gosub530:print" ":yy=l+15:gosub530:print">":ll=l:return
  249. 2580 if lo<1 then lo=lp
  250. 2590 if lo>lp then lo=1
  251. 2600 yy=lr+4:xx=0:gosub530:print" ":yy=lo+4:gosub530:print"[159]>":lr=lo:return
  252. 2610 ifpp=0 then ifpl<3 then 2640
  253. 2620 m1$=right$("     "+str$(m1),6):m2$=right$("     "+str$(m2),5)
  254. 2630 printtab(16);"[159][205]eal [212]otal: ";m1$;m2$;"":pi(pl)=0:pl=pl+1:pp=0
  255. 2640 m1=0:m2=0:ifmm=9then2670
  256. 2650 if l<0 then 2670
  257. 2660 print"[159] ";mm$(mm);"[159]":pi(pl)=0:pl=pl+1
  258. 2670 xm=mm:return
  259. 2680 mm=int(mc/100000000):mc=mc-mm*100000000:mt=int(mc/10000):mf=mc-mt*10000
  260. 2690 md=int(mu/10000000):mu=mu-md*10000000:mx=int(mu/100):mq=mu-mx*100
  261. 2700 return
  262. 2710 print"[147][159]";c$;" for:[146] ";lp$:print"[145]"tab(24);"[211][212][193][210][212]:[146] ";ld$
  263. 2720 j=md:ifmd=99thenj=0
  264. 2730 printtab(4);"[159]([200][159])elp screen";spc(09);"[196][193][217]:[146] ";lw$(j):lp=0:pl=0
  265. 2740 print"   [215][197][201][199][200][212] ";wa/10
  266. 2750 print " [192][192][192][192][192][192][192][192] [197][206][212][210][217] [192][192][192][192][192][192][192][192] [195][193][204][211]> [198][193][212]  [212][207][212]"
  267. 2760 yy=5:xx=0:gosub530:ifpp=0 then xd=md:xm=0
  268. 2770 return
  269. 2780 if zt=1then c$=" [208][204][193][206]":le$="%!":goto2800
  270. 2790 c$="[195][207][206][211][213][205][197]":le$="%$"
  271. 2800 gosub2130:close15:open15,de,15,"i0":print#15,"r0:"+le$+lf$+"="+le$+lf$
  272. 2810 input#15,er:close15:ifer<>63then 3250
  273. 2820 open15,de,15:gosub480:open3,de,3,le$+lf$+",s,r":gosub480:i=0:input#3,wa,wb
  274. 2830 i=i+1:input#3,la$(i):input#3,lb(i):input#3,lc(i):lp(i)=i
  275. 2840 if left$(la$(i),1)<> chr$(255) then 2830
  276. 2850 lh=i:lg=i:gosub480:close3:close15:mm=9:xm=0:xd=0
  277. 2860 i=ni:pl=0:po=0:ifmm=9 then i=0
  278. 2870 i=i+1
  279. 2880 mc=lb(lp(i)):mu=lc(lp(i)):gosub2680
  280. 2890 if pl=0then nh=i-1:gosub2710
  281. 2900 pl=pl+1:ifpl>17 then po=1: printtab(12)"[159][205][207][210][197]":goto2980
  282. 2910 if mm=9 then gosub 2610:goto2970
  283. 2920 if xd<>md then l=-1:gosub2610:printtab(13);"[159][197][206][196] [207][198] [196][193][217]":goto2980
  284. 2930 l=0: if xm<>mm then gosub2610
  285. 2940 m1$=right$("     "+str$(mf),5):m2$=right$("     "+str$(mt),5)
  286. 2950 print" ";left$(la$(lp(i))+ss$,28);m1$;m2$
  287. 2960 m1=m1+mf:m2=m2+mt:pi(pl)=i:goto2870
  288. 2970 print tab(5);"[197]nd of [204]ist":pi(pl)=i:pl=pl+1
  289. 2980 lo=1:lq=1:lp=pl-1:lr=1:gosub2580:ni=i-1
  290. 2990 poke198,0:wait198,15:geta$
  291. 3000 ifa$=""then lo=lo+1:gosub2580:goto2990
  292. 3010 ifa$="[145]"then lo=lo-1:gosub2580:goto2990
  293. 3020 if a$="[133]"then pp=po :goto2860
  294. 3030 if a$="[134]"then n$=la$(pi(lo)):goto3110:rem f3
  295. 3040 if a$="h"then gosub3360:goto2990
  296. 3050 if a$="[138]"then goto3740:rem insert
  297. 3060 if a$="[135]"then 3990:rem  f5
  298. 3070 if a$="[139]"then goto3670:rem f6
  299. 3080 if a$="[136]"then 4230
  300. 3090 if a$="_"thengosub3800:print"[147]":return
  301. 3100 goto2990
  302. 3110 gosub420
  303. 3120 mc=lb(lp(pi(lo))):mu=lc(lp(pi(lo))):gosub2680
  304. 3130 l=0:za=1:gosub1250:ifa$="_" then ni=nh:goto2860
  305. 3140 iflq<0then 3240
  306. 3150 mx=at*1000:mq=pt:mt=at*lq*s2:mf=at*lq*s1
  307. 3160 if mm=9 or pi(lo)=0 then gosub2470:md=l:gosub3540:mm=l:gosub3480
  308. 3170 x$=" [208][201][195][203]":a=0:gosub2350:print"[159]":ifa=0then ni=nh:goto2860
  309. 3180 ifpi(lo)=0 then gosub3480
  310. 3190 lh=lh+1:lg=lg+1:iflh>106 or lg>106 then 4400
  311. 3200 for i1=lgtopi(lo) step-1:lp(i1)=lp(i1-1):next
  312. 3210 lp(pi(lo))=lh:la$(lh)=n$
  313. 3220 lb(lh)=int(mm)*100000000+int(at*lq*s1)*10000+int(at*lq*s2)
  314. 3230 lc(lh)=int(md)*10000000+int(at*100000)+int(pt)
  315. 3240 l=0:gosub3480:goto2860
  316. 3250 fr=12:fc=10:tr=20:tc=29:fu=7 :co=1 :rv=3:gosub120
  317. 3260 yy=14:xx=12:gosub530:print"[159]";lf$:printtab(12)"not in [196]irectory."
  318. 3270 iflw<>0 then printtab(12);" [196]ay is a ";lw$(lw);"!"
  319. 3280 printtab(12);"[195]reate it? (y/n)"
  320. 3290 poke 198,0:wait198,15:geta$:if a$="n"then gosub180:return
  321. 3300 gosub3940:wa=int(at*10):yy=18:xx=13:gosub530:print"[159]";
  322. 3310 print tab(13);"[195]reating [198]ile!"
  323. 3320 close15:open15,de,15,"i0":gosub480:open3,de,3,le$+lf$+",s,w":gosub480
  324. 3330 print#3,wa :print#3,0.0:print#3,chr$(255)+chr$(255)
  325. 3340 print#3,900000000.0:print#3,990000000.0:gosub480
  326. 3350 close3:close15:gosub180:goto2820
  327. 3360 fr=02:fc=26:tr=15:tc=39:fu=7 :co=1 :rv=3:gosub120:yy=4:xx=0:gosub530
  328. 3370 printtab(31)"[159][200][197][204][208]":printtab(30)"[163][163][163][163][163][163]"
  329. 3380 printtab(27)"[195][210][211][210] = [211]el"
  330. 3390 printtab(27)"f1 = [208]age"
  331. 3400 printtab(27)"f3 = [208]ick"
  332. 3410 printtab(27)"f4 = [201]nsert"
  333. 3420 printtab(27)"f5 = [195]hange"
  334. 3430 printtab(27)"f6 = [196]elete"
  335. 3440 printtab(27)"f7 = [211]ummary"
  336. 3450 printtab(27)" _ = [197]scape "
  337. 3460 printtab(27)"  [146]any key"
  338. 3470 poke 198,0:wait198,15:geta$:gosub180:return
  339. 3480 a=0:aa=md*10000000
  340. 3490 a=a+1:ifaa>lc(lp(a)) then 3490
  341. 3500 aa=(md+1)*10000000:ab=mm * 100000000:ni=a-1
  342. 3510 ifab<lb(lp(a)) then 3530
  343. 3520 if aa>lc(lp(a))then a=a+1:goto3510
  344. 3530 pi(lo)=a:return
  345. 3540 fr=12:fc=20:tr=20:tc=33:fu=7:co=1:rv=3:gosub120:print"[159]"
  346. 3550 yy=14:xx=23:gosub530:print"[205][197][193][204]"
  347. 3560 forl=1to4:printtab(23);"";mm$(l):next
  348. 3570 l=1:lz=1:ll=1:gosub3620
  349. 3580 poke198,0:wait198,15:geta$:ifa$=""thenl=l+1:gosub3620:goto3580
  350. 3590 ifa$="[145]"then l=l-1:gosub3620:goto3580
  351. 3600 if asc(a$)=13 then gosub180:print"":return
  352. 3610 goto3580
  353. 3620 if l>4 then l=1
  354. 3630 if l<1 then l=4
  355. 3640 yy=ll+15:xx=21:gosub530:print" ":yy=l+15:gosub530:print">":ll=l:return
  356. 3650 fr=4:fc=13:tr=8:tc=27:fu=7:co=1:rv=3:gosub120:print"[159]"
  357. 3660 yy=7:xx=15:gosub530:print"[205][207][214][197] [195][213][210][211][207][210]":gosub380:gosub180:print"":return
  358. 3670 i=pi(lo):ifi=0thengosub3650:goto2990
  359. 3680 x$="[196][197][204][197][212][197]":n$=la$(lp(i)):mc=lb(lp(i)):mu=lc(lp(i)):gosub2680
  360. 3690 ifmm=9thengosub3650:goto2860
  361. 3700 a=0:gosub2350:print"[159]":ifa=0then2990
  362. 3710 gosub 3720:goto2860
  363. 3720 lg=lg-1:forl=itolg:lp(l)=lp(l+1):next
  364. 3730 ni=nh:return
  365. 3740 a$="[201][206][211][197][210][212][201][206][199]":gosub4380
  366. 3750 i=pi(lo):gosub2470:md=l:gosub3540:mm=l:gosub3880:n$=a1$
  367. 3760 a$="[212][207][212][193][204]":gosub3910:mt=at:a$="[211][193][212] [198][193][212]":gosub3910:mf=at:s2=at:mq=1:pt=1
  368. 3770 gosub2050:ifat=.0thengosub4420:goto3770
  369. 3780 mx=at*1000:s1=mt/at:s2=mf/at:a=0:gosub2350:if a=0thengoto2860
  370. 3790 gosub3480:goto3190
  371. 3800 close15:open15,de,15,"r:star=star":input#15,je:close15
  372. 3810 ifje=63thenreturn
  373. 3811 fr=12:fc=10:tr=20:tc=29:fu=7:co=1:rv=3:gosub120:print"[159]"
  374. 3819 yy=15:xx=13:gosub530:print" [211]aving [198]ile!"
  375. 3820 close15:open15,de,15,"i0":gosub480:open3,de,3,"@0:"+le$+lf$+",s,w":gosub480
  376. 3830 print#3,wa:print#3,wb:i=0
  377. 3840 i=i+1:ifleft$(la$(lp(i)),1)=chr$(255)then3860
  378. 3850 print#3,la$(lp(i)):print#3,lb(lp(i)):print#3,lc(lp(i)):goto3840
  379. 3860 print#3,la$(lp(i)):print#3,lb(lp(i)):print#3,lc(lp(i))
  380. 3870 gosub480:close3:close15:gosub180:return
  381. 3880 fr=16:fc=02:tr=22:tc=38:fu=7:co=1:rv=3:gosub120:yy=18:xx=14
  382. 3890 gosub530:a7$="[159]":a5$="a":al=30.:a2$="":print "[197][206][212][197][210] [206][193][205][197]"
  383. 3900 yy=20:xx=4:gosub830:print"":gosub180:return
  384. 3910 fr=16:fc=08:tr=22:tc=33:fu=7:co=1:rv=3:gosub120:yy=18:xx=10
  385. 3920 gosub530:a7$="[159]":a5$="":al=8. :a2$="":print "[197][206][212][197][210] ";a$;" [195][193][204][207][210][201][197][211]"
  386. 3930 yy=20:xx=15:gosub830:print"[159]":gosub180:return
  387. 3940 ifzt=1then a$="[212][193][210][199][197][212]":goto3960
  388. 3950 a$="[193][195][212][213][193][204]"
  389. 3960 fr=9:fc=9:tr=15:tc=32:fu=7:co=1:rv=3:gosub120:print"[159]"
  390. 3970 yy=11:xx=11:gosub530:print"[197][206][212][197][210] ";a$;" [215][197][201][199][200][212]":yy=13:xx=16
  391. 3980 a7$="[159]":a5$="":al=6:a2$="":gosub830:gosub180:return
  392. 3990 i=pi(lo):if i=0then gosub 3650:goto2990
  393. 4000 x$="[195][200][193][206][199][197]":n$=la$(lp(i)):mc=lb(lp(i)):mu=lc(lp(i)):gosub2680
  394. 4010 if mm=9 then gosub3650:goto2990
  395. 4020 at=mx/1000:pt=mq:lq=1:s1=mt/at:s2=mf/at
  396. 4030 fr=2:fc=2:tr=10:tc=38:fu=7:co=1:rv=3:gosub120:print"[159]"
  397. 4040 yy=4:xx=14:gosub530:print"[195][200][193][206][199][197][205][197][206][213]":yy=5:gosub530:print"[163][163][163][163][163][163][163][163][163][163][163]"
  398. 4050 print " 1.[196]ay   4. [198]at [195]al    7.[215]eight"
  399. 4060 print " 2.[205]eal  5. [212]ot [195]al"
  400. 4070 print " 3.[206]ame  6. [209]uantity   _ = [197][211][195][193][208][197]"
  401. 4080 a=1:gosub2350
  402. 4090 poke198,0:wait198,15:geta$:ifa$="_"thengosub180:goto4130
  403. 4100 if a$<"1"then 4090
  404. 4110 if a$>"7"then 4090
  405. 4120 gosub180:a=val(a$):on a goto4150,4160,4170,4180,4190,4200,4210
  406. 4130 gosub180:a=0:gosub2350:ifa=0thenni=nh:goto2860
  407. 4140 i=pi(lo):gosub3720:gosub3480:goto3190
  408. 4150 gosub2470:md=l:goto4080
  409. 4160 gosub3540:mm=l:goto4080
  410. 4170 gosub3880:n$=a1$:at=mx/1000:goto4080
  411. 4180 a$="[211][193][212] [198][193][212]":gosub3910:mf=at:at=mx/1000:goto4220
  412. 4190 a$="[212][207][212][193][204]":gosub3910:mt=at:at=mx/1000:goto4220
  413. 4200 gosub2050:mx=at*1000:goto4220
  414. 4210 gosub3940:wa=int(at*10):ni=nh:gosub180:goto2860:rem weight
  415. 4220 lq=1:s1=mt/at:s2=mf/at:goto4080
  416. 4230 a$=" [215][193][201][212]... ":gosub4380
  417. 4240 fori=0to6:forj=0to7:sd(i,j)=0:next:next
  418. 4250 fori=1tolg:mc=lb(lp(i)):mu=lc(lp(i)):gosub2680
  419. 4260 if mm=9 then 4280
  420. 4270 sd(md,mm-1)=sd(md,mm-1)+mt:sd(md,mm+3)=sd(md,mm+3)+mf
  421. 4280 next:gosub180:print"[147][159]"spc(11)"[195][193][204][207][210][201][197] [211][213][205][205][193][210][217]":a$="[212][207][212][193][204]"
  422. 4290 print "  [196][193][217]  [194]kft [204]nch [196]inr [211]nck [212]otal"
  423. 4300 foro=0to1:printtab(15);"[159]";a$
  424. 4310 fori=0to6:m1$=right$("     "+str$(sd(i,0+o*4)),5):se=se+sd(i,o*4+0)
  425. 4320 m2$=right$("     "+str$(sd(i,1+o*4)),5):se=se+sd(i,o*4+1)
  426. 4330 m3$=right$("     "+str$(sd(i,2+o*4)),5):se=se+sd(i,o*4+2)
  427. 4340 m4$=right$("     "+str$(sd(i,3+o*4)),5):se=se+sd(i,o*4+3)
  428. 4350 m5$=right$("     "+str$(se),5):se=0
  429. 4360 print"  [159]";lw$(i)" ";m1$;m2$;m3$;m4$;m5$:next
  430. 4370 a$="[211][193][212] [198][193][212]":next:gosub380:ni=nh:mm=0: goto2860
  431. 4380 fr=4:fc=13:tr=8:tc=27:fu=7:co=1:rv=3:gosub120:print"[159]"
  432. 4390 yy=6:xx=16:gosub530:printa$:return
  433. 4400 a$=" [204][201][205][201][212]":gosub4380:yy=7:gosub530:print"[197][216][195][197][197][196][197][196]":gosub380:gosub180
  434. 4410 gosub3800:print"[147]":return
  435. 4420 a$="[209][213][193][206][212][201][212][217]":gosub4380:yy=7:gosub530:print"  [218][197][210][207]  ":gosub380:gosub180
  436. 4430 return
  437. 5000 print"[147][146][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]";
  438. 5010 fori=1to3:print"[159]                                        ";:next
  439. 5020 print"[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]"
  440. 5030 print"[159]"tab(5)"[195][160][193] [204] [207] [210] [201] [197] [160] [212][160][210][160][193][160][195] [203][160][197][160][210]"
  441. 5040 fori=217to242:pokei,peek(i)or128:next:return
  442.