home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 66 / 066.d81 / inv.main (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  32KB  |  966 lines

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