home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 104
/
104.d81
/
1040
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
14KB
|
470 lines
0 w$="":dv=peek(186):ifdv<8thendv=8
1 ifa=0thena=1:load"scroll 9000",dv,1
2 remifa=1thena=2:load"notepad c900",dv,1
3 remifa=2thena=3:load"tool box c000",dv,1
4 poke55,0:poke56,144:clr
5 w$="":dv=peek(186):ifdv<8thendv=8
6 poke198,0:sp$=" ":max=62
7 dim m1$(max),m2$(20),d$(max),ch(max):fl=0:f1=0:fs=2
8 fori=0tomax:d$(i)="0":next:d$(1)="1":d$(2)="1"
10 poke53280,0:poke53281,0:ad=49152
21 fori=1tomax:readm1$(i):next
22 fori=1to6:readm2$(i):next
25 fori=1tomax:readch(i):next
30 print"[147]";:gosub9500
40 sysad+21,"[212][193][216] [193][195][195][207][213][206][212][193][206][212]: 1040",0,10,0
43 sysad+18,0,1,38,19,7,0:sysad+15,1,2,38,20,160,14
46 gosub9000:gosub9500
50 x=0:y=1:d=62:w=38:tx=14:hi=1:bx=4:ex$=chr$(133):max=19:v=0
52 fori=217to242:pokei,peek(i)or128:next
54 poke214,y-1:print:print:poke646,tx
56 fori=1tomax:printtab(x+1)""left$(m1$(i+v)+sp$,w):next:r=1
57 hi=1:ifch(r+v)=1thenhi=10
58 r=1:r1=1:poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v)+sp$,w)
62 getk$:ifk$=""then62
66 ifk$=chr$(13)then135
68 ifk$="[145]"thengosub800
70 ifk$=""thengosub850
79 ifk$="[136]"thengosub1000:ifk=10ork=1ork=11ork=12then52
88 ifk$="_"thengosub7000:rem exit
92 poke646,tx:poke214,r1+y-1:print:printtab(x+1)""left$(m1$(r1+v)+sp$,w)
93 hi=1:ifch(r+v)=1thenhi=10
94 poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v)+sp$,w)
96 r1=r:goto62
98 :
135 ifch(r+v)=1then62
136 ifr+v=31then4000
140 gosub9100:iflen(w$)=0then62
145 ww=val(w$):w$=str$(ww):d$(r+v)=w$
150 ifr+v=2thenifval(w$)>1thend$(2)="1"
151 ifval(d$(60))>val(d$(58))thend$(60)=d$(58):d$(60)="0":goto187
152 d$(59)=str$(val(d$(58))-val(d$(60)))
186 remgosub9500
187 m1$(r+v)=left$(m1$(r+v),27):d$(r+v)=right$(sp$+d$(r+v),10)
188 m1$(r+v)=m1$(r+v)+d$(r+v)
190 goto92
191 :
200 gosub9300
210 ifval(w$)=0thenclose2:close15:gosub9000:return
220 open15,dv,15,"io":w$="1040."+w$
225 open2,dv,2,"0:"+w$+",s,r"
230 input#15,e,e$,e1,e2
234 poke214,21:print:print" "
235 poke214,21:print:print"[196]isk [211]tatus:"e;e$:fori=1to2000:next
236 poke214,21:print:print" "
240 ifethenclose2:close15:gosub9000:return
250 fori=0to62:input#2,d$(i):next
270 close2:close15
275 gosub9000:gosub9500:return
280 :
300 gosub9300:ifval(w$)=0then375
310 w$="1040."+w$:d$(0)=d$(36)
320 open15,dv,15,"s0:"+w$:close15
330 open15,dv,15,"io"
335 open2,8,2,"0:"+w$+",s,w"
340 input#15,e,e$,e1,e2
344 poke214,21:print:print" "
345 poke214,21:print:print"[196]isk [211]tatus: "e;e$:fori=1to2000:next
346 poke214,21:print:print" "
350 ifethenclose2:close15:print"[145][198]ile [206]ot [211]aved":fori=1to2000:next:goto375
355 d$(0)=d$(30)
360 fori=0to62:print#2,d$(i):next
370 close2:close15
375 gosub9000:return
390 :
400 sysad+3,0:gosub9600
401 poke214,21:print:print"[195]alculating..."
402 d$(4)=str$(val(d$(1))+val(d$(2))+val(d$(3)))
405 tl=0:fori=5to20:tl=tl+val(d$(i)):next:d$(21)=str$(tl)
410 tl=0:fori=22to28:tl=tl+val(d$(i)):next:d$(29)=str$(tl)
415 d$(30)=str$(val(d$(21))-val(d$(29)))
420 d$(32)=str$(val(d$(30))-val(d$(31)))
422 d$(33)=str$(int(val(d$(4))*2300+.5))
423 ifval(d$(30))>78950thengosub16000
425 d$(34)=str$(val(d$(32))-val(d$(33)))
426 ifval(d$(34))<0thend$(34)="0"
427 gosub15000
430 d$(37)=str$(val(d$(35))+val(d$(36)))
435 tl=0:fori=38to41:tl=tl+val(d$(i)):next:d$(42)=str$(tl)
440 d$(43)=str$(val(d$(37))-val(d$(42))):ifval(d$(43))<0thend$(43)="0"
445 tl=0:fori=43to49:tl=tl+val(d$(i)):next:d$(50)=str$(tl)
450 tl=0:fori=51to56:tl=tl+val(d$(i)):next:d$(57)=str$(tl)
460 x1=val(d$(57)):x2=val(d$(50)):ifx1>x2then470
461 d$(59)="0":d$(60)="0"
465 d$(61)=str$((x2-x1)+val(d$(62))):d$(58)="0":gosub9500:return
470 d$(58)=str$(x1-x2):d$(61)="0"
471 d$(59)=str$(val(d$(58))-val(d$(60)))
475 gosub9500:return
480 :
500 poke781,23:sys59903
501 poke214,21:print:print" [198]1=[204]oad [198]3=[211]ave [198]5=[208]rint [198]7=[197]xit "
502 sysad+15,1,2,38,20,32,14:n$="1040.n"
505 sys51456,1,2,38,20,3,0
510 ky=peek(197)
515 ifky=6thensysad+3,3:gosub9400:sysad+6,3:ifw$="y"thensysad+27,1,2,38,20,7
520 ifky=5thenopen15,dv,15,"s0:"+n$:close15:sys57812n$,dv
525 ifky=5thenpoke193,0:poke194,4:poke174,0:poke175,8:sys62954:goto505
530 ifky=4then poke147,0:sys57812n$,dv,1:sys62631:goto505:rem load
550 ifky=3thenreturn
555 goto505
560 :
600 sysad+3,1:print"[147]"tab(14)"[150]*** [200][197][204][208] ***"
601 sysad+18,0,1,38,21,1,0
602 h$="t.1040 help":sysad+33
605 sysad+21,"[208]ress [210][197][212][213][210][206] _ to [197]xit",24,13,0
606 open2,dv,2,h$+",p,r":sysad+30,14
610 poke198,0
611 sysad+21," [208]ress [210][197][212][213][210][206] ",24,10,0
615 getk$:ifk$<>chr$(13)then615
620 poke198,0:close2:sysad+6,1:return
625 :
800 r=r-1:ifr<>0thenreturn
805 r=1:gosub875
806 v=v-1:ifv=-1thenv=0:return
807 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v+1)+sp$,w)
808 sys36864,x+1,x+w,y+1,y+max,1
810 return
815 :
850 r=r+1:ifr<=maxthenreturn
855 r=r-1:ifr>d then return
860 gosub875
861 v=v+1:ifv>d-maxthenv=v-1:return
862 poke646,tx:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v-1)+sp$,w)
863 sys36864,x+1,x+w,y+1,y+max,0
865 return
870 :
875 poke646,tx:poke214,r1+y-1:print:printtab(x+1)left$(m1$(r1+v)+sp$,w)
880 poke646,tx:poke214,r+y-1:print:printtab(x+1)left$(m1$(r+v)+sp$,w)
885 return
890 :
900 gosub9400:ifw$<>"y"thengosub9000:return
905 poke214,21:print:print"[208]rinting... ";
910 open4,4,7
912 print#4:print#4
915 print#4,sp$"1040"
920 print#4,sp$"-------------------------------------"
925 fori=1to4:print#4,sp$;m1$(i):next:print#4
926 fori=5to21:print#4,sp$;m1$(i):next:print#4
927 fori=22to29:print#4,sp$;m1$(i):next:print#4
928 fori=30to37:print#4,sp$;m1$(i):next:print#4
929 fori=38to43:print#4,sp$;m1$(i):next:print#4
930 fori=44to50:print#4,sp$;m1$(i):next:print#4
931 fori = 1to12:print#4:next
932 fori=51to57:print#4,sp$;m1$(i):next:print#4
933 fori=58to62:print#4,sp$;m1$(i):next
935 print#4:close4:gosub9000:return
936 :
1000 sysad+3,2
1005 sysad+18,10,4,20,13,13,1
1010 poke214,4:print
1015 printtab(11)"[153][204]oad [198]ile"
1020 printtab(11)"[211]ave [198]ile"
1025 printtab(11)"[208]rint [198]ile"
1030 printtab(11)"[200]elp"
1035 printtab(11)"[195]alculator"
1036 printtab(11)"[206]otepad"
1040 printtab(11)"[196]irectory"
1045 printtab(11)"[196]isk [196]rive #"+str$(dv)
1050 printtab(11)"[212]otals"
1055 printtab(11)"[195]alculate [211]heet"
1057 printtab(11)"[201]mport [211]ch [195]"
1058 printtab(11)"[201]mport [211]ch [211][197]"
1059 printtab(11)"[197]xit"
1060 sysad+12,11,5,29,13,13,1
1065 k=peek(828)
1070 onkgosub200,300,900,600,5000,500,6000,6100,2000,400,3000,3000
1075 sysad+6,2:return
1080 :
2000 poke646,tx
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]";
2010 print"[221] 1040 [212]otals [221]";
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]";
2020 print"[221][197]xemptions (6e) [221]";
2025 print"[221][201]ncome (23) [221]";
2030 print"[221][193]djustments to [201]ncome (30) [221]";
2035 print"[221][193]djusted [199]ross [201]ncome (32) [221]";
2040 print"[221][212]axable [201]ncome (37) [221]";
2045 print"[221][195]redits (45) [221]";
2050 print"[221][212]ax after [195]redits (46) [221]";
2055 print"[221][212]otal [212]ax (53) [221]";
2060 print"[221][208]ayments (60) [221]";
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]";
2070 fori=217to242:pokei,peek(i)or128:next
2075 remgosub9200
2080 print""
2