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

  1. 0 dv=peek(186):ifdv<8thendv=8
  2. 1 ifa=0thena=1:load"help-1040ez",dv,1
  3. 2 ifa=1thena=2:load"notepad",dv,1
  4. 3 poke198,0:sp$="          "
  5. 5 dim m0$(10),m1$(20),m2$(20),d$(9):fl=0:f1=0
  6. 6 fori=1to9:d$(i)="0":next:d$(4)="5550"
  7. 10 poke53280,0:poke53281,0:ad=36864
  8. 20 readx:fori=1tox:readm0$(i):next
  9. 21 readx:fori=1tox:readm1$(i):next
  10. 22 readx:fori=1tox:readm2$(i):next
  11. 30 print"";:gosub9500
  12. 40 sysad,"[212][160][193][160][216][160] [160][193] [195] [195] [207] [213] [206] [212][160][193][160][206] [212]","1040 [197][218]"
  13. 50 ifpeek(198)<>1thenend
  14. 55 sysad+15:getdv$:getme$:gethi$:gettx$
  15. 56 dv=asc(dv$):m=asc(me$)and15:h=asc(hi$)and15:tx=asc(tx$)and15
  16. 60 sysad+18:poke198,0:gosub9000
  17. 70 sysad+3,5+64,15,8,m+64,h,tx,m0$(1),m0$(2),m0$(3),m0$(4),m0$(5)
  18. 80 getk$:k$=str$(asc(k$)-48):k=val(k$)
  19. 85 onkgoto200,300,103,900,40
  20. 103 gosub9500
  21. 105 sysad+3,13+64,1,7,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),m1$(12),m1$(13)
  22. 110 getk$:k$=str$(asc(k$)-48):k=val(k$)
  23. 115 ifk=13thensysad+18:goto70
  24. 117 ifk=12thenh$="ez.h":gosub600:goto105
  25. 120 ifk=11then5000
  26. 130 ifk=10thenn$="ez.n":gosub500:goto105
  27. 135 ifk=3then105
  28. 136 ifk=5then105
  29. 146 ifk=4then800
  30. 147 ifk>6then105
  31. 150 gosub9100:d$(k)=w$
  32. 160 iflen(w$)=0then105
  33. 165 ifval(d$(2))>400thend$(2)="[211][212][207][208]":fori=5to9:d$(i)="0":next:goto186
  34. 170 d$(3)=str$(val(d$(1))+val(d$(2)))
  35. 175 d$(5)=str$(val(d$(3))-val(d$(4))):ifval(d$(5))<0thend$(5)="0"
  36. 176 ifval(d$(5))>50000thend$(5)="[211][212][207][208]"
  37. 177 gosub15000
  38. 180 ifval(d$(6))>=val(d$(7))thend$(8)=str$(val(d$(6))-val(d$(7))):d$(9)="0"
  39. 185 ifval(d$(7))>val(d$(6))thend$(9)=str$(val(d$(7))-val(d$(6))):d$(8)="0"
  40. 186 gosub9500
  41. 190 goto105
  42. 195 :
  43. 200 gosub9300
  44. 210 ifval(w$)=0thenclose2:close15:gosub9000:goto70
  45. 220 open15,8,15,"io":w$="ez."+w$
  46. 225 open2,8,2,"0:"+w$+",s,r"
  47. 230 input#15,e,e$,e1,e2
  48. 234 poke214,21:print:print"                                    "
  49. 235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
  50. 236 poke214,21:print:print"                                    "
  51. 240 ifethenclose2:close15:gosub9000:goto70
  52. 250 fori=1to9:input#2,d$(i):next
  53. 270 close2:close15
  54. 275 gosub9000:goto186
  55. 280 :
  56. 300 gosub9300:ifval(w$)=0then375
  57. 310 w$="ez."+w$
  58. 320 open15,8,15,"s0:"+w$:close15
  59. 330 open15,8,15,"io"
  60. 335 open2,8,2,"0:"+w$+",s,w"
  61. 340 input#15,e,e$,e1,e2
  62. 344 poke214,21:print:print"                                    "
  63. 345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
  64. 346 poke214,21:print:print"                                    "
  65. 350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
  66. 360 fori=1to9:print#2,d$(i):next
  67. 370 close2:close15
  68. 375 gosub9000:goto70
  69. 390 :
  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. 800 fl=not fl
  90. 805 iffl=0thenm1$(4)="4. [196]ependent-[206]o                ":d$(4)="5550":goto170
  91. 810 b=550:d=3400:c=b:e=d
  92. 815 ifb<val(d$(1))thenc=val(d$(1))
  93. 820 ifc<dthene=c
  94. 825 m1$(4)="4. [196]ependent-[217]es           ":d$(4)=str$(e):goto170
  95. 830 :
  96. 900 gosub9400:ifw$<>"y"thengosub9000:goto70
  97. 905 poke214,21:print: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]";
  98. 906 print"[221] [208]rinting...                          [221]";
  99. 910 open4,4,7
  100. 915 print#4,sp$"1040 [197][218]"
  101. 920 print#4,sp$"-------------------------------------"
  102. 925 fori=1to9:print#4,sp$;m1$(i):next
  103. 930 print#4:close4:gosub9000:goto70
  104. 935 :
  105. 5000 sysad+18:poke646,m
  106. 5001 print""tab(9)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  107. 5002 printtab(9)"[221]                  [221]"
  108. 5003 printtab(9)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  109. 5004 ac=0:ac$="0"
  110. 5005 ac$=right$(sp$+ac$,10):poke646,tx
  111. 5006 print""tab(17)ac$
  112. 5010 sysad+3,6+64,10,9,m+64,h,tx,m2$(1),m2$(2),m2$(3),m2$(4),m2$(5),m2$(6)
  113. 5020 getk$:k$=str$(asc(k$)-48):k=val(k$)
  114. 5025 ifk=6thensysad+18:goto103
  115. 5030 ifk=1thenac=0:goto5065
  116. 5035 gosub9100
  117. 5040 w=val(w$):ifw=0then5005
  118. 5045 ifk=2thenac=ac+w
  119. 5050 ifk=3thenac=ac-w
  120. 5055 ifk=4thenac=ac*w
  121. 5060 ifk=5thenac=ac/w
  122. 5065 ac$=str$(ac):goto5005
  123. 5070 :
  124. 9000 poke214,21:print: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]";
  125. 9005 print"[221]  [213]se [195]ursor [203]eys/[210][197][212][213][210][206] to select.   [221]";
  126. 9010 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]";:poke2023,125:poke56295,1
  127. 9015 return
  128. 9100 gosub9600:poke646,tx
  129. 9105 poke214,22:print:print"[197]nter: ";
  130. 9110 sys49152+3,tx,tx,9
  131. 9115 gosub9000:return
  132. 9120 :
  133. 9300 gosub9600:poke646,tx
  134. 9305 poke214,22:print:print"[197]nter [217]ear: ";
  135. 9310 sys49152+3,tx,tx,4
  136. 9315 return
  137. 9320 :
  138. 9400 gosub9600:poke646,tx
  139. 9405 poke214,22:print:print"[208]rinter [210]eady? ";
  140. 9410 sys49152,tx,tx,1
  141. 9415 return
  142. 9420 :
  143. 9500 fori=1to9
  144. 9505 m1$(i)=left$(m1$(i),27):d$(i)=right$(sp$+d$(i),10)
  145. 9510 m1$(i)=m1$(i)+d$(i):next
  146. 9515 return
  147. 9520 :
  148. 9600 fori=217to242:pokei,peek(i)or128:next
  149. 9602 poke214,22:print:print"                                   "
  150. 9605 return
  151. 9610 :
  152. 10000 open15,8,15,"s0:1040ez":close15:save"0:1040ez",8:end
  153. 10999 :
  154. 11000 rem menu0
  155. 11001 data 5,"[204]oad [198]ile "
  156. 11002 data "[211]ave [198]ile "
  157. 11003 data "[197]dit [198]ile "
  158. 11004 data "[208]rint [198]ile"
  159. 11005 data "[205]ain [205]enu "
  160. 11006 :
  161. 11099 rem menu1
  162. 11100 data 13
  163. 11101 data "1. [212]otal [215]ages/[211]alaries/[212]ips        0"
  164. 11102 data "2. [212]axable [201]nterest [201]ncome          0"
  165. 11103 data "3. [193]djusted [199]ross [201]ncome            0"
  166. 11104 data "4. [196]ependent-[206]o                     0"
  167. 11105 data "5. [212]axable [201]ncome                   0"
  168. 11106 data "6. [198]ederal [212]ax [215]ithheld             0"
  169. 11107 data "7. [193]pproximate [212][193][216]                  0"
  170. 11108 data "8. [210]efund                           0"
  171. 11109 data "9. [193]mount you owe                   0"
  172. 11110 data "[206]otepad                              "
  173. 11111 data "[195]alculator                           "
  174. 11112 data "[200]elp                                 "
  175. 11113 data "[205]ain [205]enu                            "
  176. 11114 :
  177. 11199 rem menu2
  178. 11200 data 6
  179. 11201 data "[218]ero [193]cc.         "
  180. 11202 data "[193]dd to [193]cc.       "
  181. 11203 data "[211]ubtract from [193]cc."
  182. 11204 data "[205]ultiply [193]cc.     "
  183. 11205 data "[196]ivide [193]cc.       "
  184. 11206 data "[197]xit              "
  185. 15000 ic=val(d$(5))
  186. 15005 ific<=20350thenta=int(ic*.15+.5):d$(7)=str$(ta):return
  187. 15010 ta=3052.5:t1=ic-20350
  188. 15015 ific<=49300 thenta=int(t1*.28+.5+ta):d$(7)=str$(ta):return
  189. 15020 ta=11158.5:t1=ic-49300:ta=int(ta+t1*.31+.5):return
  190. 15025 :
  191.