home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 58 / 058side2.d64 / camp (.txt) < prev    next >
Commodore BASIC  |  2022-08-29  |  22KB  |  626 lines

  1. 5 rem 6180=ls
  2. 10 clr:mt=51730:sr=51828:ml=52000:dimep$(20):forz=1to20:ep$(z)="     ":nextz:goto50
  3. 20 xp=3:for z=1 to 6:yp=6+z:gosub30:printchr$(mc)"";mc$(z):nextz:return
  4. 30 poke781,yp:poke782,xp:poke783,0:sys65520:return
  5. 40 syssr,1,6,12,33,12000:return
  6. 50 print"[147]":gosub2830:gosub2760
  7. 60 v=53248:pokev+21,255:poke2040,13:poke2041,14:poke2042,15:poke2043,55:poke2044,56
  8. 70 poke 2045,57:poke2046,58:poke53275,3
  9. 80 pokev+39,7:pokev+40,4:pokev+41,8
  10. 90 sysmt,0,164,105:sysmt,1,164,151:poke 53271,255:poke53277,255
  11. 100 sysmt,2,148,169:sysmt,3,164,191:sysmt,4,115,193:sysmt,5,64,170
  12. 110 sysmt,6,90,90:poke 53288,14:poke 53289,3:poke 53290,10:poke 53291,10
  13. 120 deffnmi(o)=val(mid$(ti$,4,1)):deffnse(o)=val(right$(ti$,2))
  14. 130 goto2140
  15. 140 gosub1520:onval(mid$(fu$,int(rnd(0)*len(fu$))+1,1))gosub590,750,150:return
  16. 150 gosub2760:fs=13
  17. 160 gosub2000:yn=6:xn=19:u1=135:u2=3:u3=0:u4=11:u5=10
  18. 170 ifval(n1$)>9thenn1$=right$(n1$,len(n1$)-1)
  19. 180 ifval(n2$)>9thenn2$=right$(n2$,len(n2$)-1)
  20. 190 p1=val(mid$(n2$,2,1)):p2=val(mid$(n1$,2,1)):n3$=str$(p1*p2):wp=1:cm=1
  21. 200 if len(n3$)<3 then c1=0:ch=0:goto 220
  22. 210 c1=val(left$(n3$,2)):ch=c1:ifval(n1$)<=9thenc1=0:goto230
  23. 220 n3$=right$(n3$,1)
  24. 230 ifwg=1thens1=3:s2=3:gosub1000:uv$=n3$:ch=c1:gosub4560:gosub4600:gosub4410
  25. 240 p1=val(mid$(n2$,2,1)):p2=val(mid$(n1$,1,1)):h$=str$(p2*p1+ch):wp=2
  26. 250 ifwg=1andval(n1$)>9thengosub3980:gosub4420
  27. 260 h$=h$+n3$:n3$=h$:ifval(n3$)>99thenn3$=right$(n3$,len(n3$)-1)
  28. 270 ifwg=1thengoto290
  29. 280 yn=6:xn=19:uv$=n3$:u1=133:u2=3:u3=2:u4=11:u5=10:cm=3:gosub1200
  30. 290 ifval(n2$)<=9thengosub4590:return
  31. 300 gosub4590:p1=val(mid$(n2$,1,1)):p2=val(mid$(n1$,2,1)):n4$=str$(p1*p2):wp=1
  32. 310 if len(n4$)<3 then c1=.:ch=.:goto 330
  33. 320 c1=val(left$(n4$,2)):ch=c1
  34. 330 n4$=right$(n4$,1):ifwg=1thengosub4000:gosub4410
  35. 340 p2=val(mid$(n1$,1,1)):h$=str$(p2*p1+ch):wp=2:ifwg=1thengosub4020:gosub4420
  36. 350 h$=h$+n4$:n4$=h$:ifval(n4$)>99thenn4$=right$(n4$,len(n4$)-1)
  37. 360 ifwg=1thenyp=17:xp=16:gosub30:print"[195][195][195][195][195][195][195][195]":goto380
  38. 370 uv$=n4$:u1=194:cm=3:gosub1200
  39. 380 gosub4590:ln=len(n3$):n5$=mid$(n3$,ln,1)
  40. 390 ch=.:wp=.:ifwg=1thenp1=val(n5$):p2=.:ch=c1:c1=.:gosub4040:gosub4410
  41. 400 p1=val(mid$(n3$,ln-1,1)):p2=val(mid$(n4$,ln,1)):h$=str$(p1+p2):wp=1
  42. 410 iflen(h$)<3thenc1=.:goto430
  43. 420 c1=1
  44. 430 h$=right$(h$,1):n5$=h$+n5$
  45. 440 ifwg=1thench=c1:yn=12:xn=17:s1=2:s2=3:gosub4060:gosub4410:c1=ch
  46. 450 p1=val(mid$(n3$,ln-2,1)):p2=val(mid$(n4$,ln-1,1)):h$=str$(p1+p2+c1):c5=c1:c1=.:wp=3
  47. 460 ifval(h$)<=9thenc2=.:goto480
  48. 470 c2=1
  49. 480 h$=right$(h$,1):ifwg=1thens1=1:s2=2:n5$=h$+n5$:oh$=h$:gosub4080:gosub4420:gosub4590
  50. 490 gosub4630:ifwg<>1thenn5$=h$+n5$:oh$=h$
  51. 500 ch=.:c1=.:p1=val(mid$(n4$,ln-2,1)):p2=.:h$=str$(p1+c2):wp=2:iftw=1thenreturn
  52. 510 ifwg=1thenn5$=h$+n5$:goto540
  53. 520 n5$=h$+n5$:yp=17:xp=16:gosub30:print"[195][195][195][195][195][195][195][195]":yn=12:xn=17:uv$=right$(n5$,3)
  54. 530 uv$=" "+uv$:cn=1:u2=13:u3=1:u4=15:u5=15:cm=3:c1=c5:gosub1200:gosub4590:iftw=1thenreturn
  55. 540 ifc2=1andval(n4$)>99thengosub4660:ch=c2:c2=0
  56. 550 ifwg=1andval(n4$)>99thenc2=ch:ch=.:gosub1160:c2=.
  57. 560 u1=1:u2=14:cm=1:ifleft$(n5$,2)=" 0"thengosub2870:return
  58. 570 uv$=left$(n5$,2):uv$=right$(uv$,1):ifwg=1thengosub4560:gosub4420:gosub4580:gosub2870:return
  59. 580 gosub1200:gosub2870:gosub4580:return
  60. 590 gosub2760:fs=10
  61. 600 gosub2000:yn=6:xn=19:u1=135:u2=3:u3=0:u4=11:u5=10:cm=3
  62. 610 if val(n1$)<10then n1$=" "+n1$
  63. 620 if val(n2$)<10then n2$=" "+n2$
  64. 630 p2=val(mid$(n1$,3,1)):p1=val(mid$(n2$,3,1)):h$=str$(p2+p1):wp=1
  65. 640 if val(h$)<=9thenc1=.:ch=.:goto660
  66. 650 c1=val(left$(h$,2)):ch=c1
  67. 660 h$=right$(h$,len(h$)-(2-abs(val(h$)<=9)))
  68. 670 n3$=h$:ifval(n1$)<=9thenc1=.:ifch=1thench=-1
  69. 680 cm=1:ifwg=1thens1=3:s2=3:gosub1000:uv$=n3$:gosub4560:gosub4600:gosub4410
  70. 690 ifwg=1andval(n1$)<=9then1620
  71. 700 p1=val(mid$(n2$,2,1)):p2=val(mid$(n1$,2,1)):h$=str$(p1+p2+abs(ch))
  72. 710 n3$=h$+n3$:ifwg=1then1640
  73. 720 yn=6:xn=19:uv$=n3$:u1=133:u2=3:u3=2:u4=11:u5=10:cm=3
  74. 730 gosub1200:gosub4590
  75. 740 return
  76. 750 fs=11:gosub2760:gosub2000:yn=6:xn=19:u1=133:u2=3:u3=2:u4=11:u5=10:cm=3
  77. 760 d1=0:ifval(n1$)<10thenn1$=" "+n1$
  78. 770 ifval(n2$)<10thenn2$=" "+n2$
  79. 780 ifval(mid$(n1$,3,1))<val(mid$(n2$,3,1))then800
  80. 790 goto920
  81. 800 p1=val(mid$(n1$,2,1)):h$=str$(p1-1)
  82. 810 n1$=h$+mid$(n1$,3,1):c3=val(h$):ac=1:ifwg=1thengosub1860:gosub3860
  83. 820 p1=val(mid$(n1$,3,1)):c$=str$(1)+mid$(n1$,3,1)
  84. 830 c2=val(c$):ifwg=1thengosub1880:gosub4200
  85. 840 p2=c2:p1=val(mid$(n2$,3)):n3$=str$(p2-p1)
  86. 850 ifwg=1thenu1=135:s1=0:s2=3:cm=1:gosub1900:gosub1000:uv$=n3$:gosub4560:gosub4600:gosub3850
  87. 860 p2=val(mid$(n1$,2,1)):p1=val(mid$(n2$,2,1)):h$=str$(p2-p1)
  88. 870 n3$=right$(n3$,len(n3$)-1)
  89. 880 n3$=h$+n3$
  90. 890 ifwg=1thenu1=134:s1=0:s2=2:cm=1:gosub1900:gosub1000:uv$=h$:gosub4560:gosub4600:gosub3850
  91. 900 if wg=1 then gosub4390:return
  92. 910 uv$=n3$:gosub3850:goto990
  93. 920 p2=val(mid$(n1$,3,1)):p1=val(mid$(n2$,3,1)):n3$=str$(p2-p1)
  94. 930 n3$=right$(n3$,len(n3$)-1)
  95. 940 ifwg=1thenu1=135:s1=3:s2=3:cm=1:gosub1900:gosub1000:uv$=n3$:gosub4560:gosub4600:gosub3850
  96. 950 p2=val(mid$(n1$,2,1)):p1=val(mid$(n2$,2,1)):h$=str$(p2-p1)
  97. 960 n3$=h$+n3$:ifval(n1$)<=9 then 980
  98. 970 ifwg=1thenu1=134:s1=2:s2=2:cm=1:gosub1900:gosub1000:uv$=h$:gosub4560:gosub4600:gosub3850
  99. 980 ifwg=1thenreturn
  100. 990 uv$=n3$:gosub3860:gosub4390:return
  101. 1000 iffs=10thengosub1770
  102. 1010 iffs=13thengosub1660
  103. 1020 forx=1to2:ifs1>0thenpoke164,0:poke165,14:poke166,66+s1:poke 167,3:sysml
  104. 1030 poke164,0:poke165,14:poke166,87+s2:poke167,3:sysml
  105. 1040 forz=1toft:nextz:ifs1>0thenpoke164,9*p2:poke165,11:poke166,66+s1:poke167,3:sysml
  106. 1050 if val(n2$)<=9ands2=2then1070
  107. 1060 ifs2>0thenpoke164,9*p1:poke165,11:poke166,87+s2:poke167,3:sysml
  108. 1070 forz=1toft:nextz,x:fv=1:return
  109. 1080 gosub1770:forx=1to2:poke164,0:poke165,14:poke166,133+3:poke167,3:sysml:forz=1toft:nextz
  110. 1090 poke164,9*val(mid$(n3$,3,3)):poke165,11:poke166,133+3:poke167,3:sysml
  111. 1100 forz=1toft:nextz:nextx:fv=2:return
  112. 1110 vl$=mid$(n3$,s1,1):forx=1to2:poke164,0:poke165,14:poke166,133+s1:poke167,3:sysml
  113. 1120 poke164,0:poke165,14:poke166,194+s2:poke167,3:sysml:forz=1toft:nextz
  114. 1130 if vl$<>" "thenpoke164,9*val(vl$):poke165,11:poke166,133+s1:poke167,3:sysml
  115. 1140 poke164,9*val(mid$(n4$,s2,1)):poke165,11:poke166,194+s2:poke167,3:sysml
  116. 1150 forz=1toft:nextz:nextx:fv=3:return
  117. 1160 if c2=1andval(n4$)<100then fv=4:return
  118. 1170 gosub1770:forx=1to2:poke164,0:poke165,14:poke166,195:poke167,3:sysml:forz=1toft:nextz
  119. 1180 poke164,9*val(left$(n4$,1)):poke165,11:poke166,195:poke167,3:sysml
  120. 1190 forz=1toft:nextz,x:fv=4:return
  121. 1200 ha$="":xp=xn+1:yp=yn:gosub5900:print" ":if len(uv$)=4thenuv$=right$(uv$,len(uv$)-1)
  122. 1210 ifcm=u3andc1<>0thenxp=xn+i:yp=yn:gosub5900:print" ":cf=i
  123. 1220 gosub1350:iftw=ithenreturn
  124. 1230 in=in-48:ifcm=u3andc1<>0andin=c1thengosub4350:c1=0:goto1210
  125. 1240 ifin<>val(mid$(uv$,cm,1))thensyssr,1,6,12,33,3000:gosub1330:goto1210
  126. 1250 syssr,1,9,12,17,11000:poke164,9*in:poke165,u4
  127. 1260 ha$=mid$(uv$,cm,4)
  128. 1270 ifval(uv$)<100thenha$=" "+mid$(uv$,cm,4)
  129. 1280 poke166,u1+cm:poke167,u2:sysml:cm=cm-1
  130. 1290 ifha$=uv$orcm=0thenreturn
  131. 1300 ifu2=14andval(ha$)=val(uv$)thenreturn
  132. 1310 ifval(n3$)<10andval(n1$)<10andcm=2thenreturn
  133. 1320 goto1210
  134. 1330 t2$=str$(val(ti$)+2):t2$=left$(ti$,6-len(t2$)+1)+right$(t2$,len(t2$)-1):ti$=t2$
  135. 1340 t2$="000000":return
  136. 1350 ifcf=1then1370
  137. 1360 poke164,188:poke165,u5:poke166,u1+cm:poke 167,u2:sysml
  138. 1370 gosub5920:print""mid$(ti$,4,1)":"right$(ti$,2):iffnmi(o)>=l1andfnse(o)>=l2then1420
  139. 1380 getin$:ifin$=""then1350
  140. 1390 ifin$="[136]"thengosub2830:gosub2760:goto2320
  141. 1391 ifin$="q"then6180
  142. 1400 in=asc(in$):ifin<48orin>58then1350
  143. 1410 cf=0:return
  144. 1420 n1$="":n2$="":n3$="   ":n4$="":n5$="":uv$="":c3=0:tw=1:pp=pp-1:return
  145. 1430 for z=m1+1tom2+1step3:syssr,0,9,12,17,mu(z)*4+4
  146. 1440 syssr,1,9,12,17,mu(z+1)*4+4:syssr,2,9,12,17,mu(z+2)*4+4
  147. 1450 for x=1to22:nextx:nextz
  148. 1460 return
  149. 1470 for z=20 to 5step-1:syssr,0,9,12,33,z*200:next:forz=1to100:next:return
  150. 1480 for z=m1+1 to m2+1 step 3:syssr,0,9,12,17,mu(z)*4+4
  151. 1490 syssr,1,9,12,17,mu(z+1)*4+4:syssr,2,9,12,17,mu(z+2)*4+4
  152. 1500 for x=1to15:nextx:nextz
  153. 1510 return
  154. 1520 rem function spec
  155. 1530 if ep=1 then 1580
  156. 1540 n1=int(rnd(0)*(r2-r1)+r1):n2=int(rnd(0)*(r4-r3)+r3)
  157. 1550 n1$=str$(n1):n2$=str$(n2)
  158. 1560 n3$=n1$:if val(n2$)>val(n1$) then n1$=n2$:n2$=n3$
  159. 1570 return
  160. 1580 tp=int(rnd(0)*ne-1)+2:n1$=str$(fp(tp)):n2