home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 129 / 129.d81 / 1040 (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  15KB  |  488 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$="          ":max=62
  8. 7 dim m1$(max),m2$(20),d$(max),ch(max):fl=0:f1=0:fs=2
  9. 8 fori=0tomax:d$(i)="0":next:d$(1)="1":d$(2)="1"
  10. 10 poke53280,0:poke53281,0:ad=49152
  11. 21 fori=1tomax:readm1$(i):next
  12. 22 fori=1to6:readm2$(i):next
  13. 25 fori=1tomax: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]: 1040",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=62: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=1ork=11ork=12then52
  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. 136 ifr+v=31then4000
  37. 140 gosub9100:iflen(w$)=0then62
  38. 145 ww=val(w$):w$=str$(ww):d$(r+v)=w$
  39. 150 ifr+v=2thenifval(w$)>1thend$(2)="1"
  40. 151 ifval(d$(60))>val(d$(58))thend$(60)=d$(58):d$(60)="0":goto187
  41. 152 d$(59)=str$(val(d$(58))-val(d$(60)))
  42. 186 remgosub9500
  43. 187 m1$(r+v)=left$(m1$(r+v),27):d$(r+v)=right$(sp$+d$(r+v),10)
  44. 188 m1$(r+v)=m1$(r+v)+d$(r+v)
  45. 190 goto92
  46. 191 :
  47. 200 gosub9300
  48. 210 ifval(w$)=0thenclose2:close15:gosub9000:return
  49. 220 open15,dv,15,"io":w$="1040."+w$
  50. 225 open2,dv,2,"0:"+w$+",s,r"
  51. 230 input#15,e,e$,e1,e2
  52. 234 poke214,21:print:print"                                    "
  53. 235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
  54. 236 poke214,21:print:print"                                    "
  55. 240 ifethenclose2:close15:gosub9000:return
  56. 250 fori=0to62:input#2,d$(i):next
  57. 270 close2:close15
  58. 275 gosub9000:gosub9500:return
  59. 280 :
  60. 300 gosub9300:ifval(w$)=0then375
  61. 310 w$="1040."+w$:d$(0)=d$(36)
  62. 320 open15,dv,15,"s0:"+w$:close15
  63. 330 open15,dv,15,"io"
  64. 335 open2,dv,2,"0:"+w$+",s,w"
  65. 340 input#15,e,e$,e1,e2
  66. 344 poke214,21:print:print"                                    "
  67. 345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
  68. 346 poke214,21:print:print"                                    "
  69. 350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
  70. 355 d$(0)=d$(30)
  71. 360 fori=0to62:print#2,d$(i):next
  72. 370 close2:close15
  73. 375 gosub9000:return
  74. 390 :
  75. 400 sysad+3,0:gosub9600
  76. 401 poke214,21:print:print"[195]alculating..."
  77. 402 d$(4)=str$(val(d$(1))+val(d$(2))+val(d$(3)))
  78. 405 tl=0:fori=5to19:tl=tl+val(d$(i)):next:d$(20)=str$(tl)
  79. 410 tl=0:fori=21to28:tl=tl+val(d$(i)):next:d$(29)=str$(tl)
  80. 415 d$(30)=str$(val(d$(20))-val(d$(29)))
  81. 420 d$(32)=str$(val(d$(30))-val(d$(31)))
  82. 422 d$(33)=str$(int(val(d$(4))*2450+.5))
  83. 423 ifval(d$(30))>83850thengosub16000
  84. 425 d$(34)=str$(val(d$(32))-val(d$(33)))
  85. 426 ifval(d$(34))<0thend$(34)="0"
  86. 427 gosub15000
  87. 430 d$(37)=str$(val(d$(35))+val(d$(36)))
  88. 435 tl=0:fori=38to41:tl=tl+val(d$(i)):next:d$(42)=str$(tl)
  89. 440 d$(43)=str$(val(d$(37))-val(d$(42))):ifval(d$(43))<0thend$(43)="0"
  90. 445 tl=0:fori=43to49:tl=tl+val(d$(i)):next:d$(50)=str$(tl)
  91. 450 tl=0:fori=51to56:tl=tl+val(d$(i)):next:d$(57)=str$(tl)
  92. 460 x1=val(d$(57)):x2=val(d$(50)):ifx1>x2then470
  93. 461 d$(59)="0":d$(60)="0"
  94. 465 d$(61)=str$((x2-x1)+val(d$(62))):d$(58)="0":gosub9500:return
  95. 470 d$(58)=str$(x1-x2):d$(61)="0"
  96. 471 d$(59)=str$(val(d$(58))-val(d$(60)))
  97. 475 gosub9500:return
  98. 480 :
  99. 500 poke781,23:sys59903
  100. 501 poke214,21:print:print"   [198]1=[204]oad  [198]3=[211]ave  [198]5=[208]rint  [198]7=[197]xit  "
  101. 502 sysad+15,1,2,38,20,32,14:n$="1040.n"
  102. 505 sys51456,1,2,38,20,3,0
  103. 510 ky=peek(197)
  104. 515 ifky=6thensysad+3,3:gosub9400:sysad+6,3:ifw$="y"thensysad+27,1,2,38,20,7
  105. 520 ifky=5thenopen15,dv,15,"s0:"+n$:close15:sys57812n$,dv
  106. 525 ifky=5thenpoke193,0:poke194,4:poke174,0:poke175,8:sys62954:goto505
  107. 530 ifky=4thensys57812n$,dv,1:poke780,0:sys65493:goto505:rem load
  108. 550 ifky=3thenreturn
  109. 555 goto505
  110. 560 :
  111. 600 sysad+3,1:print"[147]"tab(14)"[150]*** [200][197][204][208] ***"
  112. 601 sysad+18,0,1,38,21,1,0
  113. 602 h$="t.1040 help":sysad+33
  114. 605 sysad+21,"[208]ress [210][197][212][213][210][206]     _ to [197]xit",24,13,0
  115. 606 open2,dv,2,h$+",p,r":sysad+30,14
  116. 610 poke198,0
  117. 611 sysad+21,"       [208]ress [210][197][212][213][210][206]       ",24,10,0
  118. 615 getk$:ifk$<>chr$(13)then615
  119. 620 poke198,0:close2:sysad+6,1:return
  120. 625 :
  121. 800 r=r-1:ifr<>0thenreturn
  122. 805 r=1:gosub875
  123. 806 v=v-1:ifv=-1thenv=0:return
  124. 807 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v+1)+sp$,w)
  125. 808 sys36864,x+1,x+w,y+1,y+max,1
  126. 810 return
  127. 815 :
  128. 850 r=r+1:ifr<=maxthenreturn
  129. 855 r=r-1:ifr>d then return
  130. 860 gosub875
  131. 861 v=v+1:ifv>d-maxthenv=v-1:return
  132. 862 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v-1)+sp$,w)
  133. 863 sys36864,x+1,x+w,y+1,y+max,0
  134. 865 return
  135. 870 :
  136. 875 poke646,tx:poke214,r1+y-1:print:printtab(x+1)left$(m1$(r1+v)+sp$,w)
  137. 880 poke646,tx:poke214,r+y-1:print:printtab(x+1)left$(m1$(r+v)+sp$,w)
  138. 885 return
  139. 890 :
  140. 900 gosub9400:ifw$<>"y"thengosub9000:return
  141. 905 poke214,21:print:print"[208]rinting...       ";
  142. 910 open4,4,7
  143. 912 print#4:print#4
  144. 915 print#4,sp$"1040"
  145. 920 print#4,sp$"-------------------------------------"
  146. 925 fori=1to4:print#4,sp$;m1$(i):next:print#4
  147. 926 fori=5to20:print#4,sp$;m1$(i):next:print#4
  148. 927 fori=21to29:print#4,sp$;m1$(i):next:print#4
  149. 928 fori=30to37:print#4,sp$;m1$(i):next:print#4
  150. 929 fori=38to43:print#4,sp$;m1$(i):next:print#4
  151. 930 fori=44to50:print#4,sp$;m1$(i):next:print#4
  152. 931 fori = 1to12:print#4:next
  153. 932 fori=51to57:print#4,sp$;m1$(i):next:print#4
  154. 933 fori=58to62:print#4,sp$;m1$(i):next
  155. 935 print#4:close4:gosub9000:return
  156. 936 :
  157. 1000 sysad+3,2
  158. 1005 sysad+18,10,4,20,13,13,1
  159. 1010 poke214,4:print
  160. 1015 printtab(11)"[153][204]oad [198]ile"
  161. 1020 printtab(11)"[211]ave [198]ile"
  162. 1025 printtab(11)"[208]rint [198]ile"
  163. 1030 printtab(11)"[200]elp"
  164. 1035 printtab(11)"[195]alculator"
  165. 1036 printtab(11)"[206]otepad"
  166. 1040 printtab(11)"[196]irectory"
  167. 1045 printtab(11)"[196]isk [196]rive #"+str$(dv)
  168. 1050 printtab(11)"[212]otals"
  169. 1055 printtab(11)"[195]alculate [211]heet"
  170. 1057 printtab(11)"[201]mport [211]ch [195]"
  171. 1058 printtab(11)"[201]mport [211]ch [211][197]"
  172. 1059 printtab(11)"[197]xit"
  173. 1060 sysad+12,11,5,29,13,13,1
  174. 1065 k=peek(828)
  175. 1070 onkgosub200,300,900,600,5000,500,6000,6100,2000,400,3000,3000
  176. 1075 sysad+6,2:return
  177. 1080 :
  178. 2000 poke646,tx
  179. 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]";
  180. 2010 print"[221]             1040 [212]otals              [221]";
  181. 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]";
  182. 2020 print"[221][197]xemptions (6e)                       [221]";
  183. 2025 print"[221][201]ncome (22)                           [221]";
  184. 2030 print"[221][193]djustments to [201]ncome (30)            [221]";
  185. 2035 print"[221][193]djusted [199]ross [201]ncome (32)            [221]";
  186. 2040 print"[221][212]axable [201]ncome (37)                   [221]";
  187. 2045 print"[221][195]redits (45)                          [221]";
  188. 2050 print"[221][212]ax after [195]redits (46)                [221]";
  189. 2055 print"[221][212]otal [212]ax (53)                        [221]";
  190. 2060 print"[221][208]ayments (60)                         [221]";
  191. 2065 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]";
  192. 2070 fori=217to242:pokei,peek(i)or128:next
  193. 2075 remgosub9200
  194. 2080 print""
  195. 2