home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 16 / 64er_Magazin_Sonderheft_16_19xx_Markt__Technik_de_Side_A.d64 / add-main (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  7KB  |  213 lines

  1. 10 rem add v8.6f 5n
  2. 20 rem version: 27.1.'87
  3. 30 rem (w)riten by: stefan roettger,
  4. 40 rem saarstr.75, 3300 braunschweig
  5. 90 poke56576,peek(56576)and252:poke53272,9:poke648,192:sys58692
  6. 100 clr:h$="":nu%=9:dima$(nu%),la(nu%),h$(nu%),f(nu%),s$(100),wp$(nu%):s$="
  7. 110 [159]15,8,15:[151]650,128
  8. 120 [151]53280,0:[151]53281,0:rl$[178][199](10)[170][199](13)
  9. 130 [139][194](52991)[171]1[167][153][199](142)"loadsys                (NULL)assword
  10. 140 je$="":ifpeek(52991)-1thent1=49851:gosub2070:poke52991,1:gosub2040
  11. 150 rt$=chr$(13):de$=chr$(20):ba$="[158][157].[157]":sp$="                    "
  12. 160 c$="[129]":dd$="[157] [146][158] = ":h3$="[164][164][164][164][164][164][164]":poke657,128
  13. 170 h1$="[147][146]":h2$="":ha$="[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]
  14. 180 la(1)[178]1:la(2)[178]20:la(3)[178]20:la(4)[178]20:la(5)[178]4:la(6)[178]20:la(7)[178]20:la(8)[178]10
  15. 190 la(9)[178]10:wp$(9)[178]"(NULL)ext   "
  16. 200 wp$(1)[178]"atnnrede ":wp$(2)[178]"(NULL)ame   ":wp$(3)[178]"(NULL)orname":wp$(4)[178]"(NULL)tra\e "
  17. 210 wp$(5)[178]"(NULL)lz    ":wp$(6)[178]"(NULL)rt    ":wp$(7)[178]"(NULL)elef. ":wp$(8)[178]"geb.str$at"
  18. 220 [153][199](142)h1$ha$"cont  atn d r e s s e n  (NULL) e r w a l t u n g  "h2$ha$
  19. 230 us$[178]"onsys                < '86 val(NULL)(NULL)(NULL)"[170]rt$
  20. 240 do$[178]"         ":d1$[178]"for         tototo":ad$[178]"cmd waitsys - atndressen "
  21. 250 [141]1980:[153]us$:[153]do$"for e waitsys - valnde":[153]d1$
  22. 260 [153]do$1ad$"atnusgabe":[153]d1$
  23. 270 [153]do$2ad$"(NULL)uchen":[153]d1$
  24. 280 [153]do$3ad$"valingabe":[153]d1$
  25. 290 [153]do$4ad$"]ndern":[153]d1$
  26. 300 [153]do$5ad$"(NULL):schen":[153]d1$
  27. 310 [153]do$6"cmd wait sys- str$ateien (NULL):schen":[153]d1$
  28. 320 [153]do$7"cmd wait sys- (NULL)ortierte atnusgabe":[153]d1$
  29. 330 [153]do$8"cmd wait sys- (NULL)assword ;ndern":[153]d1$
  30. 340 [153]do$9"cmd wait sys- str$ateien (NULL)mkodieren
  31. 350 poke198,0:wait198,1:gett$:ift$="e"thensys828:poke52991,0:sys64738
  32. 360 tt=val(t$):iftt=0then350
  33. 370 iftt=8thenpoke52991,0:run
  34. 380 onttgoto400,1030,1090,1330,1330,1640,1760,370,2000
  35. 390 return
  36. 400 printh1$ha$"[154]     [193] d r e s s e n  [193] u s g a b e     "h2$ha$"
  37. 410 [153]"for"h3$"to":[129]t[178]1[164]nu%:[153]"for"wp$(t)"/":[130]:[153]"
  38. 420 gosub1710
  39. 430 ifb$="*"thenfl=1:forb=193to221:b$=chr$(b+(b=219)*126+(b=220)*129+(b=221)*35)
  40. 440 print""sp$"       [157][157][157][157][157][157][157][157]"b$
  41. 450 close1:open1,8,8,b$+",s,r":input#15,er,er$,t,s:iferthen710
  42. 460 poke2,0:sys(51456)1,s$:if(st and64)=0thengosub490:goto460
  43. 470 ifleft$(s$,1)="*"thenclose1:goto710
  44. 480 gosub490:close1:goto710
  45. 490 iff(1)=1andleft$(s$,1)<>h$(1)thenreturn
  46. 500 qq=1:fort=1tonu%:lb=la(t):a$(t)=mid$(s$,qq,lb):qq=qq+lb:next
  47. 510 t=1:f=f(t):iff=1thent=2:f=f(t)
  48. 520 iff=0then580
  49. 530 h$=h$(f):iff-4andf-7andf-8andh$<>left$(a$(f),len(h$))thenreturn
  50. 540 iff-4andf-7andf-8then570
  51. 550 i2=1:fori1=0tolen(a$(f))-len(h$):ifh$=mid$(a$(f),i1+1,len(h$))theni2=0
  52. 560 next:ifi2thenreturn
  53. 570 t=t+1:f=f(t):iffthen530
  54. 580 print"[158]
  55. 590 [129]t[178]1[164]nu%:[153]""a$(t):[130]:[141]1960
  56. 600 [139]m[177]0[167][142]
  57. 610 [153]"";
  58. 620 [139]pd[167][141]750:[142]
  59. 630 [153]"          (NULL)eiter ?  (j/n/p/c)"
  60. 640 [151]198,0:[146]198,1:[153]"on"[200](sp$[170]sp$,30)"on"
  61. 650 [161]t$:[139]t$[178]""[175]pd[178]0[167]620
  62. 660 [139]t$[178]"j"[167][142]
  63. 670 [139]t$[178]"n"[167][160]1:[138]
  64. 680 [139]t$[178]"p"[167][141]750:[142]
  65. 690 [139]t$[178]"c"[167]pd[178]1:pe[178]0
  66. 700 [137]620
  67. 710 [139]fl[178]1[167][160]1:[130]
  68. 720 [153]"sys         (NULL)etzter atndressen-(NULL)atz !        "
  69. 730 [153]"         peekitte (NULL)aste dr@cken.":[141]1960
  70. 740 [151]198,0:[146]198,1:[160]1:[138]
  71. 750 [139]pd[167]pe%[178][180](pe)[170]2:[145]pe%[137]820,760,880
  72. 760 [153]"           valtikettenformat ?on"
  73. 770 [151]198,0:[146]198,1:[161]t$
  74. 780 [139]t$[178]"n"[167][153][200](sp$[170]sp$,35)"on":pe[178][171]1:[137]820
  75. 790 [153]"              atnnzahl ? (1-9)"
  76. 800 [151]198,0:[146]198,1:[161]t$:[153]"on"[200](sp$[170]sp$,30)"on":pe[178][197](t$)
  77. 810 pe[178]pe[171](pe[178]0):[137]880
  78. 820 [159]4,4,1:[160]4:[139]st[178]0[167]840
  79. 830 [153]"loadstr$rucker einschalten !":[151]198,0:[146]198,255:[160]1:[138]
  80. 840 [159]4,4,2:vs$[178]"     "
  81. 850 [152]4,[199](27)"(NULL)"vs$a$(2)" "a$(3)"^ "a$(4)"^ "a$(5)" "a$(6)rl$
  82. 860 [152]4,sp$" (NULL)el./"a$(7)" geb. str$atum /"a$(8)"      "a$(9)rl$
  83. 870 [160]4:[142]
  84. 880 [159]4,4,1:[160]4:[139]st[178]0[167]900
  85. 890 [153]"loadstr$rucker einschalten !":[151]198,0:[146]198,255:[160]1:[138]
  86. 900 [159]4,4,2:vs$[178]"      ":z$[178]a$(1):[129]k[178]1[164]pe
  87. 910 [139]z$[178]"h"[167]a$[178]"left$errn":[137]960
  88. 920 [139]z$[178]"f"[167]a$[178]"ascrau":[137]960
  89. 930 [139]z$[178]"a"[167]a$[178]"atnn":[137]960
  90. 940 [139]z$[178]"m"[167]a$[178]"ascrl.":[137]960
  91. 950 a$[178]"atnbs./"
  92. 960 [159]5,4,2:[152]5,"valchr$";:[160]5
  93. 970 [152]4,"(NULL)"vs$a$rl$:[139][200](a$(3),1)[178]" "[167]a$(3)[178]"":[137]1010
  94. 980 a$[178]vs$:[129]t[178]3[164]2[169][171]1:f[178]0:a$(t)[178]a$(t)[170]" ":[129]j[178]la(t)[164]2[169][171]1
  95. 990 [139]([198]([202](a$(t),j,1))[171]32)[175](f[178]0)[167]a$[178]a$[170][200](a$(t),j[171](t[178]3)):f[178]1
  96. 1000 [130]:[130]:tr$[178]rl$[170]rl$
  97. 1010 a$[178][201](a$,la(3)[170]la(2)[170]1):[152]4,a$tr$vs$a$(4)tr$vs$a$(5)"  "a$(6)rl$
  98. 1020 [152]4,tr$rl$:[159]5,4,2:[152]5,"ascleft$";:[160]5:[130]:[137]870
  99. 1030 [153]h1$ha$"cont      atn d r e s s e n  (NULL) u c h e n      "h2$ha$
  100. 1040 [153]"          (NULL)uchkriterien":pq[178]1:m[178]1
  101. 1050 [129]in[178]1[164]nu%:[141]1220:h$(in)[178]a$(in):f(in)[178]0:[139]h$(in)[179][177]""[167]f(pq)[178]in:pq[178]pq[170]1
  102. 1060 [130]:m[178]0:[153]"
  103. 1070 iff(2)<>2andf(1)<>2thenprint"":goto420
  104. 1080 h$(2)=a$(2):b$=left$(a$(2),1):goto450
  105. 1090 printh1$ha$"[154]     [193] d r e s s e n  [197] i n g a b e     "h2$ha$
  106. 1100 forin=1tonu%:gosub1220:next
  107. 1110 print:print"[158] [201]n [207]rdnung ? (j/n)
  108. 1120 [161]t$:[139]t$[179][177]"j"[175]t$[179][177]"n"[167]1120
  109. 1130 [139]t$[178]"n"[167]1090
  110. 1140 d$[178][200](a$(2),1):[139]a$(1)[178]" "[167]a$(1)[178]".
  111. 1150 close1:open1,8,8,d$+",s,r":poke2,0:sys(51456)1,s$:close1:ad$=",s,a
  112. 1160 [139][200](s$,1)[178]"*"[176]s$[178]""[167][152]15,"s:"[170]d$:ad$[178]",s,w"
  113. 1170 [160]1:[159]1,8,8,d$[170]ad$:s$[178]"":[129]t[178]1[164]nu%:s$[178]s$[170]a$(t):[130]:[151]2,0
  114. 1180 [152]1,s$:[160]1:[138]
  115. 1190 [161]t$:t[178][198](t$[170][199](0)):[139]t[178]20[176]t[178]32[176]t[178]13[176]t[178]186[176]t[177][178]35[175]t[179]127[167][142]
  116. 1200 [139]t[177]192[175]t[179]219[167][142]
  117. 1210 [137]1190
  118. 1220 [139]in[178]1[167][153]"for"h3$:[137]1240
  119. 1230 [153]
  120. 1240 [153]"for"wp$(in)"waitsys";:a$(in)[178]"":[129]t[178]1[164]la(in):[153]".";:[130]
  121. 1250 [153]:[153]"on"[163]11);
  122. 1260 [141]1190:a[178][195](a$(in)):[139](a[178]0[175]t$[178]de$)[176](a[178]la(in)[175]t$[177]de$)[167]1260
  123. 1270 [139]t$[178]de$[167]a$(in)[178][200](a$(in),a[171]1):[153]ba$;:[137]1260
  124. 1280 [139]t$[179][177]rt$[175]in[178]1[175][197](t$)[179][177]0[167]1260
  125. 1290 [139]t$[179][177]rt$[167]a$(in)[178]a$(in)[170]t$:[153]t$;:[137]1260
  126. 1300 [139]m[178]1[167][142]
  127. 1310 a$(in)[178][200](a$(in)[170]sp$,la(in)):[142]
  128. 1320 [153]h1$ha$"cont      atn d r e s s e n  ] n d e r n      "h2$ha$:[142]
  129. 1330 [141]1320
  130. 1340 [141]1710:nn[178]0:[139]b$[178]"*"[167]1340
  131. 1350 m[178]2:[139]tt[178]4[167]a$[178]"           ]ndern ?   (j/n/e)":[137]1370
  132. 1360 a$[178]"           (NULL):schen ?   (j/n/e)
  133. 1370 d$=b$:n=0:hh$=b$+",s,r
  134. 1380 [159]1,8,8,hh$:[132]15,er,er$,t,s:[139]er[167][160]1:[138]
  135. 1390 n[178]n[170]1:[151]2,0:[158](51456)1,s$(n):[139](st [175]64)[178]0[167]1390
  136. 1400 [160]1:[139]s$(1)[178]"*"[167][138]
  137. 1410 [129]z[178]1[164]n:qq[178]1:s$[178]s$(z):[129]t[178]1[164]nu%:a$(t)[178][202](s$,qq,la(t)):qq[178]qq[170]la(t):[130]
  138. 1420 [153]"load":[141]1320
  139. 1430 [153]"for"h3$"to":[129]t[178]1[164]nu%:[153]"for"wp$(t)"/":[130]
  140. 1440 [141]580
  141. 1450 [153]"";
  142. 1460 [153]a$
  143. 1470 [151]198,0:[146]198,1:[161]t$
  144. 1480 [153]"on"[200](sp$[170]sp$,38)"on"
  145. 1490 [139]t$[178]"e"[167][153]"":[137]1610
  146. 1500 [139]t$[178]"n"[167][153]"":[130]:[137]1610
  147. 1510 [139]t$[179][177]"j"[167]1460
  148. 1520 [139]tt[178]5[167]1600
  149. 1530 [153]"load":[141]1320
  150. 1540 [153]"fortototo":[129]t[178]1[164]nu%:[153]"for"t[171]1;dd$wp$(t):[130]:[151]198,0
  151. 1550 [161]t$:in[178][197](t$):[139][197](t$)[178]0[175]t$[179][177]"0"[167]1550
  152. 1560 in[178]in[170]1:[139]in[177]nu%[167]1550
  153. 1570 [141]1220:nn[178]1
  154. 1580 [139]iq[178]1[167]iq[178]0:[142]
  155. 1590 s$(z)[178]"":[129]i[178]1[164]nu%:s$(z)[178]s$(z)[170]a$(i):[130]:[137]1420
  156. 1600 n[178]n[171]1:[129]b[178]z[164]n:s$(b)[178]s$(b[170]1):[130]:nn[178]1
  157. 1610 [139]nn[178]0[167][138]
  158. 1620 [152]15,"s:"[170]d$:[159]1,8,8,d$[170]",s,w":[139]n[178]0[167]s$(1)[178]"*
  159. 1630 fort=1ton:poke2,0:print#1,s$(t):next:close1:run
  160. 1640 printh1$ha$"[154]     [196] a t e i e n    [204] : s c h e n     "h2$ha$:restore
  161. 1650 gosub1710:print#15,"i0":ifb$="*"then1680
  162. 1660 print#15,"s:"+b$
  163. 1670 close1:open1,8,8,b$+",s,w":poke2,0:print#1,"*":close1:run
  164. 1680 forb=193to221:b$=chr$(b+(b=219)*126+(b=220)*129+(b=221)*35)
  165. 1690 print""sp$"       [157][157][157][157][157][157][157][157]"b$
  166. 1700 print#15,"s:"+b$:open1,8,8,b$+",s,w":poke2,0:print#1,"*":close1:next:run
  167. 1710 print"[158]         [196]atei - [195]ode [173]   ?[157]";
  168. 1720 poke198,0:wait198,1:getb$:b=asc(b$)
  169. 1730 ifb-42andb-58andb-59and(b>90orb<64)then1720
  170. 1740 ifb$="*"thenprintb$:return
  171. 1750 b$=chr$(b+128+(b=59)*94+(b=58)*95+(b=64)*6):printb$:return
  172. 1760 printh1$ha$"[154]     [211] o r t i e r t e   [193] u s g a b e  "h2$ha$"
  173. 1770 [141]1710:[153]"     ";:ck[178]0
  174. 1780 fl[178]0
  175. 1790 [139]b$[178]"*"[167]fl[178]1:[129]b[178]193[164]221:b$[178][199](b[170](b[178]219)[172]126[170](b[178]220)[172]129[170](b[178]221)[172]35)
  176. 1800 [139]ck[167]je$[178]ki$:[141]2040
  177. 1810 [160]1:[159]1,8,8,b$[170]",s,r":n[178]0:[132]15,er,er$,s,t:[139]er[167]1900
  178. 1820 n[178]n[170]1:[151]2,0:[158](51456)1,s$(n):[139](st [175]64)[178]0[167]1820
  179. 1830 [160]1:[139]n[178]0[167]1900
  180. 1840 [139]ck[178]1[175]ki$[179][177]ko$[167]je$[178]ko$:[141]2040
  181. 1850 [139]ck[167][152]15,"s:"[170]b$:[159]2,8,8,b$[170]",s,w
  182. 1860 ifn=1thens$=s$(1):gosub1920:goto1900
  183. 1870 fortt=nto1step-1:s$=s$(1):s=1:forp=1tott
  184. 1880 ifright$(s$,len(s$)-1)>right$(s$(p),len(s$(p))-1)thens$=s$(p):s=p
  185. 1890 next:gosub1920:s$(s)=s$(tt):next
  186. 1900 iffl=0andck=0thenrun
  187. 1910 printb$;:close2:next:goto720
  188. 1920 ifck=0thenqq=2:fort=2tonu%:lb=la(t):a$(t)=mid$(s$,qq,lb):qq=qq+lb:next
  189. 1930 ifck=0thenpd=1:gosub820
  190. 1940 ifck=1thenpoke2,0:print#2,s$
  191. 1950 return
  192. 1960 si=54272:forj=4to18step7:pokesi+j,0:next
  193. 1970 forj=4to18step7:pokesi+j,17:next:return
  194. 1980 restore:si=54272
  195. 1990 fori=0to24:reada:pokesi+i,a:next:return
  196. 2000 printh1$ha$"[154]  [193] d r e s s e n  [213] m k o d i e r e n  "h2$ha$
  197. 2010 input"[158][214]on [208]assword [173]";ki$
  198. 2020 input"[158][206]ach [208]assword [173]";ko$:ifko$=""thenko$=ki$
  199. 2030 print"      ";:ck=1:b$="*":goto1780
  200. 2040 sys828:ifje$=""thenreturn
  201. 2050 fort=0tolen(je$)-1:poke52992+t,asc(mid$(je$,t+1)):next:sys847
  202. 2060 return
  203. 2070 l=0:t=t1-130+6144:fori=ttot+260:pokei,7:next:poke198,0:wait198,1
  204. 2080 getj1$:t=asc(j1$+chr$(0)):ift=0then2080
  205. 2090 ift=13thenreturn
  206. 2100 ift=20then2130
  207. 2110 je$=je$+j1$:a=l/2-int(l/2):t1=t1+(a=0)*l-(a<>0)*l:l=l+1:poket1,45
  208. 2120 goto 2080
  209. 2130 ifl=0then2080
  210. 2140 l=l-1:a=l/2-int(l/2):je$=left$(je$,l):poket1,32:t1=t1-(a=0)*l+(a<>0)*l
  211. 2150 goto2080
  212. 2160 data187,34,,,16,10,,207,34,,,16,10,,227,34,,,16,10,,,,,15
  213.