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