Home » CEEFAX disks » telesoftware1.adl » General/SUN

General/SUN

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » CEEFAX disks » telesoftware1.adl
Filename: General/SUN
Read OK:
File size: 2883 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM SUN2, for 1987
   20REM (c) D.J.Aldous. September 1986.
   30 MODE7
   40VDU12,23;8202;0;0;0;:REM Cursor off
   50 REM Title routine, 3 seconds
   60tim = TIME+300
   70REPEAT PRINTTAB(14,12);CHR$131;CHR$141;"S U N":PRINTTAB(14,13);CHR$131;CHR$141;"S U N"
   80PRINTTAB(10,16);CHR$134;"by  D.J. Aldous"
   90UNTIL TIME>tim
  100CLS
  110 
  120 REM Programme description
  130 TITLE$ = "SUNRISE:SUNSET"
  140PRINTTAB(18-(LEN(TITLE$)/2),1);CHR$131;TITLE$
  150 PRINT'
  160 F$= "This program computes the times of Sunrise and Sunset in GMT and local time, for any chosen location in the world, on any day during the year 1987."
  170 length = 39
  180 PROCword_print(F$,length)
  190 PRINT'
  200 F$= "You are asked to enter the latitude and longitude of the location, the date, and the adjustment for local time with respect to GMT."
  210 PROCword_print(F$,length)
  220 PRINT'
  230 F$="Latitudes North are positive, South are negative. Longitudes West are positive, East are negative. Locations East of UK are ahead of GMT (positive), West are behind (negative)."
  240 PROCword_print(F$,length)
  250 PRINT'
  260 F$="Examples are provided, and may be run automatically. Please change them if you wish !"
  270 PROCword_print(F$,length)
  280 PRINT'
  290PROC_continue
  300 D1%=0 : M1%=0 : D2%=0 : M2%=0 : L%=0 : G%=0 : answer$="" : G$="" : try$="" : month$="" : day$="" : date$=""
  310 
  320 VDU23;29194;0;0;0;:REM Cursor on
  330 REPEAT
  340 PRINT'
  350 F$="Would you like some examples of location - latitude, longitude and local time ?"
  360 PROCword_print(F$,length)
  370 PRINTTAB(8,23);CHR$(130);"Please enter Y or N ";
  380 answer$=GET$
  390 UNTIL answer$="Y" OR answer$="y" OR answer$="N" OR answer$="n"
  400 IF answer$="N" OR answer$="n" THEN GOTO 710
  410 PROC_examples
  420REPEAT
  430PRINT'CHR$(130);"Like to try one of these ? (Y/N) ";
  440 try$=GET$
  450UNTIL try$="Y" OR try$="y" OR try$="N" OR try$="n"
  460 IF try$="N" OR try$="n" THEN GOTO 710
  470 REPEAT
  480 PRINT''CHR$(130);"Please enter your chosen letter ";
  490 G%=GET AND 223
  500 UNTIL (G%>64 AND G%<73) OR (G%>73 AND G%<79) OR (G%>79 AND G%<84)
  510 IF G%=65 THEN D1%=51 : M1%=29 : D2%=0 : M2%=0 : L%=0
  520IF G%=66 THEN D1%=58 : M1%=40 : D2%=3 : M2%=52 : L%=0
  530 IFG%=67 THEN D1%=50 : M1%=4 : D2%=5 : M2%=42 : L%=0
  540 IFG%=68 THEN D1%=64 : M1%=8 : D2%=21 : M2%=52 : L%=-2
  550 IFG%=69 THEN D1%=-51 : M1%=50 :D2%=57 : M2%=53 :L%=-3
  560 IFG%=70 THEN D1%=13 : M1%=6 : D2%=59 : M2%=34 : L%=-4
  570 IFG%=71 THEN D1%=40 : M1%=41 : D2%=73 : M2%=50 : L%=-5
  580 IFG%=72 THEN D1%=37 : M1%=47 : D2%=122 : M2%=29 : L%=-8
  590 IFG%=74 THEN D1%=61 : M1%=13 : D2%=150 : M2%=0 : L%=-9
  600 IFG%=75 THEN D1%=21 : M1%=19 : D2%=157 : M2%=56 : L%=-10
  610 IFG%=76 THEN D1%=-18 : M1%=10 : D2%=-178 : M2%=28 :L%=-12
  620 IFG%=77 THEN D1%=-33 : M1%=54 : D2%=-151 : M2%=6 : L%=10
  630 IFG%=78 THEN D1%=22 : M1%=18 : D2%=-114 : M2%=10 : L%=8
  640 IFG%=80 THEN D1%=1 : M1%=23 : D2%=-103 : M2%=43 : L%=8
  650 IFG%=81 THEN D1%=24 : M1%=51 : D2%=-67 : M2%=2 : L%=5
  660 IFG%=82 THEN D1%=-1 : M1%=16 : D2%=-36 : M2%=53 : L%=3
  670 IFG%=83 THEN D1%=-33 : M1%=59 : D2%=-18 : M2%=21 : L%=2
  680 CLS : GOTO 990
  690 
  700 REM Lat and Long data entry
  710 CLS
  720PRINT'"Enter the observer's ";CHR$131;"Latitude";CHR$135;'"in Degrees and Minutes in"'"the form 22,18"'"(Negative degrees for South) "
  730 VDU23;29194;0;0;0;:REM cursor on
  740INPUT D1%,M1%
  750 
  760 REM Check Lat deg <=65
  770 X1% = ABS(D1%)
  780 IF X1%>65 THEN PROCerror1 : GOTO 720
  790 :
  800 REM Check Lat Mins range
  810 IF M1%>59 THEN PROCerror2 : GOTO 720
  820 
  830PRINT'"Enter the observer's ";CHR$131;"Longitude";CHR$135;'"in Degrees and Minutes in"'"the form -114,10"'"(Negative degrees for East) "
  840INPUT D2%,M2%
  850 
  860 REM Check Long deg range
  870 X2% = ABS(D2%)
  880 IF X2%>180 THEN PROCerror3 : GOTO 830
  890 :
  900 REM Check Long Mins range
  910 IF M2%>59 THEN PROCerror2 : GOTO 830
  920 
  930 REM Enter Zone adjustment time
  940 CLS
  950 PRINT'"Enter the";CHR$131;"local time adjustment";CHR$135;"for the chosen location against GMT"
  960 PRINT"(No fractional hours, please)"
  970 INPUT L%
  980 
  990 REM Eliminate any negatives
 1000 DLA%=ABS(D1%):DLO%=ABS(D2%)
 1010 
 1020 REM Convert to decimal degrees
 1030LAT=DLA%+(M1%/60)
 1040LONG=DLO%+(M2%/60)
 1050 
 1060REM Restore any previous negatives
 1070IF D1%>0 THEN LAT=LAT ELSE LAT=LAT*(-1)
 1080IF D2%>0 THEN LONG=LONG ELSE LONG=LONG*(-1)
 1090 
 1100 REM Check LT correction range
 1110 IF (L%<-12 OR L%>12)THEN PROCerror5 : GOTO 880
 1120 
 1130 CLS
 1140 REM Enter date
 1150 REPEAT
 1160PRINT'"Enter the ";CHR$131;"date ";CHR$135;"in the form 18,11 "'"for the 18th of November "
 1170INPUT d%,m%
 1180 UNTIL d%>0 AND d%<32 AND m%>0 AND m%<13
 1190 
 1200 IF (m%=1 OR m%=3 OR m%=5 OR m%=7 OR m%=8 OR m%=10 OR m%=12) AND (d%<1 OR d%>31) THEN PROCerror4 : GOTO 1130
 1210 IF (m%=4 OR m%=6 OR m%=9 OR m%=11) AND (d%<1 OR d%>30) THEN PROCerror4
 1220 IF m%=2 AND (d%<1 OR d%>28) THEN PROCerror4 : GOTO 1130
 1230 IF m%=1 THEN month$="January"
 1240 IF m%=2 THEN month$="February"
 1250 IF m%=3 THEN month$="March"
 1260 IF m%=4 THEN month$="April"
 1270 IF m%=5 THEN month$="May"
 1280 IF m%=6 THEN month$="June"
 1290 IF m%=7 THEN month$="July"
 1300 IF m%=8 THEN month$="August"
 1310 IF m%=9 THEN month$="September"
 1320 IF m%=10 THEN month$="October"
 1330 IF m%=11 THEN month$="November"
 1340 IF m%=12 THEN month$="December"
 1350 :
 1360 REM Correction for BST, automatic operation only. Accurate for 1987 only.
 1370 
 1380 IF (try$="Y" OR try$="y") AND (G%=65 OR G%=97 OR G%=66 OR G%=98 OR G%=67 OR G%=99) AND ((m%=3 AND d%>28) OR (m%=4) OR (m%=5) OR (m%=6) OR (m%=7) OR (m%=8) OR (m%=9) OR (m%=10 AND d%<25)) THEN L%=L%+1
 1390 REM Calculate Sunrise & Sunset GMT
 1400t=0.988*(d%-1+30.3*(m%-1))
 1410E=(0.123*COS(RAD(t+87))-(SIN(RAD((2*t)+20))))/6
 1420D3=-23.5*(COS(RAD(t+10)))
 1430N=DEG(ACS(-1*(TAN(RAD(D3)))*TAN(RAD(LAT))))
 1440sunrise=((LONG-N)/15)-E+11.77
 1450sunset=((LONG+N)/15)-E+12.04
 1460 
 1470 REM Adjust GMT to be positive and <24 hours
 1480 IF sunrise>24 THEN sunrise=sunrise-24 ELSE IF sunrise<0 THEN sunrise=sunrise+24
 1490 IF sunset>24 THEN sunset=sunset-24 ELSE IF sunset<0 THEN sunset=sunset+24
 1500 
 1510 REM Convert to hrs and mins
 1520 A%=FNhrs(sunrise) : B%=FNmins(sunrise)
 1530 C%=FNhrs(sunset) : D%=FNmins(sunset)
 1540 IF B%>=60 THEN A%=A%+1 : B%=B%-60
 1550 IF D%>=60 THEN C%=C%+1 : D%=D%-60
 1560 F% = A% + L% : H% = C% + L%
 1570 
 1580 REM Adjust local hrs to be <24 and >0
 1590 IF F%>24 THEN F%=F%-24 ELSE IF F%<0 THEN F%=F%+24
 1600 IF H%>24 THEN H%=H%-24 ELSE IF H%<0 THEN H%=H%+24
 1610 
 1620REM Convert results to strings for          final format
 1630 A$=STR$(A%):B$=STR$(B%):C$=STR$(C%):D$=STR$(D%):F$=STR$(F%):H$=STR$(H%)
 1640 Z%=0 : Z$=STR$(Z%)
 1650 P$="."
 1660 
 1670 REM Insert zeros if hrs or mins             <10
 1680A$=FNzero(A%,A$) : B$=FNzero(B%,B$) : C$=FNzero(C%,C$) : D$=FNzero(D%,D$) : F$=FNzero(F%,F$) : H$=FNzero(H%,H$)
 1690 
 1700 REM Print Results
 1710VDU12,23;8202;0;0;0;:REM Cursor off
 1720 PROC_location
 1730 day$=STR$(d%)
 1740 space$=" "
 1750 date$=FNdate(day$,month$)
 1760 IF try$="Y" OR try$="y" THEN PRINTTAB(0,6)"":PROC_CENTRE(location$,134):PROC_CENTRE(date$,134)
 1770PRINTTAB(0,11);CHR$(131);"SUNRISE is at ";FNtim(A$,B$);" GMT, ";FNtim(F$,B$);" Local"
 1780 
 1790PRINTTAB(0,13);CHR$(129);"SUNSET  is at ";FNtim(C$,D$);" GMT, ";FNtim(H$,D$);" Local"
 1800 
 1810 TIME = 0: REPEAT: UNTIL TIME=500
 1820 PRINTTAB(8,24);CHR$(130);"PRESS 'Space' TO RERUN";
 1830 IF GET=32 THEN CLS : GOTO 300
 1840 
 1850 END
 1860 
 1870 DEF PROCword_print(P$,L%)
 1880 LOCAL word$, I%, done
 1890 done = FALSE
 1900REPEAT
 1910 I% = INSTR(P$, " ")
 1920 word$ = LEFT$(P$,I%)
 1930 P$= RIGHT$(P$,LEN P$-I%)
 1940 IF P$= "" THEN done = TRUE
 1950 IF I% = 0 THEN word$ =P$: done = TRUE
 1960 IF LEN word$>L%-COUNT THEN PRINT
 1970 PRINT word$ ;
 1980 UNTIL done
 1990 ENDPROC
 2000 
 2010 DEF PROCerror1
 2020 VDU7
 2030 PRINT'''''
 2040 PROC_CENTRE("Latitudes over 65 degrees produce",129)
 2050 PROC_CENTRE("large errors, and are barred",129)
 2060 PROC_CENTRE("Please try again",129)
 2070 PROC_continue
 2080 ENDPROC
 2090 
 2100DEFPROCerror2
 2110VDU7
 2120 PRINT'''''
 2130 PROC_CENTRE("Please enter Minutes",129)
 2140 PROC_CENTRE("within the range",129)
 2150 PROC_CENTRE("0 to 59",129)
 2160 PROC_CENTRE("Please try again",129)
 2170 PROC_continue
 2180ENDPROC
 2190 
 2200 DEFPROCerror3
 2210VDU7
 2220 PRINT
 2230 PROC_CENTRE("Please enter Longitude degrees",129)
 2240 PROC_CENTRE("within the range",129)
 2250 PROC_CENTRE("-180 to 180",129)
 2260 PROC_CENTRE("Please try again",129)
 2270 PROC_continue
 2280ENDPROC
 2290 
 2300 
 2310 DEFPROCerror4
 2320VDU7
 2330 PRINT'''''
 2340 PROC_CENTRE("There aren't that many",129)
 2350 PROC_CENTRE("days in that month !",129)
 2360 PROC_CENTRE("Please try again",129)
 2370 PROC_continue
 2380ENDPROC
 2390 
 2400DEFPROCerror5
 2410 VDU7
 2420 PRINT
 2430 PROC_CENTRE("Please enter local",129)
 2440 PROC_CENTRE("time correction",129)
 2450 PROC_CENTRE("within the range",129)
 2460 PROC_CENTRE("-12 to 12.",129)
 2470 PRINT'
 2480 PROC_CENTRE("Please also ensure",129)
 2490 PROC_CENTRE("that it is correct",129)
 2500 PROC_CENTRE("for the longitude entered.",129)
 2510 PROC_CENTRE("Please try again",129)
 2520 PROC_continue
 2530ENDPROC
 2540 
 2550 DEF FNhrs(X1): = INT(X1)
 2560 
 2570 DEF FNmins(X1)
 2580 = INT((60*(X1-FNhrs(X1)))+0.5)
 2590 
 2600 DEF FNzero(X%,X$)
 2610 IF X%>=10 THEN X$=X$ ELSE X$=Z$+X$
 2620 = X$
 2630 
 2640 DEF FNtim(x$,y$) : = x$ + P$ + y$
 2650 
 2660 DEF FNdate(a$,b$) : = a$ + space$ + b$
 2670 :
 2680 DEFPROC_examples
 2690 CLS
 2700 PRINT'CHR$(130);"Note that UK Summer time  =  GMT + 1"
 2710 PRINTCHR$(131);TAB(33)"Local"
 2720 PRINTCHR$(131);" Location";TAB(18);"Lat.";TAB(27);"Long.";TAB(33);"Time"
 2730 PRINT"A Greenwich";TAB(16);" 51,29";TAB(24);"   0,00";TAB(33);"   0"
 2740 PRINT"B John O'Groats";TAB(16);" 58,40";TAB(24);"   3,52";TAB(33);"   0"
 2750 PRINT"C Lands End";TAB(16);" 50,04";TAB(24);"   5,42";TAB(33);"   0"
 2760 PRINT"D Reykjavik";TAB(16);" 64,08";TAB(24);"  21,52";TAB(33);" - 2"
 2770 PRINT"E Falklands";TAB(16);"-51,50";TAB(24);"  57,53";TAB(33);" - 3"
 2780 PRINT"F Barbados";TAB(16);" 13,06";TAB(24);"  59,34";TAB(33);" - 4"
 2790 PRINT"G New York";TAB(16);" 40,41";TAB(24);"  73,50";TAB(33);" - 5"
 2800 PRINT"H San Francisco";TAB(16);" 37,47";TAB(24);" 122,29";TAB(33);" - 8"
 2810 PRINT"J Anchorage";TAB(16);" 61,13";TAB(24);" 150,00";TAB(33);" - 9"
 2820 PRINT"K Honolulu";TAB(16);" 21,19";TAB(24);" 157,56";TAB(33);" -10"
 2830 PRINT"L Fiji";TAB(16);"-18,10";TAB(24);"-178,28";TAB(33);"  12"
 2840 PRINT"M Sydney";TAB(16);"-33,54";TAB(24);"-151,06";TAB(33);"  10"
 2850 PRINT"N Hong Kong";TAB(16);" 22,18";TAB(24);"-114,10";TAB(33);"   8"
 2860 PRINT"P Singapore";TAB(16);"  1,23";TAB(24);"-103,43";TAB(33);"   8"
 2870 PRINT"Q Karachi";TAB(16);" 24,51";TAB(24);" -67,02";TAB(33);"   5"
 2880 PRINT"R Nairobi";TAB(16);" -1,16";TAB(24);" -36,53";TAB(33);"   3"
 2890 PRINT"S Capetown";TAB(16);"-33,59";TAB(24);" -18,21";TAB(33);"   2"
 2900ENDPROC
 2910 
 2920 DEFPROC_continue
 2930 REPEAT
 2940PRINTTAB(5,24);CHR$(130);"PRESS 'SPACE' TO CONTINUE";
 2950UNTIL GET=32 : CLS
 2960 ENDPROC
 2970:
 2980DEFPROC_location
 2990IF G%=65 OR G%=97 THEN location$="Greenwich"
 3000IF G%=66 OR G%=98 THEN location$="John O'Groats"
 3010IF G%=67 OR G%=99 THEN location$="Lands End"
 3020IF G%=68 OR G%=100 THEN location$="Reykjavik"
 3030IF G%=69 OR G%=101 THEN location$="Falklands"
 3040IF G%=70 OR G%=102 THEN location$="Barbados"
 3050IF G%=71 OR G%=103 THEN location$="New York"
 3060IF G%=72 OR G%=104 THEN location$="San Francisco"
 3070IF G%=74 OR G%=106 THEN location$="Anchorage"
 3080IF G%=75 OR G%=107 THEN location$="Honolulu"
 3090IF G%=76 OR G%=108 THEN location$="Fiji"
 3100IF G%=77 OR G%=109 THEN location$="Sydney"
 3110IF G%=78 OR G%=110 THEN location$="Hong Kong"
 3120IF G%=80 OR G%=112 THEN location$="Singapore"
 3130IF G%=81 OR G%=113 THEN location$="Karachi"
 3140IF G%=82 OR G%=114 THEN location$="Nairobi"
 3150IF G%=83 OR G%=115 THEN location$="Capetown"
 3160ENDPROC
 3170:
 3180DEFPROC_CENTRE(F$,Y%)
 3190 REM call PROC_CENTRE(F$,Y%),where F$ = string to be centred, Y% = print   colour desired : 129 = red, etc.
 3200 :
 3210LOCAL Q%
 3220Q% = 20-(LEN(F$)/2)
 3230PRINTCHR$(Y%);TAB(Q%);F$
 3240ENDPROC

� SUN2, for 1987
%� (c) D.J.Aldous. September 1986.
 �7
(#�12,23;8202;0;0;0;:� Cursor off
2 � Title routine, 3 seconds
<tim = �+300
F;� �14,12);�131;�141;"S U N":�14,13);�131;�141;"S U N"
P#�10,16);�134;"by  D.J. Aldous"
Z� �>tim
d�
n 
x � Programme description
� TITLE$ = "SUNRISE:SUNSET"
�%�18-(�(TITLE$)/2),1);�131;TITLE$
� �'
�� F$= "This program computes the times of Sunrise and Sunset in GMT and local time, for any chosen location in the world, on any day during the year 1987."
� length = 39
� �word_print(F$,length)
� �'
Ȏ F$= "You are asked to enter the latitude and longitude of the location, the date, and the adjustment for local time with respect to GMT."
� �word_print(F$,length)
� �'
� F$="Latitudes North are positive, South are negative. Longitudes West are positive, East are negative. Locations East of UK are ahead of GMT (positive), West are behind (negative)."
� �word_print(F$,length)
� �'
_ F$="Examples are provided, and may be run automatically. Please change them if you wish !"
 �word_print(F$,length)
 �'
"�_continue
,p D1%=0 : M1%=0 : D2%=0 : M2%=0 : L%=0 : G%=0 : answer$="" : G$="" : try$="" : month$="" : day$="" : date$=""
6 
@! �23;29194;0;0;0;:� Cursor on
J �
T �'
^Y F$="Would you like some examples of location - latitude, longitude and local time ?"
h �word_print(F$,length)
r+ �8,23);�(130);"Please enter Y or N ";
| answer$=�
�< � answer$="Y" � answer$="y" � answer$="N" � answer$="n"
�) � answer$="N" � answer$="n" � � �dFB
� �_examples
��
�1�'�(130);"Like to try one of these ? (Y/N) ";
� try$=�
�/� try$="Y" � try$="y" � try$="N" � try$="n"
�# � try$="N" � try$="n" � � �dFB
� �
�2 �''�(130);"Please enter your chosen letter ";
� G%=� � 223
�: � (G%>64 � G%<73) � (G%>73 � G%<79) � (G%>79 � G%<84)
�5 � G%=65 � D1%=51 : M1%=29 : D2%=0 : M2%=0 : L%=0
5� G%=66 � D1%=58 : M1%=40 : D2%=3 : M2%=52 : L%=0
4 �G%=67 � D1%=50 : M1%=4 : D2%=5 : M2%=42 : L%=0
6 �G%=68 � D1%=64 : M1%=8 : D2%=21 : M2%=52 : L%=-2
&6 �G%=69 � D1%=-51 : M1%=50 :D2%=57 : M2%=53 :L%=-3
06 �G%=70 � D1%=13 : M1%=6 : D2%=59 : M2%=34 : L%=-4
:7 �G%=71 � D1%=40 : M1%=41 : D2%=73 : M2%=50 : L%=-5
D8 �G%=72 � D1%=37 : M1%=47 : D2%=122 : M2%=29 : L%=-8
N7 �G%=74 � D1%=61 : M1%=13 : D2%=150 : M2%=0 : L%=-9
X9 �G%=75 � D1%=21 : M1%=19 : D2%=157 : M2%=56 : L%=-10
b: �G%=76 � D1%=-18 : M1%=10 : D2%=-178 : M2%=28 :L%=-12
l9 �G%=77 � D1%=-33 : M1%=54 : D2%=-151 : M2%=6 : L%=10
v8 �G%=78 � D1%=22 : M1%=18 : D2%=-114 : M2%=10 : L%=8
�7 �G%=80 � D1%=1 : M1%=23 : D2%=-103 : M2%=43 : L%=8
�6 �G%=81 � D1%=24 : M1%=51 : D2%=-67 : M2%=2 : L%=5
�7 �G%=82 � D1%=-1 : M1%=16 : D2%=-36 : M2%=53 : L%=3
�8 �G%=83 � D1%=-33 : M1%=59 : D2%=-18 : M2%=21 : L%=2
� � : � �d^C
� 
� � Lat and Long data entry
� �
Ѐ�'"Enter the observer's ";�131;"Latitude";�135;'"in Degrees and Minutes in"'"the form 22,18"'"(Negative degrees for South) "
�! �23;29194;0;0;0;:� cursor on
�
� D1%,M1%
� 
� � Check Lat deg <=65
 X1% = �(D1%)
  � X1%>65 � �error1 : � �dPB
 :
  � Check Lat Mins range
*  � M1%>59 � �error2 : � �dPB
4 
>��'"Enter the observer's ";�131;"Longitude";�135;'"in Degrees and Minutes in"'"the form -114,10"'"(Negative degrees for East) "
H
� D2%,M2%
R 
\ � Check Long deg range
f X2% = �(D2%)
p! � X2%>180 � �error3 : � �T~C
z :
� � Check Long Mins range
�  � M2%>59 � �error2 : � �T~C
� 
�! � Enter Zone adjustment time
� �
�Z �'"Enter the";�131;"local time adjustment";�135;"for the chosen location against GMT"
�% �"(No fractional hours, please)"
�	 � L%
� 
� � Eliminate any negatives
� DLA%=�(D1%):DLO%=�(D2%)
� 
�! � Convert to decimal degrees
LAT=DLA%+(M1%/60)
LONG=DLO%+(M2%/60)
 
$$� Restore any previous negatives
.$� D1%>0 � LAT=LAT � LAT=LAT*(-1)
8(� D2%>0 � LONG=LONG � LONG=LONG*(-1)
B 
L  � Check LT correction range
V) � (L%<-12 � L%>12)� �error5 : � �DpC
` 
j �
t � Enter date
~ �
�U�'"Enter the ";�131;"date ";�135;"in the form 18,11 "'"for the 18th of November "
�� d%,m%
�" � d%>0 � d%<32 � m%>0 � m%<13
� 
�] � (m%=1 � m%=3 � m%=5 � m%=7 � m%=8 � m%=10 � m%=12) � (d%<1 � d%>31) � �error4 : � �DjD
�> � (m%=4 � m%=6 � m%=9 � m%=11) � (d%<1 � d%>30) � �error4
�/ � m%=2 � (d%<1 � d%>28) � �error4 : � �DjD
� � m%=1 � month$="January"
� � m%=2 � month$="February"
� � m%=3 � month$="March"
� � m%=4 � month$="April"
� � m%=5 � month$="May"
 � m%=6 � month$="June"

 � m%=7 � month$="July"
 � m%=8 � month$="August"
  � m%=9 � month$="September"
( � m%=10 � month$="October"
2  � m%=11 � month$="November"
<  � m%=12 � month$="December"
F :
PL � Correction for BST, automatic operation only. Accurate for 1987 only.
Z 
d� � (try$="Y" � try$="y") � (G%=65 � G%=97 � G%=66 � G%=98 � G%=67 � G%=99) � ((m%=3 � d%>28) � (m%=4) � (m%=5) � (m%=6) � (m%=7) � (m%=8) � (m%=9) � (m%=10 � d%<25)) � L%=L%+1
n% � Calculate Sunrise & Sunset GMT
xt=0.988*(d%-1+30.3*(m%-1))
�+E=(0.123*�(�(t+87))-(�(�((2*t)+20))))/6
�D3=-23.5*(�(�(t+10)))
�#N=�(�(-1*(�(�(D3)))*�(�(LAT))))
�!sunrise=((LONG-N)/15)-E+11.77
� sunset=((LONG+N)/15)-E+12.04
� 
�. � Adjust GMT to be positive and <24 hours
�I � sunrise>24 � sunrise=sunrise-24 � � sunrise<0 � sunrise=sunrise+24
�C � sunset>24 � sunset=sunset-24 � � sunset<0 � sunset=sunset+24
� 
� � Convert to hrs and mins
�) A%=�hrs(sunrise) : B%=�mins(sunrise)
�' C%=�hrs(sunset) : D%=�mins(sunset)
" � B%>=60 � A%=A%+1 : B%=B%-60
" � D%>=60 � C%=C%+1 : D%=D%-60
  F% = A% + L% : H% = C% + L%
" 
,( � Adjust local hrs to be <24 and >0
6+ � F%>24 � F%=F%-24 � � F%<0 � F%=F%+24
@+ � H%>24 � H%=H%-24 � � H%<0 � H%=H%+24
J 
T:� Convert results to strings for          final format
^: A$=�(A%):B$=�(B%):C$=�(C%):D$=�(D%):F$=�(F%):H$=�(H%)
h Z%=0 : Z$=�(Z%)
r P$="."
| 
�2 � Insert zeros if hrs or mins             <10
�mA$=�zero(A%,A$) : B$=�zero(B%,B$) : C$=�zero(C%,C$) : D$=�zero(D%,D$) : F$=�zero(F%,F$) : H$=�zero(H%,H$)
� 
� � Print Results
�#�12,23;8202;0;0;0;:� Cursor off
� �_location
� day$=�(d%)
� space$=" "
� date$=�date(day$,month$)
�Q � try$="Y" � try$="y" � �0,6)"":�_CENTRE(location$,134):�_CENTRE(date$,134)
�M�0,11);�(131);"SUNRISE is at ";�tim(A$,B$);" GMT, ";�tim(F$,B$);" Local"
� 
�M�0,13);�(129);"SUNSET  is at ";�tim(C$,D$);" GMT, ";�tim(H$,D$);" Local"
 
 � = 0: �: � �=500
- �8,24);�(130);"PRESS 'Space' TO RERUN";
& � �=32 � � : � �TlA
0 
: �
D 
N � �word_print(P$,L%)
X � word$, I%, done
b
 done = �
l�
v I% = �P$, " ")
� word$ = �P$,I%)
� P$= �P$,� P$-I%)
� � P$= "" � done = �
�# � I% = 0 � word$ =P$: done = �
� � � word$>L%-� � �
� � word$ ;
� � done
� �
� 
� � �error1
� �7
� �'''''
�6 �_CENTRE("Latitudes over 65 degrees produce",129)
1 �_CENTRE("large errors, and are barred",129)
% �_CENTRE("Please try again",129)
 �_continue
  �
