home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 92 / 092.d81 / schc (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  11KB  |  351 lines

  1. 0 dv=peek(186):ifdv<8thendv=8
  2. 1 ifa=0thena=1:load"help-schc",dv,1
  3. 2 ifa=1thena=2:load"notepad",dv,1
  4. 3 poke198,0
  5. 5 dim m0$(20),m1$(20),m2$(20),m3$(20),m4$(20),m5$(20),m6$(20),m7$(20),m8$(20)
  6. 6 dimm9$(20):sp$="          "
  7. 7 dimd$(44):fori=0to44:d$(i)="0":next
  8. 10 poke53280,0:poke53281,0:ad=36864
  9. 20 readx:fori=1tox:readm0$(i):next
  10. 21 readx:fori=1tox:readm1$(i):next
  11. 22 readx:fori=1tox:readm2$(i):next
  12. 24 readx:fori=1tox:readm3$(i):next
  13. 25 readx:fori=1tox:readm4$(i):next
  14. 26 readx:fori=1tox:readm5$(i):next
  15. 27 readx:fori=1tox:readm6$(i):next
  16. 30 readx:fori=1tox:readm9$(i):next
  17. 33 print"";
  18. 40 sysad,"[212][160][193][160][216][160] [160][193] [195][160][195] [207] [213] [206] [212][160][193][160][206] [212]","[211]chedule [195]"
  19. 50 ifpeek(198)<>1thenend
  20. 55 sysad+15:getdv$:getme$:gethi$:gettx$
  21. 56 dv=asc(dv$):m=asc(me$)and15:h=asc(hi$)and15:tx=asc(tx$)and15
  22. 60 sysad+18:poke198,0:gosub9000
  23. 70 sysad+3,11+64,11,8,m,h,tx,m0$(1),m0$(2),m0$(3),m0$(4),m0$(5),m0$(6),m0$(7),m0$(8),m0$(9),m0$(10),m0$(11)
  24. 80 getk$:k$=str$(asc(k$)-48):k=val(k$)
  25. 85 ifk>3thensysad+18:poke781,21:sys59903
  26. 90 onkgoto 200,300,900,1070,2070,3070,4070,5070,6070,700,40
  27. 95 goto70
  28. 100 :
  29. 200 gosub9300
  30. 210 ifval(w$)=0then275
  31. 220 open15,dv,15,"io":w$="schc."+w$
  32. 225 open2,dv,2,"0:"+w$+",s,r"
  33. 230 input#15,e,e$,e1,e2
  34. 234 poke214,21:print:print"                                    "
  35. 235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
  36. 236 poke214,21:print:print"                                    "
  37. 240 ifethenclose2:close15:print"[145][198]ile [206]ot [204]oaded":fori=1to2000:next:goto275
  38. 250 fori=0to44:input#2,d$(i):next
  39. 270 close2:close15
  40. 275 gosub9000:goto70
  41. 280 :
  42. 300 gosub9300:ifval(w$)=0then375
  43. 310 w$="schc."+w$
  44. 320 open15,dv,15,"s0:"+w$:close15
  45. 330 open15,dv,15,"io"
  46. 335 open2,dv,2,"0:"+w$+",s,w"
  47. 340 input#15,e,e$,e1,e2
  48. 344 poke214,21:print:print"                                    "
  49. 345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
  50. 346 poke214,21:print:print"                                    "
  51. 350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
  52. 360 fori=0to44:print#2,d$(i):next
  53. 370 close2:close15
  54. 375 gosub9000:goto70
  55. 390 :
  56. 400 tl=0:fori=37to41:tl=tl+val(d$(i)):next:d$(42)=str$(tl)
  57. 405 d$(44)=str$(val(d$(42))-val(d$(43))):d$(4)=d$(44)
  58. 410 d$(3)=str$(val(d$(1))-val(d$(2)))
  59. 415 d$(5)=str$(val(d$(3))-val(d$(4)))
  60. 420 d$(7)=str$(val(d$(5))+val(d$(6)))
  61. 425 d$(28)=str$(int(val(d$(27))*.20+.5))
  62. 430 d$(29)=str$(val(d$(27))-val(d$(28)))
  63. 435 tl=0:fori=8to26:tl=tl+val(d$(i)):next
  64. 440 t1=val(d$(29))+val(d$(30))+val(d$(31))+val(d$(32))
  65. 445 d$(33)=str$(tl+t1)
  66. 450 d$(34)=str$(val(d$(7))-val(d$(33)))
  67. 460 d$(36)=str$(val(d$(34))-val(d$(35)))
  68. 475 return
  69. 480 :
  70. 500 sysad+6,2:sysad+9,1
  71. 505 sys50176,1,3,38,20,tx,0
  72. 510 ky=peek(197)
  73. 515 ifky=3thensys51712,1,3,38,20,7:goto505
  74. 520 ifky=6thenopen15,dv,15,"s0:"+n$:close15:sysad+12,n$,1:goto505
  75. 530 ifky=5then poke147,0:sys57812n$,dv,1:sys62631:sysad+9,1:goto505
  76. 550 sysad+6,1:sysad+9,2:return
  77. 560 :
  78. 600 sysad+6,2:poke646,tx:print"[147]"tab(14)"*** [200][197][204][208] ***"
  79. 601 poke646,m
  80. 602 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][192][192][174]";
  81. 603 fori=1to21:print"[221]                                      [221]";:next
  82. 604 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][192][192][189]";:poke646,tx
  83. 605 print"              [208]ress [210][197][212][213][210][206]";:poke52346,tx
  84. 606 open2,dv,2,h$+",p,r":sys51968
  85. 610 poke198,0
  86. 615 getk$:ifk$<>chr$(13)then615
  87. 620 close2:sysad+9,2:return
  88. 625 :
  89. 700 poke646,tx
  90. 701 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][192][174]"
  91. 702 print"[221]          [211]chedule [195] [212]otals          [221]"
  92. 704 print"[171][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][192][179]"
  93. 706 print"[221][199]ross [201]ncome (7)                     [221]"
  94. 708 print"[221][212]otal [197]xpenses (28)                  [221]"
  95. 710 print"[221][195]ost of [199]oods (40)                   [221]"
  96. 712 print"[221][206]et [208]rofit ([204]oss)                    [221]"
  97. 724 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][192][189]"
  98. 725 fori=217to242:pokei,peek(i)or128:next
  99. 726 gosub9200
  100. 730 print""
  101. 735 printtab(28)right$(sp$+d$(7),10)
  102. 740 printtab(28)right$(sp$+d$(33),10)
  103. 745 printtab(28)right$(sp$+d$(44),10)
  104. 750 printtab(28)right$(sp$+d$(36),10)
  105. 775 getk$:ifk$<>chr$(13)then775
  106. 780 sysad+18:gosub9000:goto70
  107. 785 :
  108. 900 gosub9400:ifw$<>"y"thengosub9000:goto70
  109. 905 poke214,22:print:print"[208]rinting...      "
  110. 910 open4,4,7
  111. 915 print#4,sp$;"[211]chedule [195]
  112. 920 [152]4,sp$;"-------------------------------------"
  113. 922 [129]i[178]1[164]7:[152]4,sp$;[200](m1$(i),27)[170][201](sp$[170]d$(i),10):[130]:[152]4
  114. 925 [129]i[178]1[164]8:[152]4,sp$;[200](m2$(i),27)[170][201](sp$[170]d$(i[170]7),10):[130]:[152]4
  115. 930 [129]i[178]1[164]8:[152]4,sp$;[200](m3$(i),27)[170][201](sp$[170]d$(i[170]15),10):[130]:[152]4
  116. 935 [129]i[178]1[164]9:[152]4,sp$;[200](m4$(i),27)[170][201](sp$[170]d$(i[170]23),10):[130]:[152]4
  117. 955 [129]i[178]1[164]4:[152]4,sp$;[200](m5$(i),27)[170][201](sp$[170]d$(i[170]32),10):[130]:[152]4
  118. 960 [129]i[178]1[164]8:[152]4,sp$;[200](m6$(i),27)[170][201](sp$[170]d$(i[170]36),10):[130]:[152]4
  119. 990 [152]4:[160]4:[141]9000:[137]70
  120. 995 :
  121. 1000 [158]ad[170]3,11[170]64,1,8,m,h,tx,m1$(1),m1$(2),m1$(3),m1$(4),m1$(5),m1$(6),m1$(7),m1$(8),m1$(9),m1$(10),m1$(11)
  122. 1010 [161]k$:k$[178][196]([198](k$)[171]48):k[178][197](k$)
  123. 1020 [139]k[178]11[167][158]ad[170]18:[137]70
  124. 1025 [139]k[178]10[167]h$[178]"schc.h1":[141]600:[137]1000
  125. 1030 [139]k[178]8[167]n$[178]"schc.n1":[141]500:[137]1000
  126. 1035 [139]k[178]9[167][141]9500:[137]1000
  127. 1045 [139]k[178]3[167]1000
  128. 1046 [139]k[178]4[167]1000
  129. 1047 [139]k[178]5[167]1000
  130. 1048 [139]k[178]7[167]1000
  131. 1050 [141]9100:[139][195](w$)[178]0[167]1000
  132. 1055 d$(k)[178]w$
  133. 1067 [141]400
  134. 1070 [129]i[178]1[164]7:m1$(i)[178][200](m1$(i),27)[170][201](sp$[170]d$(i),10):[130]
  135. 1075 [137]1000
  136. 1080 :
  137. 2000 [158]ad[170]3,12[170]64,1,8,m,h,tx,m2$(1),m2$(2),m2$(3),m2$(4),m2$(5),m2$(6),m2$(7),m2$(8),m2$(9),m2$(10),m2$(11),m2$(12)
  138. 2010 [161]k$:k$[178][196]([198](k$)[171]48):k[178][197](k$)
  139. 2020 [139]k[178]12[167][158]ad[170]18:[137]70
  140. 2025 [139]k[178]11[167]h$[178]"schc.h2":[141]600:[137]2000
  141. 2030 [139]k[178]9[167]n$[178]"schc.n2":[141]500:[137]2000
  142. 2035 [139]k[178]10[167][141]9500:[137]2000
  143. 2050 [141]9100:[139][195](w$)[178]0[167]2000
  144. 2055 d$(k[170]7)[178]w$:[141]400
  145. 2070 [129]i[178]1[164]8:m2$(i)[178][200](m2$(i),27)[170][201](sp$[170]d$(i[170]7),10):[130]
  146. 2087 [137]2000
  147. 2090 :
  148. 3000 [158]ad[170]3,12[170]64,1,8,m,h,tx,m3$(1),m3$(2),m3$(3),m3$(4),m3$(5),m3$(6),m3$(7),m3$(8),m3$(9),m3$(10),m3$(11),m3$(12)
  149. 3010 [161]k$:k$[178][196]([198](k$)[171]48):k[178][197](k$)
  150. 3020 [139]k[178]12[167][158]ad[170]18:[137]70
  151. 3025 [139]k[178]11[167]h$[178]"schc.h3":[141]600:[137]3000
  152. 3030 [139]k[178]10[167][141]9500:[137]3000
  153. 3035 [139]k[178]9[167]n$[178]"schc.n3":[141]500:[137]3000
  154. 3050 [141]9100:[139][195](w$)[178]0[167]3000
  155. 3052 d$(k[170]15)[178]w$:[141]400
  156. 3070 [129]i[178]1[164]8:m3$(i)[178][200](m3$(i),27)[170][201](sp$[170]d$(i[170]15),10):[130]
  157. 3085 [137]3000
  158. 3090 :
  159. 4000 [158]ad[170]3,13[170]64,1,7,m,h,tx,m4$(1),m4$(2),m4$(3),m4$(4),m4$(5),m4$(6),m4$(7),m4$(8),m4$(9),m4$(10),m4$(11),m4$(12),m4$(13)
  160. 4010 [161]k$:k$[178][196]([198](k$)[171]48):k[178][197](k$)
  161. 4020 [139]k[178]13[167][158]ad[170]18:[137]70
  162. 4025 [139]k[178]12[167]h$[178]"schc.h4":[141]600:[137]4000
  163. 4030 [139]k[178]11[167][141]9500:[137]4000
  164. 4035 [139]k[178]10[167]n$[178]"schc.n4":[141]500:[137]4000
  165. 4040 [139]k[1