home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 129 / 129.d81 / schc (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1995-01-01  |  8.7 KB  |  318 lines

  1. 0 w$="":dv=peek(186):ifdv<8thendv=8
  2. 1 ifa=0thena=1:load"scroll 9000",dv,1
  3. 2 remifa=1thena=2:load"notepad c900",dv,1
  4. 3 remifa=2thena=3:load"tool box c000",dv,1
  5. 4 poke55,0:poke56,144:clr
  6. 5 w$="":dv=peek(186):ifdv<8thendv=8
  7. 6 poke198,0:sp$="          "
  8. 7 dim m1$(44),m2$(20),d$(44),ch(44):fl=0:f1=0
  9. 8 fori=0to44:d$(i)="0":next
  10. 10 poke53280,0:poke53281,0:ad=49152
  11. 21 readx:fori=1tox:readm1$(i):next
  12. 22 readx:fori=1tox:readm2$(i):next
  13. 23 readx:fori=1tox:readch(i):next
  14. 30 print"[147]";:gosub9500
  15. 40 sysad+21,"[212][193][216] [193][195][195][207][213][206][212][193][206][212]: [211]chedule [195]",0,10,0
  16. 43 sysad+18,0,1,38,19,7,0:sysad+15,1,2,38,20,160,14
  17. 46 gosub9000:gosub9500
  18. 50 x=0:y=1:d=44:w=38:tx=14:hi=1:bx=4:ex$=chr$(133):max=19:v=0
  19. 52 fori=217to242:pokei,peek(i)or128:next
  20. 54 poke214,y-1:print:print:poke646,tx
  21. 56 fori=1tomax:printtab(x+1)""left$(m1$(i+v)+sp$,w):next:r=1
  22. 57 hi=1:ifch(r+v)=1thenhi=10
  23. 58 r=1:r1=1:poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v)+sp$,w)
  24. 62 getk$:ifk$=""then62
  25. 66 ifk$=chr$(13)then135
  26. 68 ifk$="[145]"thengosub800
  27. 70 ifk$=""thengosub850
  28. 79 ifk$="[136]"thengosub1000:ifk=10ork=1then52
  29. 88 ifk$="_"thengosub7000:rem exit
  30. 92 poke646,tx:poke214,r1+y-1:print:printtab(x+1)""left$(m1$(r1+v)+sp$,w)
  31. 93 hi=1:ifch(r+v)=1thenhi=10
  32. 94 poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v)+sp$,w)
  33. 96 r1=r:goto62
  34. 98 :
  35. 135 ifch(r+v)=1then62
  36. 140 gosub9100:iflen(w$)=0then62
  37. 145 ww=val(w$):w$=str$(ww):d$(r+v)=w$
  38. 150 remgosub400
  39. 186 remgosub9500
  40. 187 m1$(r+v)=left$(m1$(r+v),27):d$(r+v)=right$(sp$+d$(r+v),10)
  41. 188 m1$(r+v)=m1$(r+v)+d$(r+v)
  42. 190 goto92
  43. 195 :
  44. 200 gosub9300
  45. 210 ifval(w$)=0thenclose2:close15:gosub9000:return
  46. 220 open15,dv,15,"io":w$="schc."+w$
  47. 225 open2,dv,2,"0:"+w$+",s,r"
  48. 230 input#15,e,e$,e1,e2
  49. 234 poke214,21:print:print"                                    "
  50. 235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
  51. 236 poke214,21:print:print"                                    "
  52. 240 ifethenclose2:close15:gosub9000:return
  53. 250 fori=0to44:input#2,d$(i):next
  54. 270 close2:close15
  55. 275 gosub9000:gosub9500:return
  56. 280 :
  57. 300 gosub9300:ifval(w$)=0then375
  58. 310 w$="schc."+w$
  59. 320 open15,dv,15,"s0:"+w$:close15
  60. 330 open15,dv,15,"io"
  61. 335 open2,dv,2,"0:"+w$+",s,w"
  62. 340 input#15,e,e$,e1,e2
  63. 344 poke214,21:print:print"                                    "
  64. 345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
  65. 346 poke214,21:print:print"                                    "
  66. 350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
  67. 355 d$(0)=d$(36)
  68. 360 fori=0to44:print#2,d$(i):next
  69. 370 close2:close15
  70. 375 gosub9000:return
  71. 390 :
  72. 400 sysad+3,0:gosub9600
  73. 402 poke214,21:print:print"[195]alculating...    ";
  74. 404 tl=0:fori=37to41:tl=tl+val(d$(i)):next:d$(42)=str$(tl)
  75. 405 d$(44)=str$(val(d$(42))-val(d$(43))):d$(4)=d$(44)
  76. 410 d$(3)=str$(val(d$(1))-val(d$(2)))
  77. 415 d$(5)=str$(val(d$(3))-val(d$(4)))
  78. 420 d$(7)=str$(val(d$(5))+val(d$(6)))
  79. 425 rem d$(28)=str$(int(val(d$(27))*.50+.5))
  80. 430 d$(29)=str$(val(d$(27))-val(d$(28)))
  81. 435 tl=0:fori=8to26:tl=tl+val(d$(i)):next
  82. 440 t1=val(d$(29))+val(d$(30))+val(d$(31))+val(d$(32))
  83. 445 d$(33)=str$(tl+t1)
  84. 450 d$(34)=str$(val(d$(7))-val(d$(33)))
  85. 460 d$(36)=str$(val(d$(34))-val(d$(35)))
  86. 475 gosub9500:return
  87. 480 :
  88. 500 poke781,23:sys59903
  89. 501 poke214,21:print:print"   [198]1=[204]oad  [198]3=[211]ave  [198]5=[208]rint  [198]7=[197]xit  "
  90. 502 sysad+15,1,2,38,20,32,14:n$="schc.n"
  91. 505 sys51456,1,2,38,20,3,0
  92. 510 ky=peek(197)
  93. 515 ifky=6thensysad+3,3:gosub9400:sysad+6,3:ifw$="y"thensysad+27,1,2,38,20,7
  94. 520 ifky=5thenopen15,dv,15,"s0:"+n$:close15:sys57812n$,dv
  95. 525 ifky=5thenpoke193,0:poke194,4:poke174,0:poke175,8:sys62954:goto505
  96. 530 ifky=4then poke147,0:sys57812n$,dv,1:sys62631:goto505:rem load
  97. 550 ifky=3thenreturn
  98. 555 goto505
  99. 560 :
  100. 600 sysad+3,1:print"[147]"tab(14)"[150]*** [200][197][204][208] ***"
  101. 601 sysad+18,0,1,38,21,1,0
  102. 602 h$="t.schc help":sysad+33
  103. 605 sysad+21,"[208]ress [210][197][212][213][210][206]     _ to [197]xit",24,13,0
  104. 606 open2,dv,2,h$+",p,r":sysad+30,14
  105. 610 poke198,0
  106. 611 sysad+21,"       [208]ress [210][197][212][213][210][206]       ",24,10,0
  107. 615 getk$:ifk$<>chr$(13)then615
  108. 620 poke198,0:close2:sysad+6,1:return
  109. 625 :
  110. 800 r=r-1:ifr<>0thenreturn
  111. 805 r=1:gosub875
  112. 806 v=v-1:ifv=-1thenv=0:return
  113. 807 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v+1)+sp$,w)
  114. 808 sys36864,x+1,x+w,y+1,y+max,1
  115. 810 return
  116. 815 :
  117. 850 r=r+1:ifr<=maxthenreturn
  118. 855 r=r-1:ifr>d then return
  119. 860 gosub875
  120. 861 v=v+1:ifv>d-maxthenv=v-1:return
  121. 862 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v-1)+sp$,w)
  122. 863 sys36864,x+1,x+w,y+1,y+max,0
  123. 865 return
  124. 870 :
  125. 875 poke646,tx:poke214,r1+y-1:print:printtab(x+1)left$(m1$(r1+v)+sp$,w)
  126. 880 poke646,tx:poke214,r+y-1:print:printtab(x+1)left$(m1$(r+v)+sp$,w)
  127. 885 return
  128. 890 :
  129. 900 gosub9400:ifw$<>"y"thengosub9000:return
  130. 905 poke214,21:print:print"[208]rinting...       ";
  131. 910 open4,4,7
  132. 915 print#4,sp$"[211][195][200][197][196][213][204][197] [195]"
  133. 920 print#4,sp$"-------------------------------------"
  134. 925 fori=1to7:print#4,sp$;m1$(i):next:print#4
  135. 926 fori=8to33:print#4,sp$;m1$(i):next:print#4
  136. 927 fori=34to36:print#4,sp$;m1$(i):next:print#4
  137. 928 fori=37to44:print#4,sp$;m1$(i):next:print#4
  138. 930 print#4:close4:gosub9000:return
  139. 935 :
  140. 1000 sysad+3,2
  141. 1005 sysad+18,10,5,20,11,13,1
  142. 1010 poke214,5:print
  143. 1015 printtab(11)"[153][204]oad [198]ile"
  144. 1020 printtab(11)"[211]ave [198]ile"
  145. 1025 printtab(11)"[208]rint [198]ile"
  146. 1030 printtab(11)"[200]elp"
  147. 1035 printtab(11)"[195]alculator"
  148. 1036 printtab(11)"[206]otepad"
  149. 1040 printtab(11)"[196]irectory"
  150. 1045 printtab(11)"[196]isk [196]rive #"+str$(dv)
  151. 1050 printtab(11)"[212]otals"
  152. 1055 printtab(11)"[195]alculate [211]heet"
  153. 1057 printtab(11)"[197]xit"
  154. 1060 sysad+12,11,6,29,11,13,1
  155. 1065 k=peek(828)
  156. 1070 onkgosub200,300,900,600,5000,500,6000,6100,2000,400
  157. 1075 sysad+6,2:return
  158. 1080 :
  159. 2000 sysad+6,2
  160. 2005 print"[153][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]";
  161. 2010 print"[221]          [211]chedule [195] [212]otals           [221]";
  162. 2015 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][192][179]";
  163. 2020 print"[221][199]ross [201]ncome (7)                      [221]";
  164. 2025 print"[221][212]otal [197]xpenses (28)                   [221]";
  165. 2030 print"[221][195]ost of [199]oods (40)                    [221]";
  166. 2035 print"[221][206]et [208]rofit ([204]oss)                     [221]";
  167. 2040 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]";
  168. 2045 fori=217to242:pokei,peek(i)or128:next
  169. 2055 print""
  170. 2060 printtab(28)right$(sp$+d$(7),10)
  171. 2065 printtab(28)right$(sp$+d$(33),10)
  172. 2070 printtab(28)right$(sp$+d$(44),10)
  173. 2075 printtab(28)right$(sp$+d$(36),10)
  174. 2080 getk$:ifk$<>chr$(13)then2080
  175. 2085 sysad+6,2:return
  176. 2090 :
  177. 5000 sysad+6,2:gosub9600
  178. 5001 sysad+18,11,5,18,1,5,0
  179. 5002 sysad+18,11,8,18,6,5,0:sysad+33:poke214,8:print
  180. 5003 fori=1to6:printtab(12)""m2$(i):next
  181. 5004 ac=0:ac$="0":sysad+3,1
  182. 5005 ac$=right$(sp$+ac$,10):poke646,tx
  183. 5006 sysad+6,1:print""tab(19)ac$
  184. 5010 sysad+12,12,9,29,6,1,10
  185. 5020 k=peek(828)
  186. 5025 ifk=6thensysad+6,2:return
  187. 5030 ifk=1thenac=0:goto5065
  188. 5035 gosub9100
  189. 5040 p=val(w$):ifp=0then5005
  190. 5045 ifk=2thenac=ac+p
  191. 5050 ifk=3thenac=ac-p
  192. 5055 ifk=4thenac=ac*p
  193. 5060 ifk=5thenac=ac/p
  194. 5065 ac$=str$(ac):goto5005
  195. 5070 :
  196. 6000 print"[147][154]"
  197. 6005 sysad,dv
  198. 6007 sysad+21,"[208]ress [210][197][212][213][210][206]",24,10,0
  199. 6008 getk$:ifk$<>chr$(13)then6008
  200. 6015 :return
  201. 6020 :
  202. 6100 gosub9600:poke646,tx
  203. 6105 poke214,21:print:print"[197]nter [196]rive: ";
  204. 6110 sysad+9,2,0,32,1
  205. 6111 ifval(w$)<8orval(w$)>16then6115
  206. 6112 ww=val(w$):open1,ww,1:close1
  207. 6113 ifst=0thendv=ww
  208. 6114 ifst<>0thengosub9200
  209. 6115 gosub9000:return
  210. 6120 :
  211. 7000 gosub9600:poke646,tx
  212. 7005 poke214,21:print:print"[209]uit? [193]re [217]ou [211]ure? ";
  213. 7010 sysad+9,1,1,32,1
  214. 7015 ifw$<>"y"thengosub9000:return
  215. 7020 open15,dv,15,"r0:b.tax=b.tax":input#15,er%:close15
  216. 7025 ifer%<>63thenend
  217. 7030 poke646,peek(53281)
  218. 7035 print"[147]load"chr$(34)"b.tax"chr$(34)","dv
  219. 7040 print"run"
  220. 7045 poke631,13:poke632,13:poke633,13:poke198,3:end
  221. 9000 sysad+33
  222. 9001 poke214,21:print:print"[153][195][210][211][210] [203]eys/[210][197][212][213][210][206] to [211]elect [198]7=[205]enu _[197]xit"
  223. 9015 return
  224. 9020 :
  225. 9100 gosub9600:poke646,tx
  226. 9105 poke214,21:print:print"[197]nter: ";
  227. 9110 sysad+9,9,0,32,1
  228. 9115 gosub9000:return
  229. 9120 :
  230. 9200 sysad+3,3
  231. 9205 sysad+18,6,7,25,3,10,1
  232. 9210 sysad+21,"[201]nvalid [196]rive",9,10,1
  233. 9215 fort=1to1500:next
  234. 9220 sysad+6,3:return
  235. 9300 gosub9600:poke646,tx
  236. 9305 poke214,21:print:print"[197]nter [217]ear: ";
  237. 9310 sysad+9,4,0,32,1
  238. 9315 return
  239. 9320 :
  240. 9400 gosub9600:poke646,tx
  241. 9405 poke214,21:print:print"[208]rinter [210]eady? ";
  242. 9410 sysad+9,1,1,32,1
  243. 9415 return
  244. 9420 :
  245. 9500 fori=1to44
  246. 9505 m1$(i)=left$(m1$(i),27):d$(i)=right$(sp$+d$(i),10)
  247. 9510 m1$(i)=m1$(i)+d$(i):next
  248. 9515 return
  249. 9520 :
  250. 9600 fori=217to242:pokei,peek(i)or128:next
  251. 9602 poke781,22:sys59903
  252. 9603 poke781,23:sys59903
  253. 9605 return
  254. 9610 :
  255. 10000 open15,8,15,"s0:schc":close15:save"0:schc",8:end
  256. 10998 :
  257. 11099 rem menu1
  258. 11100 data 44
  259. 11101 data " 1.  [199]ross receipts/sales           0"
  260. 11102 data " 2.  [210]eturns/allowances             0"
  261. 11103 data " 3.  [204]ine 1 - line 2                0"
  262. 11104 data " 4.  [204]ine 40                        0"
  263. 11105 data " 5.  [199][210][207][211][211] [208][210][207][198][201][212]                   0"
  264. 11106 data " 6.  [207]ther income                   0"
  265. 11107 data " 7.  [199][210][207][211][211][160][201][206][195][207][205][197]                   0"
  266. 11201 data " 8.  [193]dvertising                    0"
  267. 11202 data " 9.  [194]ad debts                      0"
  268. 11203 data "10.  [195]ar/truck expenses             0"
  269. 11204 data "11.  [195]ommission/fees                0"
  270. 11205 data "12.  [196]epletion                      0"
  271. 11206 data "13.  [196]epreciation                   0"
  272. 11207 data "14.  [197]mployee benefit prg.          0"
  273. 11208 data "15.  [201]nsurance                      0"
  274. 11301 data "16a. [205]ortgage interest              0"
  275. 11302 data "16b. [207]ther interest                 0"
  276. 11303 data "17.  [204]egal/prof. services           0"
  277. 11304 data "18.  [207]ffice expense                 0"
  278. 11305 data "19.  [208]ension/profit sharing         0"
  279. 11306 data "20a. [210]ent for vehicles              0"
  280. 11307 data "20b. [210]ent for other                 0"
  281. 11308 data "21.  [210]epairs/maintenance            0"
  282. 11401 data "22.  [211]upplies                       0"
  283. 11402 data "23.  [212]axes/licenses                 0"
  284. 11403 data "24a. [212]ravel                         0"
  285. 11404 data "24b. [205]eals/entertainment            0"
  286. 11405 data "24c. 50% of line 24b                0"
  287. 11406 data "24d. [204]ine 24b - line 24c            0"
  288. 11407 data "25.  [213]tilities                      0"
  289. 11408 data "26.  [215]ages                          0"
  290. 11409 data "27.  [207]ther expenses                 0"
  291. 11501 data "28.  [212][207][212][193][204] [197][216][208][197][206][211][197][211]                 0"
  292. 11502 data "29.  [212]entative profit/loss          0"
  293. 11503 data "30.  [200]ome expenses                  0"
  294. 11504 data "31.  [206][197][212] [208][210][207][198][201][212] ([204][207][211][211])              0"
  295. 11601 data "33.  [201]nventory at beginning         0"
  296. 11602 data "34.  [208]urchases less cost            0"
  297. 11603 data "35.  [195]ost of labor                  0"
  298. 11604 data "36.  [205]aterials/supplies             0"
  299. 11605 data "37.  [207]ther costs                    0"
  300. 11606 data "38.  [193]dd lines 33 - 37              0"
  301. 11607 data "39.  [201]nventory at end               0"
  302. 11608 data "40.  [195][207][211][212] of goods sold             0"
  303. 19999 :
  304. 20000 rem menu2
  305. 20005 data 6
  306. 20010 data "[218]ero [193]cc.         "
  307. 20015 data "[193]dd to [193]cc.       "
  308. 20020 data "[211]ubtract from [193]cc."
  309. 20025 data "[205]ultiply [193]cc.     "
  310. 20030 data "[196]ivide [193]cc.       "
  311. 20035 data "[197]xit              "
  312. 21000 data 44
  313. 21050 data 0,0,1,1,1,0,1,0,0,0
  314. 21100 data 0,0,0,0,0,0,0,0,0,0
  315. 21150 data 0,0,0,0,0,0,0,0,1,0
  316. 21200 data 0,0,1,1,0,1,0,0,0,0
  317. 21210 data 0,1,0,1
  318.