home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Software
/
FLY-MILES
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
5KB
|
162 lines
140 CLR:POKE53280,11:POKE53281,9:POKE646,7:PRINTCHR$(147)
150 PRINT" [195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195] "
160 PRINT" ONE MOMENT PLEASE..READING CITY DATA"
170 PRINT" [195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195] ":GOSUB740
180 PRINTCHR$(147)
190 PRINT" [213][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][201] "
200 PRINT" [194] AIR MILES [194] "
210 PRINT" [194] [194] "
220 PRINT" [194] [1] VIEW LIST OF CITIES [194] "
230 PRINT" [194] [194] "
240 PRINT" [194] [2] FIND DISTANCE BETWEEN CITIES [194] "
250 PRINT" [194] [194] "
260 PRINT" [194] [3] EXIT PROGRAM [194] "
270 PRINT" [194] [194] "
280 PRINT" [194] SELECT 1 - 3 [194] "
290 PRINT" [202][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][203] "
300 GOSUB600
310 GETMS$:IFMS$=""THEN310
320 MS=VAL(MS$):IFMS<1ORMS>3THEN310
330 ONMSGOTO1450,360,350
340 GOTO310
350 PRINT"[147]":END
360 R=3963.34:GOSUB600
370 INPUT" NAME OF 1ST CITY";C1$:GOSUB620:GOSUB480:Y1=RA:D1=V
380 IFV$=""THEN1610
390 GOSUB650:GOSUB480:X1=RA:D2=V:GOSUB600
400 INPUT" NAME OF 2ND CITY";C2$:GOSUB680:GOSUB480:Y2=RA:D3=V
410 IFV$=""THEN1610
420 GOSUB710:GOSUB480:X2=RA:D4=V
430 IFD1<>D3THENY2=-Y2
440 IFD2<>D4THENX2=-X2
450 A=SIN(Y1):B=SIN(Y2)
460 C=COS(Y1):D=COS(Y2):E=COS(X2-X1)
470 GOTO500
480 DD=M/60+D:RA=DD/57.2957795
490 RETURN
500 F=(A*B)+(C*D*E)
510 FF=-ATN(F/SQR(-F*F+1))+((null)/2):D=R*FF:D%=D
520 PRINT:PRINT"[145][145][145][145] THE DISTANCE BETWEEN ":PRINT
530 PRINT" "C1$ " AND "C2$" ":PRINT" "
540 PRINT" IS.....";D%;" MILES.":PRINT
550 PRINT" [195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195] "
560 PRINT" PRESS SPACE BAR FOR MENU":GOSUB600
570 GETAN$:IFAN$=""THEN570
580 IFASC(AN$)=32THENPRINT"[147]":GOTO190
590 GOTO570
600 GETKB$:IFKB$<>""THEN600
610 RETURN
620 FORJ=1TOQNSTEP7
630 IFC1$=C$(J)THEND$=C$(J+1):GOSUB2000:RETURN
640 NEXT:V$="":RETURN
650 FORJ=1TOQNSTEP7
660 IFC1$=C$(J)THEND$=C$(J+4):GOSUB2100:RETURN
670 NEXT:RETURN
680 FORJ=1TOQNSTEP7
690 IFC2$=C$(J)THEND$=C$(J+1):GOSUB2200:RETURN
700 NEXT:V$="":RETURN
710 FORJ=1TOQNSTEP7
720 IFC2$=C$(J)THEND$=C$(J+4):GOSUB2300:RETURN
730 NEXT:RETURN
740 DIMC$(532)
750 FORJ=1TO532:READA$:C$(J)=A$:NEXT:QN=J-1:RETURN
760 DATA ALBUQUERQUE,35,0,N,106,9,W
770 DATA AMSTERDAM,53,23,N,4,54,E
780 DATA ANTWERP,51,13,N,4,25,E
790 DATA ATHENS,37,58,N,23,46,E
800 DATA ATLANTA,33,50,N,84,24,W
810 DATA BALTIMORE,39,18,N,76,37,W
820 DATA BELFAST,54,35,N,5,56,W
830 DATA BELGRADE,44,50,N,20,37,E
840 DATA BERLIN,52,32,N,13,24,E
850 DATA BOSTON,42,20,N,71,0,W
860 DATA BUENOS AIRES,34,30,S,58,20,W
870 DATA BUFFALO,42,55,N,78,50,W
880 DATA CAIRO,30,1,N,31,14,E
890 DATA CAPE TOWN,33,56,S,18,28,E
900 DATA CARACAS,10,30,N,66,50,W
910 DATA CHICAGO,41,45,N,87,40,W
920 DATA CINCINNATI,39,10,N,84,26,W
930 DATA COLUMBUS,38,57,N,83,1,W
940 DATA CLEVELAND,41,28,N,81,43,W
950 DATA DALLAS,32,47,N,96,48,W
960 DATA DENVER,39,43,N,105,1,W
970 DATA DETROIT,42,20,N,83,3,W
980 DATA DUBLIN,53,20,N,6,15,W
990 DATA ERIE,42,10,N,80,7,W
995 DATAEUGENE OR,44,04,N,123,04,W
1000 DATA FAIRBANKS,64,59,N,147,40,W
1010 DATA GENEVA,46,12,N,6,9,E
1020 DATA GREENSBORO,36,7,N,79,46,W
1030 DATA HARTFORD,41,47,N,72,41,W
1040 DATA HONG KONG,22,11,N,114,14,E
1050 DATA HONOLULU,21,19,N,157,52,W
1060 DATA HOUSTON,29,50,N,95,20,W
1070 DATA INDIANAPOLIS,39,42,N,86,10,W
1080 DATA ISTANBUL,41,0,N,29,0,E
1090 DATA JERUSALEM,31,47,N,35,10,E
1100 DATA JOHANNESBURG,26,10,S,28,8,E
1110 DATA KALAMAZOO,42,20,N,85,35,W
1115 DATAKANSAS CITY MO,39,06,N,94,34,W
1120 DATA KATMANDU,27,45,N,85,12,E
1130 DATALAS VEGAS,36,10,N,115,5,W
1140 DATALISBON,39,0,N,9,12,W
1150 DATALONDON,15,30,N,0,5,W
1160 DATALOS ANGELES,34,0,N,118,10,W
1170 DATAMEXICO CITY,19,20,N,99,10,W
1180 DATAMIAMI,25,52,N,80,15,W
1190 DATAMINNEAPOLIS,44,58,N,93,20,W
1200 DATAMONTREAL,45,30,N,73,34,W
1210 DATAMOSCOW,55,45,N,37,35,E
1220 DATANEW ORLEANS,30,0,N,90,5,W
1230 DATANEW YORK,40,45,N,74,0,W
1240 DATAOKLAHOMA CITY,35,25,N,97,30,W
1250 DATAOMAHA,41,15,N,96,0,W
1260 DATAPARIS,48,50,N,2,20,E
1270 DATAPHILADELPHIA,40,0,N,75,10,W
1280 DATAPITTSBURGH,40,25,N,79,55,W
1290 DATAPHOENIX,33,30,N,112,10,W
1300 DATAPROVIDENCE,41,41,N,71,15,W
1310 DATAQUEBEC,46,52,N,71,13,W
1320 DATARENO,39,30,N,119,0,W
1330 DATARICHMOND,37,3,N,77,27,W
1340 DATARIO DE JANEIRO,23,0,S,43,12,W
1350 DATAROME,41,54,N,12,30,E
1355 DATASACRAMENTO,38,35,N,121,29,W
1360 DATASAN FRANCISCO,37,35,N,122,30,W
1365 DATASAN ANDREAS,38,11,N,120,40,W
1370 DATASEATTLE,47,41,N,122,15,W
1375 DATASALEM OR,44,56,N,123,02,W
1377 DATASTOCKTON,37,57,N,121,17,W
1380 DATAST. LOUIS,38,40,N,90,20,W
1390 DATASPOKANE,47,45,N,117,25,W
1400 DATATAMPA,27,57,N,82,30,W
1410 DATATOKYO,35,45,N,139,45,E
1420 DATATORONTO,43,39,N,79,20,W
1430 DATATUCSON,32,14,N,110,59,W
1435 DATAVANCOUVER WA,45,37,N,122,40,W
1440 DATAWASHINGTON,38,52,N,77,0,W
1450 PRINT"[147] PRESS RETURN [146] TO SCROLL"
1460 PRINT" PRESS SPACE BAR[146] FOR MENU"
1465 PRINT:PRINT TAB(7)"[207][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][208]"
1470 POKE650,255:FORX=1TOQNSTEP7
1480 PRINTTAB(7)"[180]"TAB(13)C$(X)TAB(32)"[170]"
1490 FORT=1TO50:NEXT
1500 GETPN$:IFPN$=""THEN1500
1510 IFPN$=CHR$(13)THEN1540
1520 IFPN$=CHR$(32)THENX=QN:GOTO180
1530 IFPN$<>CHR$(13)ORPN$<>CHR$(32)THEN1500
1540 NEXT
1550 PRINTTAB(7)"[204][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][186]"
1560 PRINT" PRESS SPACE BAR FOR MENU"
1570 GOSUB600
1580 GETPN$:IFPN$=""THEN1580
1590 IFPN$=CHR$(32)THENPOKE650,0:GOTO180
1600 GOTO1580
1610 PRINT" NOT ON LIST. CHECK MENU ITEM 1."
1620 FORT=1TO1500:NEXT:PRINT"[147]":GOTO190
2000 M$=C$(J+2):V$=C$(J+3):D=VAL(D$):M=VAL(M$):V=ASC(V$):J=QN:RETURN
2100 M$=C$(J+5):V$=C$(J+6):D=VAL(D$):M=VAL(M$):V=ASC(V$):J=QN:RETURN
2200 M$=C$(J+2):V$=C$(J+3):D=VAL(D$):M=VAL(M$):V=ASC(V$):J=QN:RETURN
2300 M$=C$(J+5):V$=C$(J+6):D=VAL(D$):M=VAL(M$):V=ASC(V$):J=QN:RETURN