home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 104
/
104.d81
/
1040ez
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
249 lines
0 w$="":dv=peek(186):ifdv<8thendv=8
1 remifa=0thena=1:load"tool box c000",dv,1
2 remifa=1thena=2:load"notepad c900",dv,1
3 poke198,0:sp$=" ":max=9
5 dim m1$(20),m2$(20),d$(max):fl=0:f1=0
6 fori=1tomax:d$(i)="0":next:d$(4)="5900"
10 poke53280,0:poke53281,0:ad=49152
21 readx:fori=1tox:readm1$(i):next
22 readx:fori=1tox:readm2$(i):next
30 print"[147]";:gosub9500
40 sysad+21,"[212][193][216] [193][195][195][207][213][206][212][193][206][212]: 1040[197][218]",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=9:w=38:tx=14:hi=1:bx=4:ex$=chr$(133)
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)+sp$,w):next
58 r=1:r1=1:poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r)+sp$,w)
62 getk$:ifk$=""then62
66 ifk$=chr$(13)then135
68 ifk$="[145]"thengosub891
70 ifk$=""thengosub850
78 ifk$="[136]"thengosub1000:ifk=1then52
88 ifk$="_"thengosub7000:rem exit
92 poke646,tx:poke214,r1+y-1:print:printtab(x+1)""left$(m1$(r1+v)+sp$,w)
94 poke646,hi:poke214,r+y-1:print:printtab(x+1)""left$(m1$(r+v)+sp$,w)
96 r1=r:goto62
98 :
135 ifr=3then62
136 ifr=5then62
138 ifr=4thengosub800:goto170
140 gosub9100:iflen(w$)=0then62
141 ww=val(w$):w$=str$(ww)
145 d$(r)=w$
160 iflen(w$)=0then52
165 ifval(d$(2))>400thend$(2)="[211][212][207][208]":fori=5to9:d$(i)="0":next:goto186
170 d$(3)=str$(val(d$(1))+val(d$(2)))
171 ifflthengosub810
175 d$(5)=str$(val(d$(3))-val(d$(4))):ifval(d$(5))<0thend$(5)="0"
176 ifval(d$(5))>50000thend$(5)="[211][212][207][208]"
177 gosub15000
180 ifval(d$(6))>=val(d$(7))thend$(8)=str$(val(d$(6))-val(d$(7))):d$(9)="0"
185 ifval(d$(7))>val(d$(6))thend$(9)=str$(val(d$(7))-val(d$(6))):d$(8)="0"
186 gosub9500
190 goto52
195 :
200 gosub9300
210 ifval(w$)=0thenclose2:close15:gosub9000:return
220 open15,dv,15,"io":w$="ez."+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=1to9:input#2,d$(i):next
270 close2:close15
275 gosub9000:gosub9500:return
280 :
300 gosub9300:ifval(w$)=0then375
310 w$="ez."+w$
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
360 fori=1to9:print#2,d$(i):next
370 close2:close15
375 gosub9000:return
390 :
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$="ez.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=3thensysad+6,2:return
555 goto505
560 :
600 print"[147]"tab(14)"[150]*** [200][197][204][208] ***"
601 sysad+18,0,1,38,21,1,0
602 h$="t.ez 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:return
625 :
800 fl=not fl
805 iffl=0thenm1$(4)="4. [196]ependent-[206]o ":d$(4)="5900":return
810 b=600:d=3600:c=b:e=d
815 ifb<val(d$(1))thenc=val(d$(1))
820 ifc<dthene=c
825 m1$(4)="4. [196]ependent-[217]es ":d$(4)=str$(e):return
830 :
850 r=r+1:ifr<=6thenreturn
855 r=r-1:ifr<6then return
860 gosub875
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 :
891 r=r-1:ifr<>0thenreturn
892 r=1
893 gosub875
894 return
895 :
900 gosub9400:ifw$<>"y"thengosub9000:return
910 open4,4,7
915 print#4,sp$"1040[197][218]"
920 print#4,sp$"-------------------------------------"
925 fori=1to5:print#4,sp$;m1$(i):next:print#4
926 fori=6to7:print#4,sp$;m1$(i):next:print#4
927 fori=8to9:print#4,sp$;m1$(i):next:print#4
930 print#4:close4:gosub9000:return
935 :
1000 sysad+3,2
1005 sysad+18,10,5,20,9,13,1
1010 poke214,5: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)
1057 printtab(11)"[197]xit"
1060 sysad+12,11,6,29,9,13,1
1065 k=peek(828)
1070 onkgosub200,300,900,600,5000,500,6000,6100
1075 sysad+6,2:return
1080 :
5000 sysad+6,2:gosub9600
5001 sysad+18,11,5,18,1,5,0
5002 sysad+18,11,8,18,6,5,0:sysad+33:poke214,8:print
5003 fori=1to6:printtab(12)""m2$(i):next
5004 ac=0:ac$="0":sysad+3,1
5005 ac$=right$(sp$+ac$,10):poke646,tx
5006 sysad+6,1:print""tab(19)ac$
5010 sysad+12,12,9,29,6,1,10
5020 k=peek(828)
5025 ifk=6thensysad+6,2:return
5030 ifk=1thenac=0:goto5065
5035 gosub9100
5040 p=val(w$):ifp=0then5005
5045 ifk=2thenac=ac+p
5050 ifk=3thenac=ac-p
5055 ifk=4thenac=ac*p
5060 ifk=5thenac=ac/p
5065 ac$=str$(ac):goto5005
5070 :
6000 print"[147][154]"
6005 sysad,dv
6007 sysad+21,"[208]ress [210][197][212][213][210][206]",24,10,0
6008 getk$:ifk$<>chr$(13)then6008
6015 :return
6020 :
6100 gosub9600:poke646,tx
6105 poke214,21:print:print"[197]nter [196]rive: ";
6110 sysad+9,2,0,32,1
6111 ifval(w$)<8orval(w$)>16then6115
6112 ww=val(w$):open1,ww,1:close1
6113 ifst=0thendv=ww
6114 ifst<>0thengosub9200
6115 gosub9000:return
6120 :
7000 gosub9600:poke646,tx
7005 poke214,21:print:print"[209]uit? [193]re [217]ou [211]ure? ";
7010 sysad+9,1,1,32,1
7015 ifw$<>"y"thengosub9000:return
7020 open15,dv,15,"r0:tax boot=tax boot":input#15,er%:close15
7025 ifer%<>63thenend
7030 poke646,peek(53281)
7035 print"[147]load"chr$(34)"tax boot"chr$(34)","dv
7040 print"run"
7045 poke631,13:poke632,13:poke633,13:poke198,3:end
9000 sysad+33
9001 poke214,21:print:print"[153][195][210][211][210] [203]eys/[210][197][212][213][210][206] to [211]elect [198]7=[205]enu _[197]xit"
9015 return
9020 :
9100 gosub9600:poke646,tx
9105 poke214,21:print:print"[197]nter: ";
9110 sysad+9,9,0,32,1
9115 gosub9000:return
9120 :
9200 sysad+3,3
9205 sysad+18,6,7,25,3,10,1
9210 sysad+21,"[201]nvalid [196]rive",9,10,1
9215 fort=1to1500:next
9220 sysad+6,3:return
9300 gosub9600:poke646,tx
9305 poke214,21:print:print"[197]nter [217]ear: ";
9310 sysad+9,4,0,32,1
9315 return
9320 :
9400 gosub9600:poke646,tx
9405 poke214,21:print:print"[208]rinter [210]eady? ";
9410 sysad+9,1,1,32,1
9415 return
9420 :
9500 fori=1to9
9505 m1$(i)=left$(m1$(i),27):d$(i)=right$(sp$+d$(i),10)
9510 m1$(i)=m1$(i)+d$(i):next
9515 return
9520 :
9600 fori=217to242:pokei,peek(i)or128:next
9602 poke781,22:sys59903
9603 poke781,23:sys59903
9605 return
9610 :
10000 open15,8,15,"s0:1040ez":close15:save"0:1040ez",8:end
10999 :
11099 rem menu1
11100 data 9
11101 data "1. [212]otal [215]ages/[211]alaries/[212]ips 0"
11102 data "2. [212]axable [201]nterest [201]ncome 0"
11103 data "3. [193]djusted [199]ross [201]ncome 0"
11104 data "4. [196]ependent-[206]o 0"
11105 data "5. [212]axable [201]ncome 0"
11106 data "6. [198]ederal [212]ax [215]ithheld 0"
11107 data "7. [193]pproximate [212][193][216] 0"
11108 data "8. [210]efund 0"
11109 data "9. [193]mount you owe 0"
11114 :
11199 rem menu2
11200 data 6
11201 data "[218]ero [193]cc. "
11202 data "[193]dd to [193]cc. "
11203 data "[211]ubtract from [193]cc."
11204 data "[205]ultiply [193]c