* 
4��error2
>�7
H �'''''
R) �_CENTRE("Please enter Minutes",129)
\% �_CENTRE("within the range",129)
f �_CENTRE("0 to 59",129)
p% �_CENTRE("Please try again",129)
z �_continue
��
� 
�
 ��error3
��7
� �
�3 �_CENTRE("Please enter Longitude degrees",129)
�% �_CENTRE("within the range",129)
�  �_CENTRE("-180 to 180",129)
�% �_CENTRE("Please try again",129)
� �_continue
��
� 
� 
	
 ��error4
	�7
	 �'''''
	$+ �_CENTRE("There aren't that many",129)
	.) �_CENTRE("days in that month !",129)
	8% �_CENTRE("Please try again",129)
	B �_continue
	L�
	V 
	`��error5
	j �7
	t �
	~' �_CENTRE("Please enter local",129)
	�$ �_CENTRE("time correction",129)
	�% �_CENTRE("within the range",129)
	� �_CENTRE("-12 to 12.",129)
	� �'
	�' �_CENTRE("Please also ensure",129)
	�' �_CENTRE("that it is correct",129)
	�/ �_CENTRE("for the longitude entered.",129)
	�% �_CENTRE("Please try again",129)
	� �_continue
	��
	� 
	� � �hrs(X1): = �(X1)
 

 � �mins(X1)
  = �((60*(X1-�hrs(X1)))+0.5)
 
( � �zero(X%,X$)
2  � X%>=10 � X$=X$ � X$=Z$+X$
<	 = X$
F 
P# � �tim(x$,y$) : = x$ + P$ + y$
Z 
d( � �date(a$,b$) : = a$ + space$ + b$
n :
x ��_examples
� �
�4 �'�(130);"Note that UK Summer time  =  GMT + 1"
� �(131);�33)"Local"
�= �(131);" Location";�18);"Lat.";�27);"Long.";�33);"Time"
�< �"A Greenwich";�16);" 51,29";�24);"   0,00";�33);"   0"
�@ �"B John O'Groats";�16);" 58,40";�24);"   3,52";�33);"   0"
�< �"C Lands End";�16);" 50,04";�24);"   5,42";�33);"   0"
�< �"D Reykjavik";�16);" 64,08";�24);"  21,52";�33);" - 2"
�< �"E Falklands";�16);"-51,50";�24);"  57,53";�33);" - 3"
�; �"F Barbados";�16);" 13,06";�24);"  59,34";�33);" - 4"
�; �"G New York";�16);" 40,41";�24);"  73,50";�33);" - 5"
�@ �"H San Francisco";�16);" 37,47";�24);" 122,29";�33);" - 8"
�< �"J Anchorage";�16);" 61,13";�24);" 150,00";�33);" - 9"
; �"K Honolulu";�16);" 21,19";�24);" 157,56";�33);" -10"
7 �"L Fiji";�16);"-18,10";�24);"-178,28";�33);"  12"
9 �"M Sydney";�16);"-33,54";�24);"-151,06";�33);"  10"
"< �"N Hong Kong";�16);" 22,18";�24);"-114,10";�33);"   8"
,< �"P Singapore";�16);"  1,23";�24);"-103,43";�33);"   8"
6: �"Q Karachi";�16);" 24,51";�24);" -67,02";�33);"   5"
@: �"R Nairobi";�16);" -1,16";�24);" -36,53";�33);"   3"
J; �"S Capetown";�16);"-33,59";�24);" -18,21";�33);"   2"
T�
^ 
h ��_continue
r �
|/�5,24);�(130);"PRESS 'SPACE' TO CONTINUE";
�� �=32 : �
� �
�:
���_location
�+� G%=65 � G%=97 � location$="Greenwich"
�/� G%=66 � G%=98 � location$="John O'Groats"
�+� G%=67 � G%=99 � location$="Lands End"
�,� G%=68 � G%=100 � location$="Reykjavik"
�,� G%=69 � G%=101 � location$="Falklands"
�+� G%=70 � G%=102 � location$="Barbados"
�+� G%=71 � G%=103 � location$="New York"
�0� G%=72 � G%=104 � location$="San Francisco"
�,� G%=74 � G%=106 � location$="Anchorage"
+� G%=75 � G%=107 � location$="Honolulu"
'� G%=76 � G%=108 � location$="Fiji"
)� G%=77 � G%=109 � location$="Sydney"
&,� G%=78 � G%=110 � location$="Hong Kong"
0,� G%=80 � G%=112 � location$="Singapore"
:*� G%=81 � G%=113 � location$="Karachi"
D*� G%=82 � G%=114 � location$="Nairobi"
N+� G%=83 � G%=115 � location$="Capetown"
X�
b:
l��_CENTRE(F$,Y%)
vm � call PROC_CENTRE(F$,Y%),where F$ = string to be centred, Y% = print   colour desired : 129 = red, etc.
� :
�� Q%
�Q% = 20-(�(F$)/2)
��(Y%);�Q%);F$
��
�
00000000  0d 00 0a 14 f4 20 53 55  4e 32 2c 20 66 6f 72 20  |..... SUN2, for |
00000010  31 39 38 37 0d 00 14 25  f4 20 28 63 29 20 44 2e  |1987...%. (c) D.|
00000020  4a 2e 41 6c 64 6f 75 73  2e 20 53 65 70 74 65 6d  |J.Aldous. Septem|
00000030  62 65 72 20 31 39 38 36  2e 0d 00 1e 07 20 eb 37  |ber 1986..... .7|
00000040  0d 00 28 23 ef 31 32 2c  32 33 3b 38 32 30 32 3b  |..(#.12,23;8202;|
00000050  30 3b 30 3b 30 3b 3a f4  20 43 75 72 73 6f 72 20  |0;0;0;:. Cursor |
00000060  6f 66 66 0d 00 32 1f 20  f4 20 54 69 74 6c 65 20  |off..2. . Title |
00000070  72 6f 75 74 69 6e 65 2c  20 33 20 73 65 63 6f 6e  |routine, 3 secon|
00000080  64 73 0d 00 3c 0f 74 69  6d 20 3d 20 91 2b 33 30  |ds..<.tim = .+30|
00000090  30 0d 00 46 3b f5 20 f1  8a 31 34 2c 31 32 29 3b  |0..F;. ..14,12);|
000000a0  bd 31 33 31 3b bd 31 34  31 3b 22 53 20 55 20 4e  |.131;.141;"S U N|
000000b0  22 3a f1 8a 31 34 2c 31  33 29 3b bd 31 33 31 3b  |":..14,13);.131;|
000000c0  bd 31 34 31 3b 22 53 20  55 20 4e 22 0d 00 50 23  |.141;"S U N"..P#|
000000d0  f1 8a 31 30 2c 31 36 29  3b bd 31 33 34 3b 22 62  |..10,16);.134;"b|
000000e0  79 20 20 44 2e 4a 2e 20  41 6c 64 6f 75 73 22 0d  |y  D.J. Aldous".|
000000f0  00 5a 0b fd 20 91 3e 74  69 6d 0d 00 64 05 db 0d  |.Z.. .>tim..d...|
00000100  00 6e 05 20 0d 00 78 1c  20 f4 20 50 72 6f 67 72  |.n. ..x. . Progr|
00000110  61 6d 6d 65 20 64 65 73  63 72 69 70 74 69 6f 6e  |amme description|
00000120  0d 00 82 1e 20 54 49 54  4c 45 24 20 3d 20 22 53  |.... TITLE$ = "S|
00000130  55 4e 52 49 53 45 3a 53  55 4e 53 45 54 22 0d 00  |UNRISE:SUNSET"..|
00000140  8c 25 f1 8a 31 38 2d 28  a9 28 54 49 54 4c 45 24  |.%..18-(.(TITLE$|
00000150  29 2f 32 29 2c 31 29 3b  bd 31 33 31 3b 54 49 54  |)/2),1);.131;TIT|
00000160  4c 45 24 0d 00 96 07 20  f1 27 0d 00 a0 9e 20 46  |LE$.... .'.... F|
00000170  24 3d 20 22 54 68 69 73  20 70 72 6f 67 72 61 6d  |$= "This program|
00000180  20 63 6f 6d 70 75 74 65  73 20 74 68 65 20 74 69  | computes the ti|
00000190  6d 65 73 20 6f 66 20 53  75 6e 72 69 73 65 20 61  |mes of Sunrise a|
000001a0  6e 64 20 53 75 6e 73 65  74 20 69 6e 20 47 4d 54  |nd Sunset in GMT|
000001b0  20 61 6e 64 20 6c 6f 63  61 6c 20 74 69 6d 65 2c  | and local time,|
000001c0  20 66 6f 72 20 61 6e 79  20 63 68 6f 73 65 6e 20  | for any chosen |
000001d0  6c 6f 63 61 74 69 6f 6e  20 69 6e 20 74 68 65 20  |location in the |
000001e0  77 6f 72 6c 64 2c 20 6f  6e 20 61 6e 79 20 64 61  |world, on any da|
000001f0  79 20 64 75 72 69 6e 67  20 74 68 65 20 79 65 61  |y during the yea|
00000200  72 20 31 39 38 37 2e 22  0d 00 aa 10 20 6c 65 6e  |r 1987.".... len|
00000210  67 74 68 20 3d 20 33 39  0d 00 b4 1b 20 f2 77 6f  |gth = 39.... .wo|
00000220  72 64 5f 70 72 69 6e 74  28 46 24 2c 6c 65 6e 67  |rd_print(F$,leng|
00000230  74 68 29 0d 00 be 07 20  f1 27 0d 00 c8 8e 20 46  |th).... .'.... F|
00000240  24 3d 20 22 59 6f 75 20  61 72 65 20 61 73 6b 65  |$= "You are aske|
00000250  64 20 74 6f 20 65 6e 74  65 72 20 74 68 65 20 6c  |d to enter the l|
00000260  61 74 69 74 75 64 65 20  61 6e 64 20 6c 6f 6e 67  |atitude and long|
00000270  69 74 75 64 65 20 6f 66  20 74 68 65 20 6c 6f 63  |itude of the loc|
00000280  61 74 69 6f 6e 2c 20 74  68 65 20 64 61 74 65 2c  |ation, the date,|
00000290  20 61 6e 64 20 74 68 65  20 61 64 6a 75 73 74 6d  | and the adjustm|
000002a0  65 6e 74 20 66 6f 72 20  6c 6f 63 61 6c 20 74 69  |ent for local ti|
000002b0  6d 65 20 77 69 74 68 20  72 65 73 70 65 63 74 20  |me with respect |
000002c0  74 6f 20 47 4d 54 2e 22  0d 00 d2 1b 20 f2 77 6f  |to GMT.".... .wo|
000002d0  72 64 5f 70 72 69 6e 74  28 46 24 2c 6c 65 6e 67  |rd_print(F$,leng|
000002e0  74 68 29 0d 00 dc 07 20  f1 27 0d 00 e6 ba 20 46  |th).... .'.... F|
000002f0  24 3d 22 4c 61 74 69 74  75 64 65 73 20 4e 6f 72  |$="Latitudes Nor|
00000300  74 68 20 61 72 65 20 70  6f 73 69 74 69 76 65 2c  |th are positive,|
00000310  20 53 6f 75 74 68 20 61  72 65 20 6e 65 67 61 74  | South are negat|
00000320  69 76 65 2e 20 4c 6f 6e  67 69 74 75 64 65 73 20  |ive. Longitudes |
00000330  57 65 73 74 20 61 72 65  20 70 6f 73 69 74 69 76  |West are positiv|
00000340  65 2c 20 45 61 73 74 20  61 72 65 20 6e 65 67 61  |e, East are nega|
00000350  74 69 76 65 2e 20 4c 6f  63 61 74 69 6f 6e 73 20  |tive. Locations |
00000360  45 61 73 74 20 6f 66 20  55 4b 20 61 72 65 20 61  |East of UK are a|
00000370  68 65 61 64 20 6f 66 20  47 4d 54 20 28 70 6f 73  |head of GMT (pos|
00000380  69 74 69 76 65 29 2c 20  57 65 73 74 20 61 72 65  |itive), West are|
00000390  20 62 65 68 69 6e 64 20  28 6e 65 67 61 74 69 76  | behind (negativ|
000003a0  65 29 2e 22 0d 00 f0 1b  20 f2 77 6f 72 64 5f 70  |e).".... .word_p|
000003b0  72 69 6e 74 28 46 24 2c  6c 65 6e 67 74 68 29 0d  |rint(F$,length).|
000003c0  00 fa 07 20 f1 27 0d 01  04 5f 20 46 24 3d 22 45  |... .'..._ F$="E|
000003d0  78 61 6d 70 6c 65 73 20  61 72 65 20 70 72 6f 76  |xamples are prov|
000003e0  69 64 65 64 2c 20 61 6e  64 20 6d 61 79 20 62 65  |ided, and may be|
000003f0  20 72 75 6e 20 61 75 74  6f 6d 61 74 69 63 61 6c  | run automatical|
00000400  6c 79 2e 20 50 6c 65 61  73 65 20 63 68 61 6e 67  |ly. Please chang|
00000410  65 20 74 68 65 6d 20 69  66 20 79 6f 75 20 77 69  |e them if you wi|
00000420  73 68 20 21 22 0d 01 0e  1b 20 f2 77 6f 72 64 5f  |sh !".... .word_|
00000430  70 72 69 6e 74 28 46 24  2c 6c 65 6e 67 74 68 29  |print(F$,length)|
00000440  0d 01 18 07 20 f1 27 0d  01 22 0e f2 5f 63 6f 6e  |.... .'..".._con|
00000450  74 69 6e 75 65 0d 01 2c  70 20 44 31 25 3d 30 20  |tinue..,p D1%=0 |
00000460  3a 20 4d 31 25 3d 30 20  3a 20 44 32 25 3d 30 20  |: M1%=0 : D2%=0 |
00000470  3a 20 4d 32 25 3d 30 20  3a 20 4c 25 3d 30 20 3a  |: M2%=0 : L%=0 :|
00000480  20 47 25 3d 30 20 3a 20  61 6e 73 77 65 72 24 3d  | G%=0 : answer$=|
00000490  22 22 20 3a 20 47 24 3d  22 22 20 3a 20 74 72 79  |"" : G$="" : try|
000004a0  24 3d 22 22 20 3a 20 6d  6f 6e 74 68 24 3d 22 22  |$="" : month$=""|
000004b0  20 3a 20 64 61 79 24 3d  22 22 20 3a 20 64 61 74  | : day$="" : dat|
000004c0  65 24 3d 22 22 0d 01 36  05 20 0d 01 40 21 20 ef  |e$=""..6. ..@! .|
000004d0  32 33 3b 32 39 31 39 34  3b 30 3b 30 3b 30 3b 3a  |23;29194;0;0;0;:|
000004e0  f4 20 43 75 72 73 6f 72  20 6f 6e 0d 01 4a 06 20  |. Cursor on..J. |
000004f0  f5 0d 01 54 07 20 f1 27  0d 01 5e 59 20 46 24 3d  |...T. .'..^Y F$=|
00000500  22 57 6f 75 6c 64 20 79  6f 75 20 6c 69 6b 65 20  |"Would you like |
00000510  73 6f 6d 65 20 65 78 61  6d 70 6c 65 73 20 6f 66  |some examples of|
00000520  20 6c 6f 63 61 74 69 6f  6e 20 2d 20 6c 61 74 69  | location - lati|
00000530  74 75 64 65 2c 20 6c 6f  6e 67 69 74 75 64 65 20  |tude, longitude |
00000540  61 6e 64 20 6c 6f 63 61  6c 20 74 69 6d 65 20 3f  |and local time ?|
00000550  22 0d 01 68 1b 20 f2 77  6f 72 64 5f 70 72 69 6e  |"..h. .word_prin|
00000560  74 28 46 24 2c 6c 65 6e  67 74 68 29 0d 01 72 2b  |t(F$,length)..r+|
00000570  20 f1 8a 38 2c 32 33 29  3b bd 28 31 33 30 29 3b  | ..8,23);.(130);|
00000580  22 50 6c 65 61 73 65 20  65 6e 74 65 72 20 59 20  |"Please enter Y |
00000590  6f 72 20 4e 20 22 3b 0d  01 7c 0e 20 61 6e 73 77  |or N ";..|. answ|
000005a0  65 72 24 3d be 0d 01 86  3c 20 fd 20 61 6e 73 77  |er$=....< . answ|
000005b0  65 72 24 3d 22 59 22 20  84 20 61 6e 73 77 65 72  |er$="Y" . answer|
000005c0  24 3d 22 79 22 20 84 20  61 6e 73 77 65 72 24 3d  |$="y" . answer$=|
000005d0  22 4e 22 20 84 20 61 6e  73 77 65 72 24 3d 22 6e  |"N" . answer$="n|
000005e0  22 0d 01 90 29 20 e7 20  61 6e 73 77 65 72 24 3d  |"...) . answer$=|
000005f0  22 4e 22 20 84 20 61 6e  73 77 65 72 24 3d 22 6e  |"N" . answer$="n|
00000600  22 20 8c 20 e5 20 8d 64  46 42 0d 01 9a 0f 20 f2  |" . . .dFB.... .|
00000610  5f 65 78 61 6d 70 6c 65  73 0d 01 a4 05 f5 0d 01  |_examples.......|
00000620  ae 31 f1 27 bd 28 31 33  30 29 3b 22 4c 69 6b 65  |.1.'.(130);"Like|
00000630  20 74 6f 20 74 72 79 20  6f 6e 65 20 6f 66 20 74  | to try one of t|
00000640  68 65 73 65 20 3f 20 28  59 2f 4e 29 20 22 3b 0d  |hese ? (Y/N) ";.|
00000650  01 b8 0b 20 74 72 79 24  3d be 0d 01 c2 2f fd 20  |... try$=..../. |
00000660  74 72 79 24 3d 22 59 22  20 84 20 74 72 79 24 3d  |try$="Y" . try$=|
00000670  22 79 22 20 84 20 74 72  79 24 3d 22 4e 22 20 84  |"y" . try$="N" .|
00000680  20 74 72 79 24 3d 22 6e  22 0d 01 cc 23 20 e7 20  | try$="n"...# . |
00000690  74 72 79 24 3d 22 4e 22  20 84 20 74 72 79 24 3d  |try$="N" . try$=|
000006a0  22 6e 22 20 8c 20 e5 20  8d 64 46 42 0d 01 d6 06  |"n" . . .dFB....|
000006b0  20 f5 0d 01 e0 32 20 f1  27 27 bd 28 31 33 30 29  | ....2 .''.(130)|
000006c0  3b 22 50 6c 65 61 73 65  20 65 6e 74 65 72 20 79  |;"Please enter y|
000006d0  6f 75 72 20 63 68 6f 73  65 6e 20 6c 65 74 74 65  |our chosen lette|
000006e0  72 20 22 3b 0d 01 ea 0f  20 47 25 3d a5 20 80 20  |r ";.... G%=. . |
000006f0  32 32 33 0d 01 f4 3a 20  fd 20 28 47 25 3e 36 34  |223...: . (G%>64|
00000700  20 80 20 47 25 3c 37 33  29 20 84 20 28 47 25 3e  | . G%<73) . (G%>|
00000710  37 33 20 80 20 47 25 3c  37 39 29 20 84 20 28 47  |73 . G%<79) . (G|
00000720  25 3e 37 39 20 80 20 47  25 3c 38 34 29 0d 01 fe  |%>79 . G%<84)...|
00000730  35 20 e7 20 47 25 3d 36  35 20 8c 20 44 31 25 3d  |5 . G%=65 . D1%=|
00000740  35 31 20 3a 20 4d 31 25  3d 32 39 20 3a 20 44 32  |51 : M1%=29 : D2|
00000750  25 3d 30 20 3a 20 4d 32  25 3d 30 20 3a 20 4c 25  |%=0 : M2%=0 : L%|
00000760  3d 30 0d 02 08 35 e7 20  47 25 3d 36 36 20 8c 20  |=0...5. G%=66 . |
00000770  44 31 25 3d 35 38 20 3a  20 4d 31 25 3d 34 30 20  |D1%=58 : M1%=40 |
00000780  3a 20 44 32 25 3d 33 20  3a 20 4d 32 25 3d 35 32  |: D2%=3 : M2%=52|
00000790  20 3a 20 4c 25 3d 30 0d  02 12 34 20 e7 47 25 3d  | : L%=0...4 .G%=|
000007a0  36 37 20 8c 20 44 31 25  3d 35 30 20 3a 20 4d 31  |67 . D1%=50 : M1|
000007b0  25 3d 34 20 3a 20 44 32  25 3d 35 20 3a 20 4d 32  |%=4 : D2%=5 : M2|
000007c0  25 3d 34 32 20 3a 20 4c  25 3d 30 0d 02 1c 36 20  |%=42 : L%=0...6 |
000007d0  e7 47 25 3d 36 38 20 8c  20 44 31 25 3d 36 34 20  |.G%=68 . D1%=64 |
000007e0  3a 20 4d 31 25 3d 38 20  3a 20 44 32 25 3d 32 31  |: M1%=8 : D2%=21|
000007f0  20 3a 20 4d 32 25 3d 35  32 20 3a 20 4c 25 3d 2d  | : M2%=52 : L%=-|
00000800  32 0d 02 26 36 20 e7 47  25 3d 36 39 20 8c 20 44  |2..&6 .G%=69 . D|
00000810  31 25 3d 2d 35 31 20 3a  20 4d 31 25 3d 35 30 20  |1%=-51 : M1%=50 |
00000820  3a 44 32 25 3d 35 37 20  3a 20 4d 32 25 3d 35 33  |:D2%=57 : M2%=53|
00000830  20 3a 4c 25 3d 2d 33 0d  02 30 36 20 e7 47 25 3d  | :L%=-3..06 .G%=|
00000840  37 30 20 8c 20 44 31 25  3d 31 33 20 3a 20 4d 31  |70 . D1%=13 : M1|
00000850  25 3d 36 20 3a 20 44 32  25 3d 35 39 20 3a 20 4d  |%=6 : D2%=59 : M|
00000860  32 25 3d 33 34 20 3a 20  4c 25 3d 2d 34 0d 02 3a  |2%=34 : L%=-4..:|
00000870  37 20 e7 47 25 3d 37 31  20 8c 20 44 31 25 3d 34  |7 .G%=71 . D1%=4|
00000880  30 20 3a 20 4d 31 25 3d  34 31 20 3a 20 44 32 25  |0 : M1%=41 : D2%|
00000890  3d 37 33 20 3a 20 4d 32  25 3d 35 30 20 3a 20 4c  |=73 : M2%=50 : L|
000008a0  25 3d 2d 35 0d 02 44 38  20 e7 47 25 3d 37 32 20  |%=-5..D8 .G%=72 |
000008b0  8c 20 44 31 25 3d 33 37  20 3a 20 4d 31 25 3d 34  |. D1%=37 : M1%=4|
000008c0  37 20 3a 20 44 32 25 3d  31 32 32 20 3a 20 4d 32  |7 : D2%=122 : M2|
000008d0  25 3d 32 39 20 3a 20 4c  25 3d 2d 38 0d 02 4e 37  |%=29 : L%=-8..N7|
000008e0  20 e7 47 25 3d 37 34 20  8c 20 44 31 25 3d 36 31  | .G%=74 . D1%=61|
000008f0  20 3a 20 4d 31 25 3d 31  33 20 3a 20 44 32 25 3d  | : M1%=13 : D2%=|
00000900  31 35 30 20 3a 20 4d 32  25 3d 30 20 3a 20 4c 25  |150 : M2%=0 : L%|
00000910  3d 2d 39 0d 02 58 39 20  e7 47 25 3d 37 35 20 8c  |=-9..X9 .G%=75 .|
00000920  20 44 31 25 3d 32 31 20  3a 20 4d 31 25 3d 31 39  | D1%=21 : M1%=19|
00000930  20 3a 20 44 32 25 3d 31  35 37 20 3a 20 4d 32 25  | : D2%=157 : M2%|
00000940  3d 35 36 20 3a 20 4c 25  3d 2d 31 30 0d 02 62 3a  |=56 : L%=-10..b:|
00000950  20 e7 47 25 3d 37 36 20  8c 20 44 31 25 3d 2d 31  | .G%=76 . D1%=-1|
00000960  38 20 3a 20 4d 31 25 3d  31 30 20 3a 20 44 32 25  |8 : M1%=10 : D2%|
00000970  3d 2d 31 37 38 20 3a 20  4d 32 25 3d 32 38 20 3a  |=-178 : M2%=28 :|
00000980  4c 25 3d 2d 31 32 0d 02  6c 39 20 e7 47 25 3d 37  |L%=-12..l9 .G%=7|
00000990  37 20 8c 20 44 31 25 3d  2d 33 33 20 3a 20 4d 31  |7 . D1%=-33 : M1|
000009a0  25 3d 35 34 20 3a 20 44  32 25 3d 2d 31 35 31 20  |%=54 : D2%=-151 |
000009b0  3a 20 4d 32 25 3d 36 20  3a 20 4c 25 3d 31 30 0d  |: M2%=6 : L%=10.|
000009c0  02 76 38 20 e7 47 25 3d  37 38 20 8c 20 44 31 25  |.v8 .G%=78 . D1%|
000009d0  3d 32 32 20 3a 20 4d 31  25 3d 31 38 20 3a 20 44  |=22 : M1%=18 : D|
000009e0  32 25 3d 2d 31 31 34 20  3a 20 4d 32 25 3d 31 30  |2%=-114 : M2%=10|
000009f0  20 3a 20 4c 25 3d 38 0d  02 80 37 20 e7 47 25 3d  | : L%=8...7 .G%=|
00000a00  38 30 20 8c 20 44 31 25  3d 31 20 3a 20 4d 31 25  |80 . D1%=1 : M1%|
00000a10  3d 32 33 20 3a 20 44 32  25 3d 2d 31 30 33 20 3a  |=23 : D2%=-103 :|
00000a20  20 4d 32 25 3d 34 33 20  3a 20 4c 25 3d 38 0d 02  | M2%=43 : L%=8..|
00000a30  8a 36 20 e7 47 25 3d 38  31 20 8c 20 44 31 25 3d  |.6 .G%=81 . D1%=|
00000a40  32 34 20 3a 20 4d 31 25  3d 35 31 20 3a 20 44 32  |24 : M1%=51 : D2|
00000a50  25 3d 2d 36 37 20 3a 20  4d 32 25 3d 32 20 3a 20  |%=-67 : M2%=2 : |
00000a60  4c 25 3d 35 0d 02 94 37  20 e7 47 25 3d 38 32 20  |L%=5...7 .G%=82 |
00000a70  8c 20 44 31 25 3d 2d 31  20 3a 20 4d 31 25 3d 31  |. D1%=-1 : M1%=1|
00000a80  36 20 3a 20 44 32 25 3d  2d 33 36 20 3a 20 4d 32  |6 : D2%=-36 : M2|
00000a90  25 3d 35 33 20 3a 20 4c  25 3d 33 0d 02 9e 38 20  |%=53 : L%=3...8 |
00000aa0  e7 47 25 3d 38 33 20 8c  20 44 31 25 3d 2d 33 33  |.G%=83 . D1%=-33|
00000ab0  20 3a 20 4d 31 25 3d 35  39 20 3a 20 44 32 25 3d  | : M1%=59 : D2%=|
00000ac0  2d 31 38 20 3a 20 4d 32  25 3d 32 31 20 3a 20 4c  |-18 : M2%=21 : L|
00000ad0  25 3d 32 0d 02 a8 0f 20  db 20 3a 20 e5 20 8d 64  |%=2.... . : . .d|
00000ae0  5e 43 0d 02 b2 05 20 0d  02 bc 1e 20 f4 20 4c 61  |^C.... .... . La|
00000af0  74 20 61 6e 64 20 4c 6f  6e 67 20 64 61 74 61 20  |t and Long data |
00000b00  65 6e 74 72 79 0d 02 c6  06 20 db 0d 02 d0 80 f1  |entry.... ......|
00000b10  27 22 45 6e 74 65 72 20  74 68 65 20 6f 62 73 65  |'"Enter the obse|
00000b20  72 76 65 72 27 73 20 22  3b bd 31 33 31 3b 22 4c  |rver's ";.131;"L|
00000b30  61 74 69 74 75 64 65 22  3b bd 31 33 35 3b 27 22  |atitude";.135;'"|
00000b40  69 6e 20 44 65 67 72 65  65 73 20 61 6e 64 20 4d  |in Degrees and M|
00000b50  69 6e 75 74 65 73 20 69  6e 22 27 22 74 68 65 20  |inutes in"'"the |
00000b60  66 6f 72 6d 20 32 32 2c  31 38 22 27 22 28 4e 65  |form 22,18"'"(Ne|
00000b70  67 61 74 69 76 65 20 64  65 67 72 65 65 73 20 66  |gative degrees f|
00000b80  6f 72 20 53 6f 75 74 68  29 20 22 0d 02 da 21 20  |or South) "...! |
00000b90  ef 32 33 3b 32 39 31 39  34 3b 30 3b 30 3b 30 3b  |.23;29194;0;0;0;|
00000ba0  3a f4 20 63 75 72 73 6f  72 20 6f 6e 0d 02 e4 0d  |:. cursor on....|
00000bb0  e8 20 44 31 25 2c 4d 31  25 0d 02 ee 05 20 0d 02  |. D1%,M1%.... ..|
00000bc0  f8 19 20 f4 20 43 68 65  63 6b 20 4c 61 74 20 64  |.. . Check Lat d|
00000bd0  65 67 20 3c 3d 36 35 0d  03 02 11 20 58 31 25 20  |eg <=65.... X1% |
00000be0  3d 20 94 28 44 31 25 29  0d 03 0c 20 20 e7 20 58  |= .(D1%)...  . X|
00000bf0  31 25 3e 36 35 20 8c 20  f2 65 72 72 6f 72 31 20  |1%>65 . .error1 |
00000c00  3a 20 e5 20 8d 64 50 42  0d 03 16 06 20 3a 0d 03  |: . .dPB.... :..|
00000c10  20 1b 20 f4 20 43 68 65  63 6b 20 4c 61 74 20 4d  | . . Check Lat M|
00000c20  69 6e 73 20 72 61 6e 67  65 0d 03 2a 20 20 e7 20  |ins range..*  . |
00000c30  4d 31 25 3e 35 39 20 8c  20 f2 65 72 72 6f 72 32  |M1%>59 . .error2|
00000c40  20 3a 20 e5 20 8d 64 50  42 0d 03 34 05 20 0d 03  | : . .dPB..4. ..|
00000c50  3e 82 f1 27 22 45 6e 74  65 72 20 74 68 65 20 6f  |>..'"Enter the o|
00000c60  62 73 65 72 76 65 72 27  73 20 22 3b bd 31 33 31  |bserver's ";.131|
00000c70  3b 22 4c 6f 6e 67 69 74  75 64 65 22 3b bd 31 33  |;"Longitude";.13|
00000c80  35 3b 27 22 69 6e 20 44  65 67 72 65 65 73 20 61  |5;'"in Degrees a|
00000c90  6e 64 20 4d 69 6e 75 74  65 73 20 69 6e 22 27 22  |nd Minutes in"'"|
00000ca0  74 68 65 20 66 6f 72 6d  20 2d 31 31 34 2c 31 30  |the form -114,10|
00000cb0  22 27 22 28 4e 65 67 61  74 69 76 65 20 64 65 67  |"'"(Negative deg|
00000cc0  72 65 65 73 20 66 6f 72  20 45 61 73 74 29 20 22  |rees for East) "|
00000cd0  0d 03 48 0d e8 20 44 32  25 2c 4d 32 25 0d 03 52  |..H.. D2%,M2%..R|
00000ce0  05 20 0d 03 5c 1b 20 f4  20 43 68 65 63 6b 20 4c  |. ..\. . Check L|
00000cf0  6f 6e 67 20 64 65 67 20  72 61 6e 67 65 0d 03 66  |ong deg range..f|
00000d00  11 20 58 32 25 20 3d 20  94 28 44 32 25 29 0d 03  |. X2% = .(D2%)..|
00000d10  70 21 20 e7 20 58 32 25  3e 31 38 30 20 8c 20 f2  |p! . X2%>180 . .|
00000d20  65 72 72 6f 72 33 20 3a  20 e5 20 8d 54 7e 43 0d  |error3 : . .T~C.|
00000d30  03 7a 06 20 3a 0d 03 84  1c 20 f4 20 43 68 65 63  |.z. :.... . Chec|
00000d40  6b 20 4c 6f 6e 67 20 4d  69 6e 73 20 72 61 6e 67  |k Long Mins rang|
00000d50  65 0d 03 8e 20 20 e7 20  4d 32 25 3e 35 39 20 8c  |e...  . M2%>59 .|
00000d60  20 f2 65 72 72 6f 72 32  20 3a 20 e5 20 8d 54 7e  | .error2 : . .T~|
00000d70  43 0d 03 98 05 20 0d 03  a2 21 20 f4 20 45 6e 74  |C.... ...! . Ent|
00000d80  65 72 20 5a 6f 6e 65 20  61 64 6a 75 73 74 6d 65  |er Zone adjustme|
00000d90  6e 74 20 74 69 6d 65 0d  03 ac 06 20 db 0d 03 b6  |nt time.... ....|
00000da0  5a 20 f1 27 22 45 6e 74  65 72 20 74 68 65 22 3b  |Z .'"Enter the";|
00000db0  bd 31 33 31 3b 22 6c 6f  63 61 6c 20 74 69 6d 65  |.131;"local time|
00000dc0  20 61 64 6a 75 73 74 6d  65 6e 74 22 3b bd 31 33  | adjustment";.13|
00000dd0  35 3b 22 66 6f 72 20 74  68 65 20 63 68 6f 73 65  |5;"for the chose|
00000de0  6e 20 6c 6f 63 61 74 69  6f 6e 20 61 67 61 69 6e  |n location again|
00000df0  73 74 20 47 4d 54 22 0d  03 c0 25 20 f1 22 28 4e  |st GMT"...% ."(N|
00000e00  6f 20 66 72 61 63 74 69  6f 6e 61 6c 20 68 6f 75  |o fractional hou|
00000e10  72 73 2c 20 70 6c 65 61  73 65 29 22 0d 03 ca 09  |rs, please)"....|
00000e20  20 e8 20 4c 25 0d 03 d4  05 20 0d 03 de 1e 20 f4  | . L%.... .... .|
00000e30  20 45 6c 69 6d 69 6e 61  74 65 20 61 6e 79 20 6e  | Eliminate any n|
00000e40  65 67 61 74 69 76 65 73  0d 03 e8 1c 20 44 4c 41  |egatives.... DLA|
00000e50  25 3d 94 28 44 31 25 29  3a 44 4c 4f 25 3d 94 28  |%=.(D1%):DLO%=.(|
00000e60  44 32 25 29 0d 03 f2 05  20 0d 03 fc 21 20 f4 20  |D2%).... ...! . |
00000e70  43 6f 6e 76 65 72 74 20  74 6f 20 64 65 63 69 6d  |Convert to decim|
00000e80  61 6c 20 64 65 67 72 65  65 73 0d 04 06 15 4c 41  |al degrees....LA|
00000e90  54 3d 44 4c 41 25 2b 28  4d 31 25 2f 36 30 29 0d  |T=DLA%+(M1%/60).|
00000ea0  04 10 16 4c 4f 4e 47 3d  44 4c 4f 25 2b 28 4d 32  |...LONG=DLO%+(M2|
00000eb0  25 2f 36 30 29 0d 04 1a  05 20 0d 04 24 24 f4 20  |%/60).... ..$$. |
00000ec0  52 65 73 74 6f 72 65 20  61 6e 79 20 70 72 65 76  |Restore any prev|
00000ed0  69 6f 75 73 20 6e 65 67  61 74 69 76 65 73 0d 04  |ious negatives..|
00000ee0  2e 24 e7 20 44 31 25 3e  30 20 8c 20 4c 41 54 3d  |.$. D1%>0 . LAT=|
00000ef0  4c 41 54 20 8b 20 4c 41  54 3d 4c 41 54 2a 28 2d  |LAT . LAT=LAT*(-|
00000f00  31 29 0d 04 38 28 e7 20  44 32 25 3e 30 20 8c 20  |1)..8(. D2%>0 . |
00000f10  4c 4f 4e 47 3d 4c 4f 4e  47 20 8b 20 4c 4f 4e 47  |LONG=LONG . LONG|
00000f20  3d 4c 4f 4e 47 2a 28 2d  31 29 0d 04 42 05 20 0d  |=LONG*(-1)..B. .|
00000f30  04 4c 20 20 f4 20 43 68  65 63 6b 20 4c 54 20 63  |.L  . Check LT c|
00000f40  6f 72 72 65 63 74 69 6f  6e 20 72 61 6e 67 65 0d  |orrection range.|
00000f50  04 56 29 20 e7 20 28 4c  25 3c 2d 31 32 20 84 20  |.V) . (L%<-12 . |
00000f60  4c 25 3e 31 32 29 8c 20  f2 65 72 72 6f 72 35 20  |L%>12). .error5 |
00000f70  3a 20 e5 20 8d 44 70 43  0d 04 60 05 20 0d 04 6a  |: . .DpC..`. ..j|
00000f80  06 20 db 0d 04 74 11 20  f4 20 45 6e 74 65 72 20  |. ...t. . Enter |
00000f90  64 61 74 65 0d 04 7e 06  20 f5 0d 04 88 55 f1 27  |date..~. ....U.'|
00000fa0  22 45 6e 74 65 72 20 74  68 65 20 22 3b bd 31 33  |"Enter the ";.13|
00000fb0  31 3b 22 64 61 74 65 20  22 3b bd 31 33 35 3b 22  |1;"date ";.135;"|
00000fc0  69 6e 20 74 68 65 20 66  6f 72 6d 20 31 38 2c 31  |in the form 18,1|
00000fd0  31 20 22 27 22 66 6f 72  20 74 68 65 20 31 38 74  |1 "'"for the 18t|
00000fe0  68 20 6f 66 20 4e 6f 76  65 6d 62 65 72 20 22 0d  |h of November ".|
00000ff0  04 92 0b e8 20 64 25 2c  6d 25 0d 04 9c 22 20 fd  |.... d%,m%..." .|
00001000  20 64 25 3e 30 20 80 20  64 25 3c 33 32 20 80 20  | d%>0 . d%<32 . |
00001010  6d 25 3e 30 20 80 20 6d  25 3c 31 33 0d 04 a6 05  |m%>0 . m%<13....|
00001020  20 0d 04 b0 5d 20 e7 20  28 6d 25 3d 31 20 84 20  | ...] . (m%=1 . |
00001030  6d 25 3d 33 20 84 20 6d  25 3d 35 20 84 20 6d 25  |m%=3 . m%=5 . m%|
00001040  3d 37 20 84 20 6d 25 3d  38 20 84 20 6d 25 3d 31  |=7 . m%=8 . m%=1|
00001050  30 20 84 20 6d 25 3d 31  32 29 20 80 20 28 64 25  |0 . m%=12) . (d%|
00001060  3c 31 20 84 20 64 25 3e  33 31 29 20 8c 20 f2 65  |<1 . d%>31) . .e|
00001070  72 72 6f 72 34 20 3a 20  e5 20 8d 44 6a 44 0d 04  |rror4 : . .DjD..|
00001080  ba 3e 20 e7 20 28 6d 25  3d 34 20 84 20 6d 25 3d  |.> . (m%=4 . m%=|
00001090  36 20 84 20 6d 25 3d 39  20 84 20 6d 25 3d 31 31  |6 . m%=9 . m%=11|
000010a0  29 20 80 20 28 64 25 3c  31 20 84 20 64 25 3e 33  |) . (d%<1 . d%>3|
000010b0  30 29 20 8c 20 f2 65 72  72 6f 72 34 0d 04 c4 2f  |0) . .error4.../|
000010c0  20 e7 20 6d 25 3d 32 20  80 20 28 64 25 3c 31 20  | . m%=2 . (d%<1 |
000010d0  84 20 64 25 3e 32 38 29  20 8c 20 f2 65 72 72 6f  |. d%>28) . .erro|
000010e0  72 34 20 3a 20 e5 20 8d  44 6a 44 0d 04 ce 1e 20  |r4 : . .DjD.... |
000010f0  e7 20 6d 25 3d 31 20 8c  20 6d 6f 6e 74 68 24 3d  |. m%=1 . month$=|
00001100  22 4a 61 6e 75 61 72 79  22 0d 04 d8 1f 20 e7 20  |"January".... . |
00001110  6d 25 3d 32 20 8c 20 6d  6f 6e 74 68 24 3d 22 46  |m%=2 . month$="F|
00001120  65 62 72 75 61 72 79 22  0d 04 e2 1c 20 e7 20 6d  |ebruary".... . m|
00001130  25 3d 33 20 8c 20 6d 6f  6e 74 68 24 3d 22 4d 61  |%=3 . month$="Ma|
00001140  72 63 68 22 0d 04 ec 1c  20 e7 20 6d 25 3d 34 20  |rch".... . m%=4 |
00001150  8c 20 6d 6f 6e 74 68 24  3d 22 41 70 72 69 6c 22  |. month$="April"|
00001160  0d 04 f6 1a 20 e7 20 6d  25 3d 35 20 8c 20 6d 6f  |.... . m%=5 . mo|
00001170  6e 74 68 24 3d 22 4d 61  79 22 0d 05 00 1b 20 e7  |nth$="May".... .|
00001180  20 6d 25 3d 36 20 8c 20  6d 6f 6e 74 68 24 3d 22  | m%=6 . month$="|
00001190  4a 75 6e 65 22 0d 05 0a  1b 20 e7 20 6d 25 3d 37  |June".... . m%=7|
000011a0  20 8c 20 6d 6f 6e 74 68  24 3d 22 4a 75 6c 79 22  | . month$="July"|
000011b0  0d 05 14 1d 20 e7 20 6d  25 3d 38 20 8c 20 6d 6f  |.... . m%=8 . mo|
000011c0  6e 74 68 24 3d 22 41 75  67 75 73 74 22 0d 05 1e  |nth$="August"...|
000011d0  20 20 e7 20 6d 25 3d 39  20 8c 20 6d 6f 6e 74 68  |  . m%=9 . month|
000011e0  24 3d 22 53 65 70 74 65  6d 62 65 72 22 0d 05 28  |$="September"..(|
000011f0  1f 20 e7 20 6d 25 3d 31  30 20 8c 20 6d 6f 6e 74  |. . m%=10 . mont|
00001200  68 24 3d 22 4f 63 74 6f  62 65 72 22 0d 05 32 20  |h$="October"..2 |
00001210  20 e7 20 6d 25 3d 31 31  20 8c 20 6d 6f 6e 74 68  | . m%=11 . month|
00001220  24 3d 22 4e 6f 76 65 6d  62 65 72 22 0d 05 3c 20  |$="November"..< |
00001230  20 e7 20 6d 25 3d 31 32  20 8c 20 6d 6f 6e 74 68  | . m%=12 . month|
00001240  24 3d 22 44 65 63 65 6d  62 65 72 22 0d 05 46 06  |$="December"..F.|
00001250  20 3a 0d 05 50 4c 20 f4  20 43 6f 72 72 65 63 74  | :..PL . Correct|
00001260  69 6f 6e 20 66 6f 72 20  42 53 54 2c 20 61 75 74  |ion for BST, aut|
00001270  6f 6d 61 74 69 63 20 6f  70 65 72 61 74 69 6f 6e  |omatic operation|
00001280  20 6f 6e 6c 79 2e 20 41  63 63 75 72 61 74 65 20  | only. Accurate |
00001290  66 6f 72 20 31 39 38 37  20 6f 6e 6c 79 2e 0d 05  |for 1987 only...|
000012a0  5a 05 20 0d 05 64 b3 20  e7 20 28 74 72 79 24 3d  |Z. ..d. . (try$=|
000012b0  22 59 22 20 84 20 74 72  79 24 3d 22 79 22 29 20  |"Y" . try$="y") |
000012c0  80 20 28 47 25 3d 36 35  20 84 20 47 25 3d 39 37  |. (G%=65 . G%=97|
000012d0  20 84 20 47 25 3d 36 36  20 84 20 47 25 3d 39 38  | . G%=66 . G%=98|
000012e0  20 84 20 47 25 3d 36 37  20 84 20 47 25 3d 39 39  | . G%=67 . G%=99|
000012f0  29 20 80 20 28 28 6d 25  3d 33 20 80 20 64 25 3e  |) . ((m%=3 . d%>|
00001300  32 38 29 20 84 20 28 6d  25 3d 34 29 20 84 20 28  |28) . (m%=4) . (|
00001310  6d 25 3d 35 29 20 84 20  28 6d 25 3d 36 29 20 84  |m%=5) . (m%=6) .|
00001320  20 28 6d 25 3d 37 29 20  84 20 28 6d 25 3d 38 29  | (m%=7) . (m%=8)|
00001330  20 84 20 28 6d 25 3d 39  29 20 84 20 28 6d 25 3d  | . (m%=9) . (m%=|
00001340  31 30 20 80 20 64 25 3c  32 35 29 29 20 8c 20 4c  |10 . d%<25)) . L|
00001350  25 3d 4c 25 2b 31 0d 05  6e 25 20 f4 20 43 61 6c  |%=L%+1..n% . Cal|
00001360  63 75 6c 61 74 65 20 53  75 6e 72 69 73 65 20 26  |culate Sunrise &|
00001370  20 53 75 6e 73 65 74 20  47 4d 54 0d 05 78 1e 74  | Sunset GMT..x.t|
00001380  3d 30 2e 39 38 38 2a 28  64 25 2d 31 2b 33 30 2e  |=0.988*(d%-1+30.|
00001390  33 2a 28 6d 25 2d 31 29  29 0d 05 82 2b 45 3d 28  |3*(m%-1))...+E=(|
000013a0  30 2e 31 32 33 2a 9b 28  b2 28 74 2b 38 37 29 29  |0.123*.(.(t+87))|
000013b0  2d 28 b5 28 b2 28 28 32  2a 74 29 2b 32 30 29 29  |-(.(.((2*t)+20))|
000013c0  29 29 2f 36 0d 05 8c 19  44 33 3d 2d 32 33 2e 35  |))/6....D3=-23.5|
000013d0  2a 28 9b 28 b2 28 74 2b  31 30 29 29 29 0d 05 96  |*(.(.(t+10)))...|
000013e0  23 4e 3d 9d 28 95 28 2d  31 2a 28 b7 28 b2 28 44  |#N=.(.(-1*(.(.(D|
000013f0  33 29 29 29 2a b7 28 b2  28 4c 41 54 29 29 29 29  |3)))*.(.(LAT))))|
00001400  0d 05 a0 21 73 75 6e 72  69 73 65 3d 28 28 4c 4f  |...!sunrise=((LO|
00001410  4e 47 2d 4e 29 2f 31 35  29 2d 45 2b 31 31 2e 37  |NG-N)/15)-E+11.7|
00001420  37 0d 05 aa 20 73 75 6e  73 65 74 3d 28 28 4c 4f  |7... sunset=((LO|
00001430  4e 47 2b 4e 29 2f 31 35  29 2d 45 2b 31 32 2e 30  |NG+N)/15)-E+12.0|
00001440  34 0d 05 b4 05 20 0d 05  be 2e 20 f4 20 41 64 6a  |4.... .... . Adj|
00001450  75 73 74 20 47 4d 54 20  74 6f 20 62 65 20 70 6f  |ust GMT to be po|
00001460  73 69 74 69 76 65 20 61  6e 64 20 3c 32 34 20 68  |sitive and <24 h|
00001470  6f 75 72 73 0d 05 c8 49  20 e7 20 73 75 6e 72 69  |ours...I . sunri|
00001480  73 65 3e 32 34 20 8c 20  73 75 6e 72 69 73 65 3d  |se>24 . sunrise=|
00001490  73 75 6e 72 69 73 65 2d  32 34 20 8b 20 e7 20 73  |sunrise-24 . . s|
000014a0  75 6e 72 69 73 65 3c 30  20 8c 20 73 75 6e 72 69  |unrise<0 . sunri|
000014b0  73 65 3d 73 75 6e 72 69  73 65 2b 32 34 0d 05 d2  |se=sunrise+24...|
000014c0  43 20 e7 20 73 75 6e 73  65 74 3e 32 34 20 8c 20  |C . sunset>24 . |
000014d0  73 75 6e 73 65 74 3d 73  75 6e 73 65 74 2d 32 34  |sunset=sunset-24|
000014e0  20 8b 20 e7 20 73 75 6e  73 65 74 3c 30 20 8c 20  | . . sunset<0 . |
000014f0  73 75 6e 73 65 74 3d 73  75 6e 73 65 74 2b 32 34  |sunset=sunset+24|
00001500  0d 05 dc 05 20 0d 05 e6  1e 20 f4 20 43 6f 6e 76  |.... .... . Conv|
00001510  65 72 74 20 74 6f 20 68  72 73 20 61 6e 64 20 6d  |ert to hrs and m|
00001520  69 6e 73 0d 05 f0 29 20  41 25 3d a4 68 72 73 28  |ins...) A%=.hrs(|
00001530  73 75 6e 72 69 73 65 29  20 3a 20 42 25 3d a4 6d  |sunrise) : B%=.m|
00001540  69 6e 73 28 73 75 6e 72  69 73 65 29 0d 05 fa 27  |ins(sunrise)...'|
00001550  20 43 25 3d a4 68 72 73  28 73 75 6e 73 65 74 29  | C%=.hrs(sunset)|
00001560  20 3a 20 44 25 3d a4 6d  69 6e 73 28 73 75 6e 73  | : D%=.mins(suns|
00001570  65 74 29 0d 06 04 22 20  e7 20 42 25 3e 3d 36 30  |et)..." . B%>=60|
00001580  20 8c 20 41 25 3d 41 25  2b 31 20 3a 20 42 25 3d  | . A%=A%+1 : B%=|
00001590  42 25 2d 36 30 0d 06 0e  22 20 e7 20 44 25 3e 3d  |B%-60..." . D%>=|
000015a0  36 30 20 8c 20 43 25 3d  43 25 2b 31 20 3a 20 44  |60 . C%=C%+1 : D|
000015b0  25 3d 44 25 2d 36 30 0d  06 18 20 20 46 25 20 3d  |%=D%-60...  F% =|
000015c0  20 41 25 20 2b 20 4c 25  20 3a 20 48 25 20 3d 20  | A% + L% : H% = |
000015d0  43 25 20 2b 20 4c 25 0d  06 22 05 20 0d 06 2c 28  |C% + L%..". ..,(|
000015e0  20 f4 20 41 64 6a 75 73  74 20 6c 6f 63 61 6c 20  | . Adjust local |
000015f0  68 72 73 20 74 6f 20 62  65 20 3c 32 34 20 61 6e  |hrs to be <24 an|
00001600  64 20 3e 30 0d 06 36 2b  20 e7 20 46 25 3e 32 34  |d >0..6+ . F%>24|
00001610  20 8c 20 46 25 3d 46 25  2d 32 34 20 8b 20 e7 20  | . F%=F%-24 . . |
00001620  46 25 3c 30 20 8c 20 46  25 3d 46 25 2b 32 34 0d  |F%<0 . F%=F%+24.|
00001630  06 40 2b 20 e7 20 48 25  3e 32 34 20 8c 20 48 25  |.@+ . H%>24 . H%|
00001640  3d 48 25 2d 32 34 20 8b  20 e7 20 48 25 3c 30 20  |=H%-24 . . H%<0 |
00001650  8c 20 48 25 3d 48 25 2b  32 34 0d 06 4a 05 20 0d  |. H%=H%+24..J. .|
00001660  06 54 3a f4 20 43 6f 6e  76 65 72 74 20 72 65 73  |.T:. Convert res|
00001670  75 6c 74 73 20 74 6f 20  73 74 72 69 6e 67 73 20  |ults to strings |
00001680  66 6f 72 20 20 20 20 20  20 20 20 20 20 66 69 6e  |for          fin|
00001690  61 6c 20 66 6f 72 6d 61  74 0d 06 5e 3a 20 41 24  |al format..^: A$|
000016a0  3d c3 28 41 25 29 3a 42  24 3d c3 28 42 25 29 3a  |=.(A%):B$=.(B%):|
000016b0  43 24 3d c3 28 43 25 29  3a 44 24 3d c3 28 44 25  |C$=.(C%):D$=.(D%|
000016c0  29 3a 46 24 3d c3 28 46  25 29 3a 48 24 3d c3 28  |):F$=.(F%):H$=.(|
000016d0  48 25 29 0d 06 68 14 20  5a 25 3d 30 20 3a 20 5a  |H%)..h. Z%=0 : Z|
000016e0  24 3d c3 28 5a 25 29 0d  06 72 0b 20 50 24 3d 22  |$=.(Z%)..r. P$="|
000016f0  2e 22 0d 06 7c 05 20 0d  06 86 32 20 f4 20 49 6e  |."..|. ...2 . In|
00001700  73 65 72 74 20 7a 65 72  6f 73 20 69 66 20 68 72  |sert zeros if hr|
00001710  73 20 6f 72 20 6d 69 6e  73 20 20 20 20 20 20 20  |s or mins       |
00001720  20 20 20 20 20 20 3c 31  30 0d 06 90 6d 41 24 3d  |      <10...mA$=|
00001730  a4 7a 65 72 6f 28 41 25  2c 41 24 29 20 3a 20 42  |.zero(A%,A$) : B|
00001740  24 3d a4 7a 65 72 6f 28  42 25 2c 42 24 29 20 3a  |$=.zero(B%,B$) :|
00001750  20 43 24 3d a4 7a 65 72  6f 28 43 25 2c 43 24 29  | C$=.zero(C%,C$)|
00001760  20 3a 20 44 24 3d a4 7a  65 72 6f 28 44 25 2c 44  | : D$=.zero(D%,D|
00001770  24 29 20 3a 20 46 24 3d  a4 7a 65 72 6f 28 46 25  |$) : F$=.zero(F%|
00001780  2c 46 24 29 20 3a 20 48  24 3d a4 7a 65 72 6f 28  |,F$) : H$=.zero(|
00001790  48 25 2c 48 24 29 0d 06  9a 05 20 0d 06 a4 14 20  |H%,H$).... .... |
000017a0  f4 20 50 72 69 6e 74 20  52 65 73 75 6c 74 73 0d  |. Print Results.|
000017b0  06 ae 23 ef 31 32 2c 32  33 3b 38 32 30 32 3b 30  |..#.12,23;8202;0|
000017c0  3b 30 3b 30 3b 3a f4 20  43 75 72 73 6f 72 20 6f  |;0;0;:. Cursor o|
000017d0  66 66 0d 06 b8 0f 20 f2  5f 6c 6f 63 61 74 69 6f  |ff.... ._locatio|
000017e0  6e 0d 06 c2 0f 20 64 61  79 24 3d c3 28 64 25 29  |n.... day$=.(d%)|
000017f0  0d 06 cc 0f 20 73 70 61  63 65 24 3d 22 20 22 0d  |.... space$=" ".|
00001800  06 d6 1d 20 64 61 74 65  24 3d a4 64 61 74 65 28  |... date$=.date(|
00001810  64 61 79 24 2c 6d 6f 6e  74 68 24 29 0d 06 e0 51  |day$,month$)...Q|
00001820  20 e7 20 74 72 79 24 3d  22 59 22 20 84 20 74 72  | . try$="Y" . tr|
00001830  79 24 3d 22 79 22 20 8c  20 f1 8a 30 2c 36 29 22  |y$="y" . ..0,6)"|
00001840  22 3a f2 5f 43 45 4e 54  52 45 28 6c 6f 63 61 74  |":._CENTRE(locat|
00001850  69 6f 6e 24 2c 31 33 34  29 3a f2 5f 43 45 4e 54  |ion$,134):._CENT|
00001860  52 45 28 64 61 74 65 24  2c 31 33 34 29 0d 06 ea  |RE(date$,134)...|
00001870  4d f1 8a 30 2c 31 31 29  3b bd 28 31 33 31 29 3b  |M..0,11);.(131);|
00001880  22 53 55 4e 52 49 53 45  20 69 73 20 61 74 20 22  |"SUNRISE is at "|
00001890  3b a4 74 69 6d 28 41 24  2c 42 24 29 3b 22 20 47  |;.tim(A$,B$);" G|
000018a0  4d 54 2c 20 22 3b a4 74  69 6d 28 46 24 2c 42 24  |MT, ";.tim(F$,B$|
000018b0  29 3b 22 20 4c 6f 63 61  6c 22 0d 06 f4 05 20 0d  |);" Local".... .|
000018c0  06 fe 4d f1 8a 30 2c 31  33 29 3b bd 28 31 32 39  |..M..0,13);.(129|
000018d0  29 3b 22 53 55 4e 53 45  54 20 20 69 73 20 61 74  |);"SUNSET  is at|
000018e0  20 22 3b a4 74 69 6d 28  43 24 2c 44 24 29 3b 22  | ";.tim(C$,D$);"|
000018f0  20 47 4d 54 2c 20 22 3b  a4 74 69 6d 28 48 24 2c  | GMT, ";.tim(H$,|
00001900  44 24 29 3b 22 20 4c 6f  63 61 6c 22 0d 07 08 05  |D$);" Local"....|
00001910  20 0d 07 12 16 20 d1 20  3d 20 30 3a 20 f5 3a 20  | .... . = 0: .: |
00001920  fd 20 91 3d 35 30 30 0d  07 1c 2d 20 f1 8a 38 2c  |. .=500...- ..8,|
00001930  32 34 29 3b bd 28 31 33  30 29 3b 22 50 52 45 53  |24);.(130);"PRES|
00001940  53 20 27 53 70 61 63 65  27 20 54 4f 20 52 45 52  |S 'Space' TO RER|
00001950  55 4e 22 3b 0d 07 26 18  20 e7 20 a5 3d 33 32 20  |UN";..&. . .=32 |
00001960  8c 20 db 20 3a 20 e5 20  8d 54 6c 41 0d 07 30 05  |. . : . .TlA..0.|
00001970  20 0d 07 3a 06 20 e0 0d  07 44 05 20 0d 07 4e 19  | ..:. ...D. ..N.|
00001980  20 dd 20 f2 77 6f 72 64  5f 70 72 69 6e 74 28 50  | . .word_print(P|
00001990  24 2c 4c 25 29 0d 07 58  16 20 ea 20 77 6f 72 64  |$,L%)..X. . word|
000019a0  24 2c 20 49 25 2c 20 64  6f 6e 65 0d 07 62 0d 20  |$, I%, done..b. |
000019b0  64 6f 6e 65 20 3d 20 a3  0d 07 6c 05 f5 0d 07 76  |done = ...l....v|
000019c0  13 20 49 25 20 3d 20 a7  50 24 2c 20 22 20 22 29  |. I% = .P$, " ")|
000019d0  0d 07 80 14 20 77 6f 72  64 24 20 3d 20 c0 50 24  |.... word$ = .P$|
000019e0  2c 49 25 29 0d 07 8a 15  20 50 24 3d 20 c2 50 24  |,I%).... P$= .P$|
000019f0  2c a9 20 50 24 2d 49 25  29 0d 07 94 18 20 e7 20  |,. P$-I%).... . |
00001a00  50 24 3d 20 22 22 20 8c  20 64 6f 6e 65 20 3d 20  |P$= "" . done = |
00001a10  b9 0d 07 9e 23 20 e7 20  49 25 20 3d 20 30 20 8c  |....# . I% = 0 .|
00001a20  20 77 6f 72 64 24 20 3d  50 24 3a 20 64 6f 6e 65  | word$ =P$: done|
00001a30  20 3d 20 b9 0d 07 a8 17  20 e7 20 a9 20 77 6f 72  | = ..... . . wor|
00001a40  64 24 3e 4c 25 2d 9c 20  8c 20 f1 0d 07 b2 0e 20  |d$>L%-. . ..... |
00001a50  f1 20 77 6f 72 64 24 20  3b 0d 07 bc 0b 20 fd 20  |. word$ ;.... . |
00001a60  64 6f 6e 65 0d 07 c6 06  20 e1 0d 07 d0 05 20 0d  |done.... ..... .|
00001a70  07 da 0e 20 dd 20 f2 65  72 72 6f 72 31 0d 07 e4  |... . .error1...|
00001a80  07 20 ef 37 0d 07 ee 0b  20 f1 27 27 27 27 27 0d  |. .7.... .'''''.|
00001a90  07 f8 36 20 f2 5f 43 45  4e 54 52 45 28 22 4c 61  |..6 ._CENTRE("La|
00001aa0  74 69 74 75 64 65 73 20  6f 76 65 72 20 36 35 20  |titudes over 65 |
00001ab0  64 65 67 72 65 65 73 20  70 72 6f 64 75 63 65 22  |degrees produce"|
00001ac0  2c 31 32 39 29 0d 08 02  31 20 f2 5f 43 45 4e 54  |,129)...1 ._CENT|
00001ad0  52 45 28 22 6c 61 72 67  65 20 65 72 72 6f 72 73  |RE("large errors|
00001ae0  2c 20 61 6e 64 20 61 72  65 20 62 61 72 72 65 64  |, and are barred|
00001af0  22 2c 31 32 39 29 0d 08  0c 25 20 f2 5f 43 45 4e  |",129)...% ._CEN|
00001b00  54 52 45 28 22 50 6c 65  61 73 65 20 74 72 79 20  |TRE("Please try |
00001b10  61 67 61 69 6e 22 2c 31  32 39 29 0d 08 16 0f 20  |again",129).... |
00001b20  f2 5f 63 6f 6e 74 69 6e  75 65 0d 08 20 06 20 e1  |._continue.. . .|
00001b30  0d 08 2a 05 20 0d 08 34  0c dd f2 65 72 72 6f 72  |..*. ..4...error|
00001b40  32 0d 08 3e 06 ef 37 0d  08 48 0b 20 f1 27 27 27  |2..>..7..H. .'''|
00001b50  27 27 0d 08 52 29 20 f2  5f 43 45 4e 54 52 45 28  |''..R) ._CENTRE(|
00001b60  22 50 6c 65 61 73 65 20  65 6e 74 65 72 20 4d 69  |"Please enter Mi|
00001b70  6e 75 74 65 73 22 2c 31  32 39 29 0d 08 5c 25 20  |nutes",129)..\% |
00001b80  f2 5f 43 45 4e 54 52 45  28 22 77 69 74 68 69 6e  |._CENTRE("within|
00001b90  20 74 68 65 20 72 61 6e  67 65 22 2c 31 32 39 29  | the range",129)|
00001ba0  0d 08 66 1c 20 f2 5f 43  45 4e 54 52 45 28 22 30  |..f. ._CENTRE("0|
00001bb0  20 74 6f 20 35 39 22 2c  31 32 39 29 0d 08 70 25  | to 59",129)..p%|
00001bc0  20 f2 5f 43 45 4e 54 52  45 28 22 50 6c 65 61 73  | ._CENTRE("Pleas|
00001bd0  65 20 74 72 79 20 61 67  61 69 6e 22 2c 31 32 39  |e try again",129|
00001be0  29 0d 08 7a 0f 20 f2 5f  63 6f 6e 74 69 6e 75 65  |)..z. ._continue|
00001bf0  0d 08 84 05 e1 0d 08 8e  05 20 0d 08 98 0d 20 dd  |......... .... .|
00001c00  f2 65 72 72 6f 72 33 0d  08 a2 06 ef 37 0d 08 ac  |.error3.....7...|
00001c10  06 20 f1 0d 08 b6 33 20  f2 5f 43 45 4e 54 52 45  |. ....3 ._CENTRE|
00001c20  28 22 50 6c 65 61 73 65  20 65 6e 74 65 72 20 4c  |("Please enter L|
00001c30  6f 6e 67 69 74 75 64 65  20 64 65 67 72 65 65 73  |ongitude degrees|
00001c40  22 2c 31 32 39 29 0d 08  c0 25 20 f2 5f 43 45 4e  |",129)...% ._CEN|
00001c50  54 52 45 28 22 77 69 74  68 69 6e 20 74 68 65 20  |TRE("within the |
00001c60  72 61 6e 67 65 22 2c 31  32 39 29 0d 08 ca 20 20  |range",129)...  |
00001c70  f2 5f 43 45 4e 54 52 45  28 22 2d 31 38 30 20 74  |._CENTRE("-180 t|
00001c80  6f 20 31 38 30 22 2c 31  32 39 29 0d 08 d4 25 20  |o 180",129)...% |
00001c90  f2 5f 43 45 4e 54 52 45  28 22 50 6c 65 61 73 65  |._CENTRE("Please|
00001ca0  20 74 72 79 20 61 67 61  69 6e 22 2c 31 32 39 29  | try again",129)|
00001cb0  0d 08 de 0f 20 f2 5f 63  6f 6e 74 69 6e 75 65 0d  |.... ._continue.|
00001cc0  08 e8 05 e1 0d 08 f2 05  20 0d 08 fc 05 20 0d 09  |........ .... ..|
00001cd0  06 0d 20 dd f2 65 72 72  6f 72 34 0d 09 10 06 ef  |.. ..error4.....|
00001ce0  37 0d 09 1a 0b 20 f1 27  27 27 27 27 0d 09 24 2b  |7.... .'''''..$+|
00001cf0  20 f2 5f 43 45 4e 54 52  45 28 22 54 68 65 72 65  | ._CENTRE("There|
00001d00  20 61 72 65 6e 27 74 20  74 68 61 74 20 6d 61 6e  | aren't that man|
00001d10  79 22 2c 31 32 39 29 0d  09 2e 29 20 f2 5f 43 45  |y",129)...) ._CE|
00001d20  4e 54 52 45 28 22 64 61  79 73 20 69 6e 20 74 68  |NTRE("days in th|
00001d30  61 74 20 6d 6f 6e 74 68  20 21 22 2c 31 32 39 29  |at month !",129)|
00001d40  0d 09 38 25 20 f2 5f 43  45 4e 54 52 45 28 22 50  |..8% ._CENTRE("P|
00001d50  6c 65 61 73 65 20 74 72  79 20 61 67 61 69 6e 22  |lease try again"|
00001d60  2c 31 32 39 29 0d 09 42  0f 20 f2 5f 63 6f 6e 74  |,129)..B. ._cont|
00001d70  69 6e 75 65 0d 09 4c 05  e1 0d 09 56 05 20 0d 09  |inue..L....V. ..|
00001d80  60 0c dd f2 65 72 72 6f  72 35 0d 09 6a 07 20 ef  |`...error5..j. .|
00001d90  37 0d 09 74 06 20 f1 0d  09 7e 27 20 f2 5f 43 45  |7..t. ...~' ._CE|
00001da0  4e 54 52 45 28 22 50 6c  65 61 73 65 20 65 6e 74  |NTRE("Please ent|
00001db0  65 72 20 6c 6f 63 61 6c  22 2c 31 32 39 29 0d 09  |er local",129)..|
00001dc0  88 24 20 f2 5f 43 45 4e  54 52 45 28 22 74 69 6d  |.$ ._CENTRE("tim|
00001dd0  65 20 63 6f 72 72 65 63  74 69 6f 6e 22 2c 31 32  |e correction",12|
00001de0  39 29 0d 09 92 25 20 f2  5f 43 45 4e 54 52 45 28  |9)...% ._CENTRE(|
00001df0  22 77 69 74 68 69 6e 20  74 68 65 20 72 61 6e 67  |"within the rang|
00001e00  65 22 2c 31 32 39 29 0d  09 9c 1f 20 f2 5f 43 45  |e",129).... ._CE|
00001e10  4e 54 52 45 28 22 2d 31  32 20 74 6f 20 31 32 2e  |NTRE("-12 to 12.|
00001e20  22 2c 31 32 39 29 0d 09  a6 07 20 f1 27 0d 09 b0  |",129).... .'...|
00001e30  27 20 f2 5f 43 45 4e 54  52 45 28 22 50 6c 65 61  |' ._CENTRE("Plea|
00001e40  73 65 20 61 6c 73 6f 20  65 6e 73 75 72 65 22 2c  |se also ensure",|
00001e50  31 32 39 29 0d 09 ba 27  20 f2 5f 43 45 4e 54 52  |129)...' ._CENTR|
00001e60  45 28 22 74 68 61 74 20  69 74 20 69 73 20 63 6f  |E("that it is co|
00001e70  72 72 65 63 74 22 2c 31  32 39 29 0d 09 c4 2f 20  |rrect",129).../ |
00001e80  f2 5f 43 45 4e 54 52 45  28 22 66 6f 72 20 74 68  |._CENTRE("for th|
00001e90  65 20 6c 6f 6e 67 69 74  75 64 65 20 65 6e 74 65  |e longitude ente|
00001ea0  72 65 64 2e 22 2c 31 32  39 29 0d 09 ce 25 20 f2  |red.",129)...% .|
00001eb0  5f 43 45 4e 54 52 45 28  22 50 6c 65 61 73 65 20  |_CENTRE("Please |
00001ec0  74 72 79 20 61 67 61 69  6e 22 2c 31 32 39 29 0d  |try again",129).|
00001ed0  09 d8 0f 20 f2 5f 63 6f  6e 74 69 6e 75 65 0d 09  |... ._continue..|
00001ee0  e2 05 e1 0d 09 ec 05 20  0d 09 f6 18 20 dd 20 a4  |....... .... . .|
00001ef0  68 72 73 28 58 31 29 3a  20 3d 20 a8 28 58 31 29  |hrs(X1): = .(X1)|
00001f00  0d 0a 00 05 20 0d 0a 0a  10 20 dd 20 a4 6d 69 6e  |.... .... . .min|
00001f10  73 28 58 31 29 0d 0a 14  20 20 3d 20 a8 28 28 36  |s(X1)...  = .((6|
00001f20  30 2a 28 58 31 2d a4 68  72 73 28 58 31 29 29 29  |0*(X1-.hrs(X1)))|
00001f30  2b 30 2e 35 29 0d 0a 1e  05 20 0d 0a 28 13 20 dd  |+0.5).... ..(. .|
00001f40  20 a4 7a 65 72 6f 28 58  25 2c 58 24 29 0d 0a 32  | .zero(X%,X$)..2|
00001f50  20 20 e7 20 58 25 3e 3d  31 30 20 8c 20 58 24 3d  |  . X%>=10 . X$=|
00001f60  58 24 20 8b 20 58 24 3d  5a 24 2b 58 24 0d 0a 3c  |X$ . X$=Z$+X$..<|
00001f70  09 20 3d 20 58 24 0d 0a  46 05 20 0d 0a 50 23 20  |. = X$..F. ..P# |
00001f80  dd 20 a4 74 69 6d 28 78  24 2c 79 24 29 20 3a 20  |. .tim(x$,y$) : |
00001f90  3d 20 78 24 20 2b 20 50  24 20 2b 20 79 24 0d 0a  |= x$ + P$ + y$..|
00001fa0  5a 05 20 0d 0a 64 28 20  dd 20 a4 64 61 74 65 28  |Z. ..d( . .date(|
00001fb0  61 24 2c 62 24 29 20 3a  20 3d 20 61 24 20 2b 20  |a$,b$) : = a$ + |
00001fc0  73 70 61 63 65 24 20 2b  20 62 24 0d 0a 6e 06 20  |space$ + b$..n. |
00001fd0  3a 0d 0a 78 10 20 dd f2  5f 65 78 61 6d 70 6c 65  |:..x. .._example|
00001fe0  73 0d 0a 82 06 20 db 0d  0a 8c 34 20 f1 27 bd 28  |s.... ....4 .'.(|
00001ff0  31 33 30 29 3b 22 4e 6f  74 65 20 74 68 61 74 20  |130);"Note that |
00002000  55 4b 20 53 75 6d 6d 65  72 20 74 69 6d 65 20 20  |UK Summer time  |
00002010  3d 20 20 47 4d 54 20 2b  20 31 22 0d 0a 96 18 20  |=  GMT + 1".... |
00002020  f1 bd 28 31 33 31 29 3b  8a 33 33 29 22 4c 6f 63  |..(131);.33)"Loc|
00002030  61 6c 22 0d 0a a0 3d 20  f1 bd 28 31 33 31 29 3b  |al"...= ..(131);|
00002040  22 20 4c 6f 63 61 74 69  6f 6e 22 3b 8a 31 38 29  |" Location";.18)|
00002050  3b 22 4c 61 74 2e 22 3b  8a 32 37 29 3b 22 4c 6f  |;"Lat.";.27);"Lo|
00002060  6e 67 2e 22 3b 8a 33 33  29 3b 22 54 69 6d 65 22  |ng.";.33);"Time"|
00002070  0d 0a aa 3c 20 f1 22 41  20 47 72 65 65 6e 77 69  |...< ."A Greenwi|
00002080  63 68 22 3b 8a 31 36 29  3b 22 20 35 31 2c 32 39  |ch";.16);" 51,29|
00002090  22 3b 8a 32 34 29 3b 22  20 20 20 30 2c 30 30 22  |";.24);"   0,00"|
000020a0  3b 8a 33 33 29 3b 22 20  20 20 30 22 0d 0a b4 40  |;.33);"   0"...@|
000020b0  20 f1 22 42 20 4a 6f 68  6e 20 4f 27 47 72 6f 61  | ."B John O'Groa|
000020c0  74 73 22 3b 8a 31 36 29  3b 22 20 35 38 2c 34 30  |ts";.16);" 58,40|
000020d0  22 3b 8a 32 34 29 3b 22  20 20 20 33 2c 35 32 22  |";.24);"   3,52"|
000020e0  3b 8a 33 33 29 3b 22 20  20 20 30 22 0d 0a be 3c  |;.33);"   0"...<|
000020f0  20 f1 22 43 20 4c 61 6e  64 73 20 45 6e 64 22 3b  | ."C Lands End";|
00002100  8a 31 36 29 3b 22 20 35  30 2c 30 34 22 3b 8a 32  |.16);" 50,04";.2|
00002110  34 29 3b 22 20 20 20 35  2c 34 32 22 3b 8a 33 33  |4);"   5,42";.33|
00002120  29 3b 22 20 20 20 30 22  0d 0a c8 3c 20 f1 22 44  |);"   0"...< ."D|
00002130  20 52 65 79 6b 6a 61 76  69 6b 22 3b 8a 31 36 29  | Reykjavik";.16)|
00002140  3b 22 20 36 34 2c 30 38  22 3b 8a 32 34 29 3b 22  |;" 64,08";.24);"|
00002150  20 20 32 31 2c 35 32 22  3b 8a 33 33 29 3b 22 20  |  21,52";.33);" |
00002160  2d 20 32 22 0d 0a d2 3c  20 f1 22 45 20 46 61 6c  |- 2"...< ."E Fal|
00002170  6b 6c 61 6e 64 73 22 3b  8a 31 36 29 3b 22 2d 35  |klands";.16);"-5|
00002180  31 2c 35 30 22 3b 8a 32  34 29 3b 22 20 20 35 37  |1,50";.24);"  57|
00002190  2c 35 33 22 3b 8a 33 33  29 3b 22 20 2d 20 33 22  |,53";.33);" - 3"|
000021a0  0d 0a dc 3b 20 f1 22 46  20 42 61 72 62 61 64 6f  |...; ."F Barbado|
000021b0  73 22 3b 8a 31 36 29 3b  22 20 31 33 2c 30 36 22  |s";.16);" 13,06"|
000021c0  3b 8a 32 34 29 3b 22 20  20 35 39 2c 33 34 22 3b  |;.24);"  59,34";|
000021d0  8a 33 33 29 3b 22 20 2d  20 34 22 0d 0a e6 3b 20  |.33);" - 4"...; |
000021e0  f1 22 47 20 4e 65 77 20  59 6f 72 6b 22 3b 8a 31  |."G New York";.1|
000021f0  36 29 3b 22 20 34 30 2c  34 31 22 3b 8a 32 34 29  |6);" 40,41";.24)|
00002200  3b 22 20 20 37 33 2c 35  30 22 3b 8a 33 33 29 3b  |;"  73,50";.33);|
00002210  22 20 2d 20 35 22 0d 0a  f0 40 20 f1 22 48 20 53  |" - 5"...@ ."H S|
00002220  61 6e 20 46 72 61 6e 63  69 73 63 6f 22 3b 8a 31  |an Francisco";.1|
00002230  36 29 3b 22 20 33 37 2c  34 37 22 3b 8a 32 34 29  |6);" 37,47";.24)|
00002240  3b 22 20 31 32 32 2c 32  39 22 3b 8a 33 33 29 3b  |;" 122,29";.33);|
00002250  22 20 2d 20 38 22 0d 0a  fa 3c 20 f1 22 4a 20 41  |" - 8"...< ."J A|
00002260  6e 63 68 6f 72 61 67 65  22 3b 8a 31 36 29 3b 22  |nchorage";.16);"|
00002270  20 36 31 2c 31 33 22 3b  8a 32 34 29 3b 22 20 31  | 61,13";.24);" 1|
00002280  35 30 2c 30 30 22 3b 8a  33 33 29 3b 22 20 2d 20  |50,00";.33);" - |
00002290  39 22 0d 0b 04 3b 20 f1  22 4b 20 48 6f 6e 6f 6c  |9"...; ."K Honol|
000022a0  75 6c 75 22 3b 8a 31 36  29 3b 22 20 32 31 2c 31  |ulu";.16);" 21,1|
000022b0  39 22 3b 8a 32 34 29 3b  22 20 31 35 37 2c 35 36  |9";.24);" 157,56|
000022c0  22 3b 8a 33 33 29 3b 22  20 2d 31 30 22 0d 0b 0e  |";.33);" -10"...|
000022d0  37 20 f1 22 4c 20 46 69  6a 69 22 3b 8a 31 36 29  |7 ."L Fiji";.16)|
000022e0  3b 22 2d 31 38 2c 31 30  22 3b 8a 32 34 29 3b 22  |;"-18,10";.24);"|
000022f0  2d 31 37 38 2c 32 38 22  3b 8a 33 33 29 3b 22 20  |-178,28";.33);" |
00002300  20 31 32 22 0d 0b 18 39  20 f1 22 4d 20 53 79 64  | 12"...9 ."M Syd|
00002310  6e 65 79 22 3b 8a 31 36  29 3b 22 2d 33 33 2c 35  |ney";.16);"-33,5|
00002320  34 22 3b 8a 32 34 29 3b  22 2d 31 35 31 2c 30 36  |4";.24);"-151,06|
00002330  22 3b 8a 33 33 29 3b 22  20 20 31 30 22 0d 0b 22  |";.33);"  10".."|
00002340  3c 20 f1 22 4e 20 48 6f  6e 67 20 4b 6f 6e 67 22  |< ."N Hong Kong"|
00002350  3b 8a 31 36 29 3b 22 20  32 32 2c 31 38 22 3b 8a  |;.16);" 22,18";.|
00002360  32 34 29 3b 22 2d 31 31  34 2c 31 30 22 3b 8a 33  |24);"-114,10";.3|
00002370  33 29 3b 22 20 20 20 38  22 0d 0b 2c 3c 20 f1 22  |3);"   8"..,< ."|
00002380  50 20 53 69 6e 67 61 70  6f 72 65 22 3b 8a 31 36  |P Singapore";.16|
00002390  29 3b 22 20 20 31 2c 32  33 22 3b 8a 32 34 29 3b  |);"  1,23";.24);|
000023a0  22 2d 31 30 33 2c 34 33  22 3b 8a 33 33 29 3b 22  |"-103,43";.33);"|
000023b0  20 20 20 38 22 0d 0b 36  3a 20 f1 22 51 20 4b 61  |   8"..6: ."Q Ka|
000023c0  72 61 63 68 69 22 3b 8a  31 36 29 3b 22 20 32 34  |rachi";.16);" 24|
000023d0  2c 35 31 22 3b 8a 32 34  29 3b 22 20 2d 36 37 2c  |,51";.24);" -67,|
000023e0  30 32 22 3b 8a 33 33 29  3b 22 20 20 20 35 22 0d  |02";.33);"   5".|
000023f0  0b 40 3a 20 f1 22 52 20  4e 61 69 72 6f 62 69 22  |.@: ."R Nairobi"|
00002400  3b 8a 31 36 29 3b 22 20  2d 31 2c 31 36 22 3b 8a  |;.16);" -1,16";.|
00002410  32 34 29 3b 22 20 2d 33  36 2c 35 33 22 3b 8a 33  |24);" -36,53";.3|
00002420  33 29 3b 22 20 20 20 33  22 0d 0b 4a 3b 20 f1 22  |3);"   3"..J; ."|
00002430  53 20 43 61 70 65 74 6f  77 6e 22 3b 8a 31 36 29  |S Capetown";.16)|
00002440  3b 22 2d 33 33 2c 35 39  22 3b 8a 32 34 29 3b 22  |;"-33,59";.24);"|
00002450  20 2d 31 38 2c 32 31 22  3b 8a 33 33 29 3b 22 20  | -18,21";.33);" |
00002460  20 20 32 22 0d 0b 54 05  e1 0d 0b 5e 05 20 0d 0b  |  2"..T....^. ..|
00002470  68 10 20 dd f2 5f 63 6f  6e 74 69 6e 75 65 0d 0b  |h. .._continue..|
00002480  72 06 20 f5 0d 0b 7c 2f  f1 8a 35 2c 32 34 29 3b  |r. ...|/..5,24);|
00002490  bd 28 31 33 30 29 3b 22  50 52 45 53 53 20 27 53  |.(130);"PRESS 'S|
000024a0  50 41 43 45 27 20 54 4f  20 43 4f 4e 54 49 4e 55  |PACE' TO CONTINU|
000024b0  45 22 3b 0d 0b 86 0e fd  20 a5 3d 33 32 20 3a 20  |E";..... .=32 : |
000024c0  db 0d 0b 90 06 20 e1 0d  0b 9a 05 3a 0d 0b a4 0f  |..... .....:....|
000024d0  dd f2 5f 6c 6f 63 61 74  69 6f 6e 0d 0b ae 2b e7  |.._location...+.|
000024e0  20 47 25 3d 36 35 20 84  20 47 25 3d 39 37 20 8c  | G%=65 . G%=97 .|
000024f0  20 6c 6f 63 61 74 69 6f  6e 24 3d 22 47 72 65 65  | location$="Gree|
00002500  6e 77 69 63 68 22 0d 0b  b8 2f e7 20 47 25 3d 36  |nwich".../. G%=6|
00002510  36 20 84 20 47 25 3d 39  38 20 8c 20 6c 6f 63 61  |6 . G%=98 . loca|
00002520  74 69 6f 6e 24 3d 22 4a  6f 68 6e 20 4f 27 47 72  |tion$="John O'Gr|
00002530  6f 61 74 73 22 0d 0b c2  2b e7 20 47 25 3d 36 37  |oats"...+. G%=67|
00002540  20 84 20 47 25 3d 39 39  20 8c 20 6c 6f 63 61 74  | . G%=99 . locat|
00002550  69 6f 6e 24 3d 22 4c 61  6e 64 73 20 45 6e 64 22  |ion$="Lands End"|
00002560  0d 0b cc 2c e7 20 47 25  3d 36 38 20 84 20 47 25  |...,. G%=68 . G%|
00002570  3d 31 30 30 20 8c 20 6c  6f 63 61 74 69 6f 6e 24  |=100 . location$|
00002580  3d 22 52 65 79 6b 6a 61  76 69 6b 22 0d 0b d6 2c  |="Reykjavik"...,|
00002590  e7 20 47 25 3d 36 39 20  84 20 47 25 3d 31 30 31  |. G%=69 . G%=101|
000025a0  20 8c 20 6c 6f 63 61 74  69 6f 6e 24 3d 22 46 61  | . location$="Fa|
000025b0  6c 6b 6c 61 6e 64 73 22  0d 0b e0 2b e7 20 47 25  |lklands"...+. G%|
000025c0  3d 37 30 20 84 20 47 25  3d 31 30 32 20 8c 20 6c  |=70 . G%=102 . l|
000025d0  6f 63 61 74 69 6f 6e 24  3d 22 42 61 72 62 61 64  |ocation$="Barbad|
000025e0  6f 73 22 0d 0b ea 2b e7  20 47 25 3d 37 31 20 84  |os"...+. G%=71 .|
000025f0  20 47 25 3d 31 30 33 20  8c 20 6c 6f 63 61 74 69  | G%=103 . locati|
00002600  6f 6e 24 3d 22 4e 65 77  20 59 6f 72 6b 22 0d 0b  |on$="New York"..|
00002610  f4 30 e7 20 47 25 3d 37  32 20 84 20 47 25 3d 31  |.0. G%=72 . G%=1|
00002620  30 34 20 8c 20 6c 6f 63  61 74 69 6f 6e 24 3d 22  |04 . location$="|
00002630  53 61 6e 20 46 72 61 6e  63 69 73 63 6f 22 0d 0b  |San Francisco"..|
00002640  fe 2c e7 20 47 25 3d 37  34 20 84 20 47 25 3d 31  |.,. G%=74 . G%=1|
00002650  30 36 20 8c 20 6c 6f 63  61 74 69 6f 6e 24 3d 22  |06 . location$="|
00002660  41 6e 63 68 6f 72 61 67  65 22 0d 0c 08 2b e7 20  |Anchorage"...+. |
00002670  47 25 3d 37 35 20 84 20  47 25 3d 31 30 37 20 8c  |G%=75 . G%=107 .|
00002680  20 6c 6f 63 61 74 69 6f  6e 24 3d 22 48 6f 6e 6f  | location$="Hono|
00002690  6c 75 6c 75 22 0d 0c 12  27 e7 20 47 25 3d 37 36  |lulu"...'. G%=76|
000026a0  20 84 20 47 25 3d 31 30  38 20 8c 20 6c 6f 63 61  | . G%=108 . loca|
000026b0  74 69 6f 6e 24 3d 22 46  69 6a 69 22 0d 0c 1c 29  |tion$="Fiji"...)|
000026c0  e7 20 47 25 3d 37 37 20  84 20 47 25 3d 31 30 39  |. G%=77 . G%=109|
000026d0  20 8c 20 6c 6f 63 61 74  69 6f 6e 24 3d 22 53 79  | . location$="Sy|
000026e0  64 6e 65 79 22 0d 0c 26  2c e7 20 47 25 3d 37 38  |dney"..&,. G%=78|
000026f0  20 84 20 47 25 3d 31 31  30 20 8c 20 6c 6f 63 61  | . G%=110 . loca|
00002700  74 69 6f 6e 24 3d 22 48  6f 6e 67 20 4b 6f 6e 67  |tion$="Hong Kong|
00002710  22 0d 0c 30 2c e7 20 47  25 3d 38 30 20 84 20 47  |"..0,. G%=80 . G|
00002720  25 3d 31 31 32 20 8c 20  6c 6f 63 61 74 69 6f 6e  |%=112 . location|
00002730  24 3d 22 53 69 6e 67 61  70 6f 72 65 22 0d 0c 3a  |$="Singapore"..:|
00002740  2a e7 20 47 25 3d 38 31  20 84 20 47 25 3d 31 31  |*. G%=81 . G%=11|
00002750  33 20 8c 20 6c 6f 63 61  74 69 6f 6e 24 3d 22 4b  |3 . location$="K|
00002760  61 72 61 63 68 69 22 0d  0c 44 2a e7 20 47 25 3d  |arachi"..D*. G%=|
00002770  38 32 20 84 20 47 25 3d  31 31 34 20 8c 20 6c 6f  |82 . G%=114 . lo|
00002780  63 61 74 69 6f 6e 24 3d  22 4e 61 69 72 6f 62 69  |cation$="Nairobi|
00002790  22 0d 0c 4e 2b e7 20 47  25 3d 38 33 20 84 20 47  |"..N+. G%=83 . G|
000027a0  25 3d 31 31 35 20 8c 20  6c 6f 63 61 74 69 6f 6e  |%=115 . location|
000027b0  24 3d 22 43 61 70 65 74  6f 77 6e 22 0d 0c 58 05  |$="Capetown"..X.|
000027c0  e1 0d 0c 62 05 3a 0d 0c  6c 14 dd f2 5f 43 45 4e  |...b.:..l..._CEN|
000027d0  54 52 45 28 46 24 2c 59  25 29 0d 0c 76 6d 20 f4  |TRE(F$,Y%)..vm .|
000027e0  20 63 61 6c 6c 20 50 52  4f 43 5f 43 45 4e 54 52  | call PROC_CENTR|
000027f0  45 28 46 24 2c 59 25 29  2c 77 68 65 72 65 20 46  |E(F$,Y%),where F|
00002800  24 20 3d 20 73 74 72 69  6e 67 20 74 6f 20 62 65  |$ = string to be|
00002810  20 63 65 6e 74 72 65 64  2c 20 59 25 20 3d 20 70  | centred, Y% = p|
00002820  72 69 6e 74 20 20 20 63  6f 6c 6f 75 72 20 64 65  |rint   colour de|
00002830  73 69 72 65 64 20 3a 20  31 32 39 20 3d 20 72 65  |sired : 129 = re|
00002840  64 2c 20 65 74 63 2e 0d  0c 80 06 20 3a 0d 0c 8a  |d, etc..... :...|
00002850  08 ea 20 51 25 0d 0c 94  15 51 25 20 3d 20 32 30  |.. Q%....Q% = 20|
00002860  2d 28 a9 28 46 24 29 2f  32 29 0d 0c 9e 12 f1 bd  |-(.(F$)/2)......|
00002870  28 59 25 29 3b 8a 51 25  29 3b 46 24 0d 0c a8 05  |(Y%);.Q%);F$....|
00002880  e1 0d ff                                          |...|
00002883
General/SUN.m0
General/SUN.m1
General/SUN.m2
General/SUN.m4
General/SUN.m5