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

  1. 0 dv=peek(186):ifdv<8thendv=8
  2. 1 ifa=0thena=1:load"help-1040",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$(62):fori=0to62:d$(i)="0":next:d$(1)="1":d$(2)="1"
  8. 8 dimma$(20)
  9. 10 poke53280,0:poke53281,0:ad=36864
  10. 20 readx:fori=1tox:readm0$(i):next
  11. 21 readx:fori=1tox:readm1$(i):next
  12. 22 readx:fori=1tox:readm2$(i):next
  13. 23 readx:fori=1tox:readma$(i):next
  14. 24 readx:fori=1tox:readm3$(i):next
  15. 25 readx:fori=1tox:readm4$(i):next
  16. 26 readx:fori=1tox:readm5$(i):next
  17. 27 readx:fori=1tox:readm6$(i):next
  18. 28 readx:fori=1tox:readm7$(i):next
  19. 29 readx:fori=1tox:readm8$(i):next
  20. 30 readx:fori=1tox:readm9$(i):next
  21. 31 dimfs$(5):fori=1to5:readfs$(i):next:fs=2
  22. 32 dimsd$(5):fori=1to5:readsd$(i):next:d$(31)=sd$(fs)
  23. 33 print"";
  24. 40 sysad,"[212][160][193][160][216][160] [160][193] [195][160][195] [207] [213] [206] [212][160][193][160][206] [212]","1040"
  25. 50 ifpeek(198)<>1thenend
  26. 55 sysad+15:getdv$:getme$:gethi$:gettx$
  27. 56 dv=asc(dv$):m=asc(me$)and15:h=asc(hi$)and15:tx=asc(tx$)and15
  28. 60 sysad+18:poke198,0:gosub9000
  29. 70 sysad+3,14+64,11,7,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),m0$(12),m0$(13),m0$(14)
  30. 80 getk$:k$=str$(asc(k$)-48):k=val(k$)
  31. 85 ifk>3thensysad+18:poke781,21:sys59903
  32. 90 onkgoto 200,300,900,1070,2070,2570,3070,4070,5070,6070,7070,8070,700,40
  33. 95 goto70
  34. 100 :
  35. 200 gosub9300
  36. 210 ifval(w$)=0then275
  37. 220 open15,dv,15,"io":w$="1040."+w$
  38. 225 open2,dv,2,"0:"+w$+",s,r"
  39. 230 input#15,e,e$,e1,e2
  40. 234 poke214,21:print:print"                                    "
  41. 235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
  42. 236 poke214,21:print:print"                                    "
  43. 240 ifethenclose2:close15:print"[145][198]ile [206]ot [204]oaded":fori=1to2000:next:goto275
  44. 250 fori=0to62:input#2,d$(i):next
  45. 260 input#2,fs:input#2,m1$(1)
  46. 270 close2:close15
  47. 275 gosub9000:goto70
  48. 280 :
  49. 300 gosub9300:ifval(w$)=0then375
  50. 310 w$="1040."+w$
  51. 320 open15,dv,15,"s0:"+w$:close15
  52. 330 open15,dv,15,"io"
  53. 335 open2,dv,2,"0:"+w$+",s,w"
  54. 340 input#15,e,e$,e1,e2
  55. 344 poke214,21:print:print"                                    "
  56. 345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
  57. 346 poke214,21:print:print"                                    "
  58. 350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
  59. 360 fori=0to62:print#2,d$(i):next
  60. 365 print#2,fs:print#2,m1$(1)
  61. 370 close2:close15
  62. 375 gosub9000:goto70
  63. 390 :
  64. 400 d$(4)=str$(val(d$(1))+val(d$(2))+val(d$(3)))
  65. 405 tl=0:fori=5to20:tl=tl+val(d$(i)):next:d$(21)=str$(tl)
  66. 410 tl=0:fori=22to28:tl=tl+val(d$(i)):next:d$(29)=str$(tl)
  67. 415 d$(30)=str$(val(d$(21))-val(d$(29)))
  68. 420 d$(32)=str$(val(d$(30))-val(d$(31)))
  69. 422 d$(33)=str$(int(val(d$(4))*2150+.5))
  70. 423 ifval(d$(30))>75000thengosub16000
  71. 425 d$(34)=str$(val(d$(32))-val(d$(33)))
  72. 427 gosub15000
  73. 430 d$(37)=str$(val(d$(35))+val(d$(36)))
  74. 435 tl=0:fori=38to41:tl=tl+val(d$(i)):next:d$(42)=str$(tl)
  75. 440 d$(43)=str$(val(d$(37))-val(d$(42))):ifval(d$(43))<0thend$(43)="0"
  76. 445 tl=0:fori=43to49:tl=tl+val(d$(i)):next:d$(50)=str$(tl)
  77. 450 tl=0:fori=51to56:tl=tl+val(d$(i)):next:d$(57)=str$(tl)
  78. 460 x1=val(d$(57)):x2=val(d$(50)):ifx1>x2then470
  79. 461 d$(59)="0":d$(60)="0"
  80. 465 d$(61)=str$((x2-x1)+val(d$(62))):d$(58)="0":return
  81. 470 d$(58)=str$(x1-x2):d$(61)="0"
  82. 475 return
  83. 480 :
  84. 500 sysad+6,2:sysad+9,1
  85. 505 sys50176,1,3,38,20,tx,0
  86. 510 ky=peek(197)
  87. 515 ifky=3thensys51712,1,3,38,20,7:goto505
  88. 520 ifky=6thenopen15,dv,15,"s0:"+n$:close15:sysad+12,n$,1:goto505
  89. 530 ifky=5then poke147,0:sys57812n$,dv,1:sys62631:sysad+9,1:goto505
  90. 550 sysad+6,1:sysad+9,2:return
  91. 560 :
  92. 600 sysad+6,2:poke646,tx:print"[147]"tab(14)"*** [200][197][204][208] ***"
  93. 601 poke646,m
  94. 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]";
  95. 603 fori=1to21:print"[221]                                      [221]";:next
  96. 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
  97. 605 print"              [208]ress [210][197][212][213][210][206]";:poke52346,tx
  98. 606 open2,dv,2,h$+",p,r":sys51968
  99. 610 poke198,0
  100. 615 getk$:ifk$<>chr$(13)then615
  101. 620 close2:sysad+9,2:return
  102. 625 :
  103. 700 poke646,tx
  104. 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]"
  105. 702 print"[221]             1040 [212]otals             [221]"
  106. 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]"
  107. 706 print"[221][197]xemptions (6e)                      [221]"
  108. 708 print"[221][201]ncome (23)                          [221]"
  109. 710 print"[221][193]djustments to [201]ncome (30)           [221]"
  110. 712 print"[221][193]djusted [199]ross [201]ncome (32)           [221]"
  111. 714 print"[221][212]axable [201]ncome (37)                  [221]"
  112. 716 print"[221][195]redits (45)                         [221]"
  113. 717 print"[221][212]ax after [195]redits (46)               [221]"
  114. 719 print"[221][212]otal [212]ax (53)                       [221]"
  115. 720 print"[221][208]ayments (60)                        [221]"
  116. 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]"
  117. 725 fori=217to242:pokei,peek(i)or128:next
  118. 726 gosub9200
  119. 730 print""
  120. 735 printtab(28)right$(sp$+d$(4),10)
  121. 740 printtab(28)right$(sp$+d$(21),10)
  122. 745 printtab(28)right$(sp$+d$(29),10)
  123. 750 printtab(28)right$(sp$+d$(30),10)
  124. 755 printtab(28)right$(sp$+d$(34),10)
  125. 757 printtab(28)right$(sp$+d$(42),10)
  126. 760 printtab(28)right$(sp$+d$(43),10)
  127. 762 printtab(28)right$(sp$+d$(50),10)
  128. 764 printtab(28)right$(sp$+d$(57),10)
  129. 775 getk$:ifk$<>chr$(13)then775
  130. 780 sysad+18:gosub9000:goto70
  131. 785 :
  132. 900 gosub9400:ifw$<>"y"thengosub9000:goto70
  133. 905 poke214,22:print:print"[208]rinting...      "
  134. 910 open4,4,7
  135. 915 print#4,sp$;"1040"
  136. 920 print#4,sp$;"------------------------------------"
  137. 922 fori=1to5:print#4,sp$;left$(m1$(i),27)+right$(sp$+d$(i-1),10):next:print#4
  138. 925 fori=1to9:print#4,sp$;left$(m2$(i),27)+right$(sp$+d$(i+4),10):next:print#4
  139. 927 fori=1to8:print#4,sp$;left$(ma$(i),27)+right$(sp$+d$(i+13),10):next:print#4
  140. 930 fori=1to8:print#4,sp$;left$(m3$(i),27)+right$(sp$+d$(i+21),10):next:print#4
  141. 935 fori=1to8:print#4,sp$;left$(m4$(i),27)+right$(sp$+d$(i+29),10):next:print#4
  142. 955 fori=1to6:print#4,sp$;left$(m5$(i),27)+right$(sp$+d$(i+37),10):next:print#4
  143. 960 fori=1to7:print#4,sp$;left$(m6$(i),27)+right$(sp$+d$(i+43),10):next:print#4
  144. 961 fori=1to10:print#4:next
  145. 965 fori=1to7:print#4,sp$;left$(m7$(i),27)+right$(sp$+d$(i+50),10):next:print#4
  146. 970 fori=1to5:print#4,sp$;left$(m8$(i),27)+right$(sp$+d$(i+57),10):next:print#4
  147. 990 print#4:close4:gosub9000:goto70
  148. 995 :
  149. 1000 sysad+3,9+64,1,8,m,h,tx,m1$(1),m1$(2),m1$(3),m1$(4),m1$(5),m1$(6),m1$(7),m1$(8),m1$(9)
  150. 1010 getk$:k$=str$(asc(k$)-48):k=val(k$)
  151. 1020 ifk=9thensysad+18:goto70
  152. 1025 ifk=8thenh$="1040.h1":gosub600:goto1000
  153. 1030 ifk=6thenn$="1040.n1":gosub500:goto1000
  154. 1035 ifk=7thengosub9500:goto1000
  155. 1045 ifk=5then1000
  156. 1047 ifk=1thengosub1500:gosub16000:goto1067
  157. 1048 ifk<4then1000
  158. 1050 gosub9100:iflen(w$)=0then1000
  159. 1055 d$(k-1)=w$
  160. 1067 gosub400
  161. 1070 fori=2to5:m1$(i)=left$(m1$(i),27)+right$(sp$+d$(i-1),10):next
  162. 1075 goto1000
  163. 1080 :
  164. 1500 fs=fs+1:iffs=6thenfs=1
  165. 1505 m1$(1)=fs$(fs):d$(31)=sd$(fs)
  166. 1506 d$(2)="0":iffs=2thend$(2)="1"
  167. 1520 return
  168. 2000 sysad+3,13+64,1,7,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),m2$(13)
  169. 2010 getk$:k$=str$(asc(k$)-48):k=val(k$)
  170. 2020 ifk=13thensysad+18:goto70
  171. 2025 ifk=12thenh$="1040.h2":gosub600:goto2000
  172. 2030 ifk=10thenn$="1040.n2":gosub500:goto2000
  173. 2035 ifk=11thengosub9500:goto2000
  174. 2050 gosub9100: