home *** CD-ROM | disk | FTP | other *** search
- 10 rem area code finder
- 15 rem by
- 20 rem mike cooke
- 25 rem
- 30 rem
- 35 rem
- 40 rem
- 50 rem
- 55 poke53280,0:poke53281,0
- 56 printchr$(8)chr$(14)
- 60 print"[147][152] [146]"
- 63 print" [146] [146]"
- 64 print" [146] [158][193]rea [195]ode [198]inder[152] [146]"
- 65 print" [146] [146]"
- 66 print" [146]"
- 69 goto100
- 70 rem *** clear space ***
- 73 print"":fort=1to18:print" ":next
- 74 print"":return
- 75 rem *** press a key ***
- 76 print"[150] press <[211][208][193][195][197]>[150] to continue"
- 77 getsp$:ifsp$=""then77
- 78 ifsp$<>" "then77
- 79 return
- 80 rem *** input routine ***
- 81 poke204,0:cn=0:ii$="":i$=""
- 82 cn=cn+1
- 83 geti$:ifi$=""then83
- 84 if i$="[140]" then 455
- 85 ifi$=chr$(13)thenprint" ";:poke204,1:return
- 87 ifi$=chr$(20)andcn>1thencn=cn-2:ii$=left$(ii$,cn):printchr$(20);:i$="":goto82
- 88 if cn=26 then 83
- 89 ifi$<>" "andi$<"0"ori$>"z"then83
- 92 ifcn=1and i$<>" "thenprintchr$(asc(i$)+32);:goto95
- 93 ifright$(ii$,1)=" "and i$<>" "thenprintchr$(asc(i$)+32);:goto95
- 94 printi$;
- 95 ii$=ii$+i$:i$="":goto82
- 100 rem *** instructions ***
- 101 print"[154] [215]ritten by [205]ike [195]ooke"
- 102 print" (c) [195]opyright 1987"
- 103 print" [208]ublished by [211]oftdisk [208]ublishing, [201]nc."
- 105 print" [159][196]o you want instructions? (y/n)? ";
- 110 getyn$:ifyn$=""then110
- 115 ifyn$="n"then200
- 116 ifyn$<>"y"then110
- 117 gosub70
- 118 print"[152] [212]his program's purpose is to give"
- 119 print"you the area code for a city or state."
- 120 print"[212]o use it, simply choose the area of"
- 121 print"[206]orth [193]merica that you need and then"
- 122 print"enter the state/province that you want"
- 123 print"the area code of. [201]n those places"
- 124 print"that have more than one code in them,"
- 125 print"you must enter the name of the city"
- 126 print"you want. [201]t is then compared"
- 127 print"with the data on the disk for that"
- 128 print"state/province. [201]n later issues of"
- 129 print"[213]p[212]ime, there will be bonus files that"
- 130 print"can be used with this program but that"
- 131 print"have many[152] more cities for each state."
- 132 gosub75:gosub70
- 133 print" [152][201]nstead of entering the full name"
- 134 print"of a state or province, you may enter"
- 135 print"their postal code. [198]or example, instead"
- 136 print"of typing [211][193][211][203][193][212][195][200][197][215][193][206], you may enter"
- 137 print"[211][203]. [207]ne note about [206]ew [217]ork [195]ity, it"
- 138 print"isn't in file--you must enter the name"
- 139 print"of the island you want, such as, [194]ronx"
- 140 print"[194]rooklyn, [205]anhattan, [209]ueens, or [211]taten"
- 141 print"[201]s."
- 150 gosub75:gosub70:goto100
- 200 rem *** menu ***
- 205 gosub70:print"[155] [205]ain [205]enu":print:print
- 207 printtab(10)"[155]1) [152][213]nited [211]tates/[195]anada":print
- 209 printtab(10)"[155]2) [152][195]aribbean [201]slands":print
- 211 printtab(10)"[155]3) [152][205]exico":print
- 212 printtab(10)"[155]4) [152][213]p[212]ime [204]and":print:print
- 215 printtab(14)"[155][217]our choice? ";
- 217 getyn$:ifyn$=""then217
- 218 ifval(yn$)<1orval(yn$)>4then217
- 219 printyn$
- 220 onval(yn$)goto250,350,400,450
- 250 rem *** us or canada ***
- 255 gosub70:print"[155] [213]nited [211]tates/[195]anada":print:print
- 256 print"[151] [208]ress <[210][197][212][213][210][206]> for [205]ain [205]enu":print
- 257 s$="":print"[152] [211]tate: ";:gosub80:s$=ii$:print:print:ifs$=""then200
- 259 print" [211]earching...";
- 262 open15,8,15:open1,8,2,"states,s,r":input#15,a,b$
- 265 ifa<20then269
- 266 print"[196][201][211][203][160][197][210][210][207][210]!!!":print:printtab(10)"[152][208]lease check drive"
- 267 printtab(10)"and correct error.":gosub75:close1:close15:goto250
- 269 input#1,a$:a$=""
- 270 fort=1to60:input#1,a$:ifleft$(a$,2)=s$ormid$(a$,4,(len(a$)-7))=s$then275
- 271 nextt:print"[211]tate not found":close1:close15:gosub75:goto250
- 275 close1:close15:print"[198]ound ";:print"[152]";chr$(asc(mid$(a$,4,1))+32);
- 276 fort=5to(len(a$)-4):ifmid$(a$,t-1,1)=" "thenprintchr$(asc(mid$(a$,t,1))+32);
- 277 ifmid$(a$,t-1,1)<>" "thenprintmid$(a$,t,1);
- 278 nextt:print:print
- 279 ifval(right$(a$,3))=0then285
- 280 printtab(7)"[193]ll points: [150]";right$(a$,3):gosub75:goto250
- 285 print" [152][212]his state requires a city"
- 286 print" name. [215]ill you be using"
- 287 print" an [155][207]riginal[152] or [155][194]onus[152] file?"
- 288 print" (o/b)? ";
- 289 getyn$:ifyn$=""then289
- 290 ifyn$="o"thenprint"[155][207]riginal.":goto300
- 291 ifyn$<>"b"then289
- 292 print"[155][194]onus.":fort=1to500:next:print"[145][145][145][145][145]"
- 293 fort=1to4:print" ":next:print"[145][145][145][145][145][145]"
- 296 print:print" [201]nsert disk with [194]onus file.":gosub75
- 297 print"[145][145][145][145]"
- 298 fort=1to3:print" ":next:print"[145][145][145][145]"
- 299 goto310
- 300 fort=1to500:next:print"[145][145][145][145][145]"
- 302 fort=1to4:print" ":next:print"[145][145][145][145][145]"
- 310 print" [152][195]ity: [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";:gosub80
- 311 c$=ii$:ifc$=""then200
- 312 print:print:print" [211]earching...";
- 314 open15,8,15:open1,8,2,left$(a$,2)+",s,r":input#15,a,b$:ifa<20then320
- 315 print"[196][201][211][203] [197][210][210][207][210]!!!":printtab(10)"[152]please check drive":close1:close15
- 316 printtab(10)"and correct error.":gosub75
- 317 print"[145][145][145][145][145][145][145]":fort=1to6:print" "
- 318 nextt:print"[145][145][145][145][145][145][145][145]":goto310
- 320 input#1,ct:fort=1toct:input#1,a$:ifc$=left$(a$,(len(c$)))then324
- 321 nextt:print"[195]ity not found":close1:close15:gosub75:ifyn$="b"then331
- 322 goto250
- 324 close1:close15:print"[198]ound ";:print"[152]";chr$(asc(mid$(a$,1,1))+32);
- 325 fort=2to(len(a$)-4):ifmid$(a$,t-1,1)=" "thenprintchr$(asc(mid$(a$,t,1))+32);
- 326 ifmid$(a$,t-1,1)<>" "thenprintmid$(a$,t,1);
- 327 nextt:print:print
- 329 print"[152] [193]rea code is: [150]";right$(a$,3)
- 330 gosub75:ifyn$="o"thengoto250
- 331 gosub70:print"[155] [210]e-insert original program disk.":gosub75:goto250
- 350 rem *** caribbean is. ***
- 355 gosub70:print"[155] [195]aribbean [201]s.":print:print:print
- 360 print"[152] [208]uerto [210]ico: [150]809":print
- 365 print"[152] [214]irgin [201]s.: [150]809":print:print
- 370 gosub75:goto200
- 400 rem *** mexico ***
- 405 gosub70:print"[155] [205]exico":print:print:print
- 410 print"[152] [205]exico [195]ity: [150]905"
- 415 print:print"[152] [193]ll other points: [150]706":print:print
- 420 gosub75:goto200
- 450 rem *** uptime land ***
- 455 poke204,1:sys(8*4096)+4
-