home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 January
/
Ahoy_Magazine_85-01_1985_Double_L.d64
/
mail
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
13KB
|
457 lines
10 gosub 25000
15 dimv(8):v(1)=1:v(2)=14:v(3)=30:v(4)=50:v(5)=70:v(6)=83:v(7)=88:v(8)=98:vj=0
20 dimn$(8):dimq(15):dimsr$(750):dimj$(5):dimdl(50):dimsq(750):dimsf$(750)
25 q(0)=5:q(1)=20:q(2)=30:q(3)=11:q(4)=5:q(5)=5:fl=0
30 s(1)=12:s(2)=15:s(3)=19:s(4)=19:s(5)=12:s(6)=4:s(7)=9:s(8)=12
31 open15,8,15,"i":close15
32 print"[147]":poke 53280,0:poke 53281,6
35 for a=1 to 8:print:next a:printtab(12);"initializing..."
36 print tab(12);"please stand by"
37 fory=1to750:sq(y)=y:next
40 open1,8,15:open2,8,3,"0:list":gosub7000
41 print#1,"p"chr$(3)chr$(0)chr$(3)chr$(1)
42 input#2,nn$:nn=val(nn$):ifnn=0then110
45 for a=1 to 7:print:next a
50 fori=1tonn
51 fort=1to5:nextt
53 gosub11000:iffl=1thenfl=0:goto60
60 nexti
110 print"[147]":cg=0:poke 53280,14:poke 53281,0:gosub 23000
111 print#1,"p"chr$(3)chr$(0)chr$(2)chr$(1)
115 print tab(12);"[154][213][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
116 print tab(7);"[213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201]"
120 print tab(3);"[195][195][195]<[221][158]* s e l e c t i o n s *[221]>[195][195][195]"
125 print tab(7);"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
126 print tab(12);"[202][195][195][195][195][195][195][195][195][195][195][195][195][195][203]"
150 printtab(11)"[154][1][146] [158]add name"
160 printtab(11)"[154][2][146] [158]change/inquire"
170 printtab(11)"[154][3][146] [158]print commands"
180 printtab(11)"[154][4][146] [158]delete name"
185 printtab(11)"[154][5][146] [158]search/scroll"
190 printtab(11)"[154][6][146] [158]sort list"
195 printtab(11)"[154][7][146] [158]exit program"
200 for a=1 to 6:print:next a
210 printtab(11)"your choice? [154][1-7]"
220 getm$:ifm$=""then220
230 m=val(m$):ifm<1orm>7then220
235 gosub 23050
240 on m goto 1000,2000,10000,4000,12000,14000,5000
300 rem write rtn.
301 ifdf=1andcg=0thensr$(y)=n$(1):sf$(y)=n$(2):goto305
302 ifcg=1then305
303 sr$(i)=n$(1):sf$(i)=n$(2)
305 r1=i:r2=0:ifr1>255thenr2=int(r1/256):r1=r1-(256*r2)
310 forl=1to8:print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(v(l))
315 iflen(n$(l))>s(l)thenn$(l)=left$(n$(l),s(l))
320 print#2,n$(l):next
325 return
400 rem read rtn.
405 r1=i:r2=0:ifr1>255thenr2=int(r1/256):r1=r1-(256*r2)
410 print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(1)
415 get#2,z$:ifz$="[255]"thenfl=1:return
425 forl=1to8:print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(v(l))
430 input#2,n$(l):next
435 return
1000 print "[147]":poke 53280,6:poke 53281,1
1010 print "[145] [176][195][195][195][195][195][195][195][195][195][195][174] "
1020 print "[145] [221] add name [221] "
1030 print "[145] [173][195][195][195][195][195][195][195][195][195][195][189] "
1035 print "[145] "
1036 print "[145] "
1040 print " 1.[146] rec #[195][195]>"
1050 print " 2.[146] l.name[195]>"
1055 print " 3.[146] f.name[195]>"
1060 print " 4.[146] addre[195][195]>"
1065 print " 5.[146] addre2[195]>"
1070 print " 6.[146] city[195][195][195]>"
1080 print " 7.[146] state[195][195]>"
1090 print " 8.[146] zip[195][195][195][195]>"
1091 print " 9.[146] tele[195][195][195]>"
1092 print ""
1093 fora=1to3:printtab(8);" ":next
1095 print tab(9);"[145][145]press 'return' for menu"
1100 gosub1700:ifn$(1)=""then110
1109 c$=""
1110 print"":for a=1to 18:print:next:printtab(9);" "
1112 print tab(11);"[145]any changes [y/n]"
1115 get c$:ifc$="" then 1115
1116 if c$="n" then 1800
1120 ifc$="y" then gosub 1850:goto 1110
1125 if c$<>"n" or c$<>"y" then 1115
1130 goto1110
1700 forl=1to8:n$(l)="":nextl:ifdf=1then21000
1701 print "":print tab(14);"";nn+1
1702 n$(1)=""
1705 input"";n$(1)
1709 ifn$(1)=""thenreturn
1710 input"";n$(2):ifn$(2)=""thenn$(2)="none"
1711 input"";n$(3):ifn$(3)=""thenn$(3)="none"
1712 input"";n$(4):ifn$(4)=""thenn$(4)="none"
1713 input"";n$(5):ifn$(5)=""thenn$(5)="none"
1715 input"";n$(6):ifn$(6)=""thenn$(6)="none"
1717 input"";n$(7):ifn$(7)=""thenn$(7)="none"
1719 input"";n$(8):ifn$(8)=""thenn$(8)="none"
1720 ifdf=0then1729
1726 i=dl(vj):fory=1tonn:ifsq(y)=ithen1730
1727 nexty
1729 i=nn+1:nn=nn+1
1730 return
1800 print"[147]":printtab(15)"working.......":gosub300:ifvj=-1thenvj=0
1810 dl(vj)=0:vj=vj-1:ifvj=0thendf=0
1821 fore=1to250:next:goto110
1850 print tab(11);"[145] "
1852 print tab(12);"[145]which line [2-9]";:input c:ifc<2orc>9thenprint:goto 1852
1855 on c gosub 6000,6100,6200,6300,6400,6500,6600,6700,6800
1860 return
2000 rem change/inquire rtn.
2010 print"[147]":poke 53280,6:poke 53281,1:cg=1
2015 print "[145] [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174] "
2020 print "[145] [221] change[206]inquire [221] "
2025 print "[145] [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189] "
2030 print "[145] "
2035 print "[145] "
2040 print " 1.[146] rec-#-->";" ";0
2050 print " 2.[146] l.name[195]>"
2055 print " 3.[146] f.name[195]>"
2060 print " 4.[146] addre[195][195]>"
2065 print " 5.[146] addre2[195]>"
2070 print " 6.[146] city[195][195][195]>"
2080 print " 7.[146] state[195][195]>"
2090 print " 8.[146] zip[195][195][195][195]>"
2095 print " 9.[146] tele[195][195][195]>"
2096 print ""
2097 fora=1to3:printtab(8);" ":next
2098 print tab(13);"[145][145]enter 0 for menu"
2100 input"";i:ifi<0ori>1024then2100
2105 ifi=0thencg=0:goto110
2110 gosub400:iffl=1thenfl=0:goto2100
2115 print""
2120 forl=1to8
2125 print"";n$(l)
2130 next
2140 forii=1 to 7:print:nextii
2210 print tab(12);"any changes ? [y/n]"
2212 get c$:if c$="" then 2212
2213 if c$="n" then 2300
2214 ifc$="y"thengosub1850:goto2210
2215 if c$<>"y" or c$<>"n" then 2212
2220 goto2210
2300 rem
2305 print tab(11);"[145][145]press 'f1' to cont"
2310 print tab(11);"press 'f3' to record"
2312 print tab(11);"press 'f7' to exit"
2315 getq$:ifq$=""then2315
2320 ifq$="[133]"then2000
2322 ifq$="[136]"thencg=0:goto110
2325 ifq$="[134]"then gosub 300:goto2000
2330 goto2315
3000 rem print rtn.
3005 print"[147]"
3010 printtab(14)"print labels"
3015 printtab(14)"************"
3020 printtab(3)"enter 0 to return to return to menu"
3021 input"on sort 1/yes 0/no";fg
3022 print"enter -1 for all"
3025 input"starting rec-#";ss
3026 ifss=0then110
3027 ifss=-1thened=nn:ss=1:goto3031
3030 input" ending rec-#";ed:ifed>nnthened=nn
3031 ky$="":fv$=""
3035 input" keyed field";ky$:ifky$=""then3110
3040 input" field value";fv$
3045 gosub13000:ifck=1then3000
3110 print"set top of form"
3111 print"when done enter 'p' to print"
3112 print"enter 'q' to quit"
3113 print"enter 'b' to stop printing"
3118 open3,4
3119 cmd3:print#3," "
3120 getw$:ifw$=""then3120
3125 ifw$="q"thenclose3:goto110
3130 ifw$<>"p"then3120
3135 foru=sstoed:i=u:iffg=1theni=sq(u)
3136 getw$:ifw$="b"then3170
3140 gosub400:iffl=1thenfl=0:goto3165
3141 iffv$=""then3145
3142 ifn$(c)<>fv$then3165
3145 print#3,n$(2);" ";n$(1)
3150 print#3,n$(3)
3155 print#3,n$(5);" ";n$(6);" ";n$(7)
3160 print#3:print#3:print#3
3165 next
3170 print#3," ":close3
3175 print"labels printed"
3180 print"enter c to return to menu"
3185 getw$:ifw$=""then3185
3190 goto 110
4000 rem delete rtn.
4001 print"[147]":poke 53280,6:poke 53281,0
4002 ifvj=50then110
4005 print tab(10)"[158][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
4006 print tab(10)"[221] * delete name * [221]"
4010 print tab(10)"[158][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
4011 for a=1 to 17:print:next a
4012 printtab(12)"enter 0 for menu"
4015 input"enter record number";i
4020 ifi<0ori>750then4000
4025 ifi=0then110
4030 gosub400:iffl=1thenfl=0:goto4000
4035 print"[158]name ";"";n$(2)+" "+n$(1)
4040 print"[158]addre ";"";n$(3)
4045 input"[158]correct person (y-n)";q$
4050 ifq$="n"then4000
4055 ifq$<>"y"then4045
4060 input"[158][145]delete this person(y-n)";y$
4065 ify$="n"then4000
4070 ify$<>"y"then4060
4071 df=1
4072 vj=vj+1
4073 dl(vj)=i
4075 print"[145] person deleted!!![146] "
4076 fory=1tonn
4077 ifsq(y)=ithensr$(y)="**********":sf$(y)="**********":goto4080
4078 nexty
4080 d$="[255]"
4085 r1=i:r2=0:ifr1>255thenr2=int(r1/256):r1=r1-(256*r2)
4090 print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(1)
4095 print#2,d$
4100 print"[145]enter c to continue "
4105 getw$:ifw$=""then4105
4110 ifw$<>"c"then4105
4115 goto4000
5000 print#1,"p"chr$(3)chr$(0)chr$(3)chr$(1)
5001 nn$=str$(nn)
5002 print#2,nn$
5010 close2:close1:print chr$(147):poke 53280,14:poke 53281,6:end
6000 input"";i:ifi<0ori>1024then6000
6010 return
6100 input"";n$(1):x=14:gosub 6900:return
6200 input"";n$(2):x=13:gosub 6900:return
6300 input"";n$(3):x=12:gosub 6900:return
6400 input"";n$(4):x=11:gosub 6900:return
6500 input"";n$(5):x=10:gosub 6900:return
6600 input"";n$(6):x=9:gosub 6900:return
6700 input"";n$(7):x=8:gosub 6900:return
6800 input"";n$(8):x=7:gosub 6900:return
6900 forii=1 to x:print:nextii:return
7000 rem error check rtn.
7005 input#1,en,em$,et,es
7010 ifen=50thenstop
7015 ifen=0thenreturn
7020 print"[147]":print"error status"
7025 print"";en;em$;et,es
7030 print"please check the error"
7035 print"execution termanated"
7040 close2:close1:stop
8000 rem
8005 print"[147]":cn=0
8010 printtab(8)"print general list"
8015 printtab(8)"******************"
8020 printtab(3)"enter 0 to return to return to menu"
8021 input"on sort 1/yes 0/no";fg
8022 print"enter -1 for all"
8024 ky$="":fv$=""
8025 input"starting rec-#";ss
8026 ifss=0then110
8027 ifss=-1thened=nn:ss=1:goto8031
8030 input" ending rec-#";ed:ifed>nnthened=nn
8031 input" keyed field";ky$:ifky$=""then8110
8032 input" field value";fv$
8045 gosub13000:ifck=1then8000
8110 print"set top of form"
8112 print"when done enter 'p' to print"
8113 print"enter 'q' to quit"
8114 print"enter 'b' to stop printing"
8118 open3,4
8119 cmd3:print#3," "
8120 getw$:ifw$=""then8120
8125 ifw$="q"then110
8130 ifw$<>"p"then8120
8132 print#3,"rec# name: address: city:";
8133 print#3," st: zip:"
8134 print#3:print#3
8135 foru=sstoed:i=u:iffg=1theni=sq(u)
8136 getw$:ifw$="b"then8170
8140 gosub400:iffl=1thenfl=0:goto8165
8141 iffv$=""then8143
8142 ifn$(c)<>fv$then8165
8143 gosub 9000
8144 print#3,a$spc(q(6))b$(1)spc(q(7))b$(2)spc(q(8))b$(3)spc(q(9))b$(4);
8145 print#3,spc(q(10))b$(5)
8146 cn=cn+1
8165 next
8166 print#3,"number of persons printed:";cn
8170 print#3," ":close3
8175 print"labels printed"
8180 print"enter c to return to menu"
8185 getw$:ifw$=""then3185
8190 goto 110
9000 a$=str$(i)
9010 b$(1)=n$(1)+" "+n$(2):b$(2)=n$(3):b$(3)=n$(5):b$(4)=n$(6):b$(5)=n$(7)
9020 l1=len(a$):q(6)=q(0)-l1
9030 forx=1to5
9042 iflen(b$(x))>q(x)thenb$(x)=left$(b$(x),q(x)-1)
9043 l1=len(b$(x))
9050 q(6+x)=q(x)-l1:next:return
10000 rem
10005 print"[147]":poke 53280,0:poke 53281,3
10010 print tab(10)"[144][213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
10012 print tab(10);"[144] * printer options * "
10015 print tab(10)"[144][202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
10016 for i=1 to 5:print:next
10017 printtab(11)"[0][146] return to menu"
10020 print tab(11);"[1][146] mailing labels"
10030 print tab(11);"[2][146] mailing list"
10035 for i=1 to 6:print:next
10040 printtab(11)"your choice [0-2]"
10045 getm$:ifm$=""then10045
10050 m=val(m$)
10051 ifm=0then110
10052 ifm<1orm>2then10045
10055 on m goto 3000,8000
11000 r1=i:r2=0:ifr1>255thenr2=int(r1/256):r1=r1-(256*r2)
11005 print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(1)
11010 get#2,z$:ifz$="[255]"thenfl=1:goto11050
11012 print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(1)
11015 input#2,sr$(i)
11020 print#1,"p"chr$(3)chr$(r1)chr$(r2)chr$(14)
11022 input#2,sf$(i):return
11050 sr$(i)="**********":sf$(i)="**********":df=1:vj=vj+1:dl(vj)=i:return
12000 print"[147]":poke 53280,2:poke 53281,1
12005 printtab(9)"[213][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
12006 printtab(9)"[221] * search[206]scroll * [221]"
12007 printtab(9)"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]":print:print
12008 printtab(7)"press f1[146] to slow scroll"
12009 printtab(7)"press f2[146] to return scroll"
12010 printtab(7)"press f3[146] to leave scroll"
12011 printtab(7)"press f7[146] to stop scroll"
12012 printtab(7)"press f8[146] to continue scroll"
12013 print:print
12014 print tab(13)"[0][146] for menu"
12017 print tab(13)"[1][146] for search"
12018 print tab(13)"[2][146] for scroll"
12019 input"your choice";m:ifm=2then12025
12020 ifm=0then110
12021 input"last name [146]";h$
12022 input"first name [146]";h1$:print"[147]":goto22000
12025 print"[147]":for a=1 to 8:print:next a
12050 fori=1tonn
12051 geta$:ifa$="[136]"then12100
12052 ifm=2then12200
12055 ifh$=sr$(i)then print tab(13);sr$(i);sq(i):goto12070
12058 ifm=1then12063
12059 forx=1to75:nextx
12060 gosub20000
12061 ifa$="[134]"then110
12062 iffp=1andm=2thenfore=1to400:next
12063 nexti:ifm=2then12070
12065 print"person not found"
12070 print:print tab(13);"continue y/n"
12075 getm$:ifm$=""then12075
12080 ifm$="y"then12000
12081 ifm$<>"n"then12075
12085 goto110
12100 print
12110 geta$:ifa$="[140]"then12052
12112 ifa$="[134]"then110
12115 goto12110
12200 zj=len(str$(sq(i))):z1=4-zj:printtab(8)sq(i)spc(z1)sr$(i);" ";sf$(i)
12201 goto12060
13000 rem
13001 ck=0
13015 ifky$="city"thenc=5:goto13030
13020 ifky$="state"thenc=6:goto13030
13025 ifky$="zip"thenc=7:goto13030
13026 ck=1
13030 return
14000 rem
14010 print"[147]":poke 53280,14:poke 53281,1
14015 for a=1 to 6:print:next a
14020 printtab(13)"[144]s o r t i n g"
14030 printtab(13)"[156][168][168][168][168][168][168][168][168][168][168][168][168][168]"
14040 fory=1tonn:hy$=sr$(y)
14041 print"";y
14050 forzz=ytonn
14060 ifsr$(zz)=<hy$thenhy$=sr$(zz):qq=zz
14070 nextzz
14080 sr$(qq)=sr$(y):sr$(y)=hy$
14081 vz=sq(qq):sq(qq)=sq(y):sq(y)=vz
14082 h2$=sf$(qq):sf$(qq)=sf$(y):sf$(y)=h2$
14085 nexty
14090 goto110
20000 rem
20010 ifa$="[133]"thenfp=1:return
20015 ifa$="[137]"thenfp=0:return
20020 return
21000 print "";tab(14);dl(vj):goto 1702
22000 rem
22001 y=1:z=nn
22010 ify<=zthengoto22100
22020 goto12065
22100 r=int((y+z)/2)
22110 ifh$=sr$(r)andh1$=sf$(r)then22140
22120 ifh$=<sr$(r)thenz=r-1:goto22010
22130 ifh$=>sr$(r)theny=r+1:goto22010
22140 print:print:print tab(13);sf$(r);" ";sr$(r);sq(r):goto12070
23000 poke si+5,8:poke si+6,255:poke si+4,33
23010 for a=15 to 1 step -.5:poke si+1,16:poke si,195:pokesi+24,a:next a
23020 poke si+4,16:poke si+1,0:poke si,0:return
23050 poke si+5,8:poke si+6,255:poke si+4,33
23060 for a=15 to 1 step -.5:poke si+1,22:poke si,96:pokesi+24,a:next a
23070 poke si+4,16:poke si+1,0:poke si,0:return
25000 print "[147]":poke 53280,0:poke 53281,0:l=21
25005 si=54272:for sn=0 to 24:poke si+sn,0:next:print ""
25010 for a=1 to 7:read ch$:ch=asc(ch$)
25020 print chr$(ch);" [146] [146] [146] [146] [223][146] [169] [223][146] [223][169] [146] [169] [223][146] [146] "
25030 print " [146] [146] [146] [146] [146][169] [184] [146] [146] [146] [184] [146] [146] "
25040 print " [223] [146][169] [146] [146] [146][223][223][146] [146] [146] [146] [146] [146] [146] [146] "
25045 gosub 25300
25050 for d=1 to 70:next d:next a
25055 for d=1 to 100:next d
25060 print "":print "[145][145][145]":sn=60:for a=1 to 18:gosub 25350
25070 print " ":next a:print:print
25080 sn=50:for a=1 to l:print:gosub 25400:next a
25090 ct=ct+1:if ct=2 then l=18
25095 if ct=3 then 25110
25100 restore:goto 25005
25110 print "":for l=1 to 12:print:next l:for d=1 to 200:next d
25120 msg$=" designed by..."
25130 m$=right$(msg$,len(msg$)-1):c$=m$+left$(msg$,1)
25140 gosub 25450:print "[145][158]";left$(c$,40);:msg$=c$
25150 for d=1 to 150:next d:msg=msg+1:if msg=26 then 25170
25160 goto 25130
25170 p=55896:c=1624:for a=5 to 35:cl=int(rnd(1)*8)+2:poke p+a,cl:next
25180 for a=1 to 16:read n:b=b+1:poke c+11+b,n:if n<>32 then gosub 25500
25185 for d=1 to 75:next d:next a
25190 for d=1 to 500:next d:print "[158]";tab(19)"and":gosub 25600
25195 for d=1 to 400:next d
25200 p=56056:c=1784:for a=5 to 35:cl=int(rnd(1)*8)+2:poke p+a,cl:next
25210 b=0:for a=1 to 18:read n:b=b+1:poke c+11+b,n:if n<>32 then gosub 25500
25215 for d=1 to 75:next d:next a
25220 for d=1 to 400:next d
25225 print " insert data disk...press f1 to start"
25230 get a$:if a$="[133]" then 25250
25240 cl=int(rnd(1)*9)+2:poke 53280,cl:for d=1 to 300:next d:goto 25230
25250 return
25300 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,33
25310 forsn=50 to 100 step 5:pokesi,sn-40:pokesi+1,sn:next sn
25320 poke si+4,16:poke si,0:poke si+1,0:return
25350 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,33
25360 sn=sn-3:poke si,sn:poke si+1,sn+100
25370 poke si+4,16:poke si,0:poke si+1,0:return
25400 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,33:poke si,30
25410 sn=sn+5:poke si+1,sn
25420 poke si+4,16:poke si,0:poke si+1,0:return
25450 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,129
25460 poke si,3:poke si+1,35:for d=1 to 25:next d
25470 poke si+4,16:poke si,0:poke si+1,0:return
25500 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,17
25510 sn=int(rnd(1)*100)+25:poke si,sn:poke si+1,sn
25520 poke si+4,16:poke si,0:poke si+1,0:return
25600 poke si+5,143:poke si+6,255:poke si+24,15:poke si+4,129
25610 poke si,2:poke si+1,25:for d=1 to 35:next d
25620 poke si+4,16:poke si,0:poke si+1,0:return
26000 data "[159]","[154]","","[156]","","[150]","[158]"
26010 data 10,32,15,32,5,32,32,6,32,21,32,19,32,3,32,15
26020 data 2,32,15,32,2,32,32,12,32,12,32,15,32,18,32,5,32,20