home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 66
/
066.d81
/
inv.main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
32KB
|
966 lines
0 gosub60000:goto60100: ** program by ** maurice randall, submitted to loadstar
1 xt=0:forl=0tolg
2 if(peek(fs+l)and31)=0then10
3 if(peek(fs+l)<48)or(peek(fs+l)>57)then10
4 nextl
5 forl=lgto0step-1:xt=xt+(peek(fs+l)-48)*10^(lg-l):next
6 ifxt=0thenxt$="0":goto8
7 xt$=mid$(str$(xt),2)
8 iflen(xt$)=lg+1thenreturn
9 forl=len(xt$)tolg:xt$="0"+xt$:nextl:return
10 gosub3850
11 forl=0tolg:pokefs+l,32:next:goto102
12 ifcc=1thencc=0:return
13 syswi,11,0,24,27,.,2,0,0:return
14 gosub3850:forl=1to5:gosub34:co=1:gosub51:next:goto108
15 gosub3850:forlk=1to10:syswi,13,29,17,39,.,4,1,0:fordl=1to10:next
16 syswi,13,29,17,39,.,4,9,0:fordl=1to10:next:next:return
17 gosub3850:forlk=1to10:syswi,19,29,23,39,.,4,1,0:fordl=1to10:next
18 syswi,19,29,23,39,.,4,9,0:fordl=1to10:next:next:return
19 gosub3850:forlk=1to10:gosub56:print" "
20 gosub290:next:return
21 gosub3850:forlk=1to7:syswi,7,29,11,39,.,4,1,0:syswi,13,29,17,39,.,4,1,0
22 fordl=1to10:next:syswi,7,29,11,39,.,4,9,0:syswi,13,29,17,39,.,4,9,0
23 next:return
24 syswi,5,1,9,26,.,16,0,0,1:syswi,12,7,16,26,.,16,0,0,15
25 syswi,19,7,23,26,.,16,0,0,1:return
26 poke214,18:print:printspc(7);:return
27 poke646,1:gosub26:printq$:printspc(7)p$:printspc(7)d$
28 printspc(7)pr$:printspc(7)x$:return
34 syswi,fr,fc,tr,tc,.,4,9,0:wait203,64:return:::::::::::::::
37 poke253,160:poke254,170:return
38 syswi,4,0,24,27,.,2,0,0:syswi,4,0,10,27,.,4,2,0:syswi,5,1,9,26,.,16,0,0,1
39 return
40 print"[157]";:ll=11-le:forl=1toll+1:print" ";:nextl
41 forl=1toll+1:print"[157]";:nextl:return
42 q=45 :n=45.34 :ifq=0orn=0thenex=0:ex$=" 0.00":goto44
43 ex=q*n* 1:ex=ex+.005:ex$=str$(ex):ifex<=0thenex=ex-.01:ex$=str$(ex)
44 xx=n:gosub60:n$=xx$
45 forf=1to8:ifmid$(ex$,f,1)="."thenex$=left$(ex$,f+2):ex(g)=val(ex$)
46 nextf:onpeek(1003)goto48,49
47 onpeek(1671)and1goto49
48 nt=nt+ex(g):poke214,255:print:printspc(28)n$:printspc(228)ex$:return
49 tx=tx+ex(g):poke214,255:print:printspc(28)n$:printspc(228)ex$:return
50 aa=peek(631)-132:fr=(aa-1)*6+1:fc=29:tr=fr+4:tc=39:fu=4:co=1:ad=.:rv=1
51 syswi,fr,fc,tr,tc,ad,fu,co,rv:wait203,64:return:::
52 tx= 1 :nt= 0 :
53 poke253,182:poke254,148
54 forl=1topeek(38048):sys53037:ex(l)= 1.00:nextl:return
55 poke214,0:print:return
56 poke214,14:print:return
57 poke198,0:wait198,1:poke995,0:ifpeek(631)<133orpeek(631)>136thenpoke995,1
58 return
59 r1=11:r2=11:c1=18:c2=20:gosub65:return
60 xx$=str$(abs(xx)+.0005):xx$=str$(val(xx$)*(1-((xx<0)*-2)))
61 forl=1to10:ifmid$(xx$,l,1)="."thenxx$=left$(xx$,l+2)
62 nextl:ifxx=0thenxx$=" .00"
63 return
64 poke251,200:poke252,4:return:
65 poke1013,rt:poke1014,r1:poke1015,r2:poke1016,c1:poke1017,c2:return
66 poke253,64:poke254,181:return
67 syswi,fr,fc,tr,tc,ad,fu,co,rv:return
68 poke253,0:poke254,160:return
75 ifpeek(sa)=32thened=0:return
76 forl=satoea:ifint((peek(l)-48)/10)<>0then79
77 ifl=sa+2orl=sa+5thened=1:return
78 nextl:goto82
79 ifl=sa+2andpeek(l)=47thennextl
80 ifl=sa+5andpeek(l)=47thennextl
81 ed=1:return
82 mh=(val(chr$(peek(sa))))*10+(val(chr$(peek(sa+1))))
83 ifmh>12ormh<1thened=2:return
84 dt=(val(chr$(peek(sa+3))))*10+(val(chr$(peek(sa+4))))
85 yr=(val(chr$(peek(sa+6))))*10+(val(chr$(peek(sa+7))))
86 ifmh=2andyr/4-(int(yr/4))=0thenmd=29:goto90
87 ifmh=2thenmd=28:goto90
88 md=(int((mh+2)/10)+1+mh)/2:ifmd-int(md)=0thenmd=31:goto90
89 md=30
90 ifdt>mdordt<1thened=3:return
91 da$=right$(str$(mh),2)+"/"+right$(str$(dt),2)+"/"+right$(str$(yr),2)
99 ed=4:return
102 ifei=1thenei=0:sys52261:gosub27:ifpeek(1006)=1then592
107 poke646,1:poke214,r1-1:print:printspc(c1);:poke649,1
108 sys50224
120 onpeek(1018)goto130,108,126,150
125 goto108
126 ifme=1andpeek(631)=169then5000
127 goto108
130 onrtgoto60150,537,570,5600,822,13065,14265,15586,16050,15780,570
150 ifcc=1then14
152 onrtgoto108,159,159,108,108,108,108,108,16500,108,108
159 gosub50:wait203,64:me=0
160 onaagoto562,4300,22000,900
180 syswi,11,0,24,27,37120,1,0,0
182 syswi,11,0,24,27,37120,2,0,0:return
184 syswi,11,0,24,27,37120,8,0,0:return
200 print"[147]"
201 fc=29:tc=39:co=9:rv=0
202 fr=-5:tr=-1:forl=1to4
203 fr=fr+6:tr=tr+6:fu=4:gosub67:nextl
204 fc=0:fr=0:tr=3:tc=27:fu=4:co=3:gosub67:return
210 fk$(1)=" sales ":fk$(2)="[201][206][214][207][201][195][201][206][199]":fk$(3)=" "
211 fk$(4)="ck/change":fk$(5)=" default ":fk$(6)="settings "
212 fk$(7)=" change ":fk$(8)=" today's ":fk$(9)=" -[196][193][212][197]- "
213 fk$(10)=" update ":fk$(11)="[201][206][214][207][201][195][197] #":fk$(12)="-or quit-":goto260
214 fk$(1)=" ":fk$(2)=" -[195][200][193][206][199][197]-":fk$(3)=" setting "
215 fk$(4)=" restore ":fk$(5)=" default ":fk$(6)=" setting "
216 fk$(7)=" ":fk$(8)=" previous":fk$(9)=" menu "
217 fk$(10)="make this":fk$(11)=" setting ":fk$(12)="permanent":goto260
218 fk$(1)=" start ":fk$(2)=" -[206][197][215]- ":fk$(3)=" invoice "
219 fk$(4)="-[210][197][195][193][204][204]- ":fk$(5)=" saved ":fk$(6)=" invoice "
220 fk$(7)=" ":fk$(8)=" -[205][193][201][206]- ":fk$(9)=" [205][197][206][213] "
221 fk$(10)=" print ":fk$(11)=" -[194][204][193][206][203]- ":fk$(12)=" invoices":goto260
222 fk$(1)=" company ":fk$(2)="name and ":fk$(3)=" address "
223 fk$(4)=" items & ":fk$(5)=" tax rate":fk$(6)=" defaults"
224 fk$(7)=" ":fk$(8)=" -[205][193][201][206]- ":fk$(9)=" [205][197][206][213] "
225 fk$(10)=" ":fk$(11)=" printer ":fk$(12)=" settings":goto260
226 fk$(1)=" -[208][210][201][206][212]- ":fk$(2)=" this ":fk$(3)=" invoice "
227 fk$(4)=" -[211][193][214][197]- ":fk$(5)=" invoice ":fk$(6)=" to disk "
228 fk$(7)=" ":fk$(8)=" previous":fk$(9)=" menu "
229 fk$(10)="-[195][200][193][206][199][197]- ":fk$(11)=" or ":fk$(12)=" -[210][197][214][201][197][215]-":goto260
230 fk$(1)=" toggle ":fk$(2)="device # ":fk$(3)=" & copies"
231 fk$(4)=" toggle ":fk$(5)=" printer ":fk$(6)="selection"
232 fk$(7)=" ":fk$(8)=" previous":fk$(9)=" menu "
233 fk$(10)="customize":fk$(11)=" printer ":fk$(12)=" setting ":goto260
234 fk$(1)=" -[208][210][201][206][212]- ":fk$(2)=" this ":fk$(3)=" invoice "
235 fk$(4)=" -[197][196][201][212]- ":fk$(5)=" this ":fk$(6)=" invoice "
236 fk$(7)=" previous":fk$(8)=" menu ":fk$(9)=" "
237 fk$(10)=" print ":fk$(11)=" -[193][204][204]- ":fk$(12)=" invoices":goto260
238 fk$(1)=" -[209][213][201][212]- ":fk$(2)=" to ":fk$(3)=" basic "
239 fk$(4)=" -[209][213][201][212]- ":fk$(5)=" to ":fk$(6)="[204]oad[211][212][193][210] "
240 fk$(7)=" [210][197][212][213][210][206] ":fk$(8)=" to ":fk$(9)=" [208][210][207][199][210][193][205] "
241 fk$(10)=" update ":fk$(11)=" invoice ":fk$(12)=" no. ":goto260
242 fk$(1)=" -[211][195][210][207][204][204]-":fk$(2)=" items ":fk$(3)="[194][193][195][203][215][193][210][196] "
243 fk$(4)=" -[211][195][210][207][204][204]-":fk$(5)=" items ":fk$(6)=" [198][207][210][215][193][210][196] "
244 fk$(7)="-[196][197][204][197][212][197]- ":fk$(8)=" this ":fk$(9)=" item "
245 fk$(10)=" ":fk$(11)=" -[205][207][210][197]- ":fk$(12)="functions":goto260
250 fk$(1)=" [212][207][212][193][204] ":fk$(2)=" equals ":fk$(3)=" "
251 fk$(4)="-[195][200][193][206][199][197]- ":fk$(5)="customer ":fk$(6)=" info "
252 fk$(7)=" -[197][196][201][212]- ":fk$(8)=" this ":fk$(9)=" item "
253 fk$(10)="-[210][197][212][213][210][206]- ":fk$(11)=" to ":fk$(12)=" -[197][196][201][212]- ":goto260
260 poke646,9:poke214,1:print:printspc(30)fk$(1):printspc(30)fk$(2)
261 printspc(30)fk$(3)
262 poke214,7:print:printspc(30)fk$(4):printspc(30)fk$(5)
263 printspc(30)fk$(6)
264 poke214,13:print:printspc(30)fk$(7):printspc(30)fk$(8)
265 printspc(30)fk$(9)
266 poke214,19:print:printspc(30)fk$(10):printspc(30)fk$(11)
267 printspc(30)fk$(12):return
270 gosub55:print"[159][205][193][201][206][160][205][197][206][213]-[155] press desired
271 [153]" function key":[142]
272 [141]55:[153]"openright$(NULL)(NULL)(NULL)right$lenvalclose(NULL)val(NULL)(NULL)-":[142]
274 [141]55:[153]"open(NULL)vallenatn(NULL)(NULL)close(NULL)atn(NULL)valstr$closeright$(NULL)(NULL)(NULL)right$l