Instantly share code, notes, and snippets.

@droob /ECLIP.BAS Secret
Created Nov 7, 2017

Embed
What would you like to do?
10 HOME : PRINT : PRINT : PRINT : PRINT
20 PRINT TAB( 10)"LUNAR UMBRAL ECLIPSES"
30 PRINT TAB( 10)"BY ERIC BURGESS F.R.A.S"
40 PRINT : PRINT TAB( 10)"ALL RIGHTS RESERVED BY"
50 PRINT TAB( 10)"S & T SOFTWARE SERVICES"
60 FOR KZ = 20000 TO 1 STEP - 1: NEXT KZ
70 HOME
80 PRINT : PRINT : PRINT : PRINT
90 REM ECLIPSE
100 PRINT TAB( 5)"THIS PROGRAM GIVES MAGNITUDE"
110 PRINT TAB( 5)"AND DATE OF LUNAR UMBRAL ECLIPSES"
120 PRINT TAB( 5)"STARTING AT ANY YEAR REQUESTED"
130 FOR J5 = 20000 TO 1 STEP - 1: NEXT J5
140 PRINT : PRINT
150 PRINT "PLEASE STATE THE"
160 PRINT
170 INPUT "YEAR TO START ";Y
180 FL = 0
190 HOME : PRINT : PRINT : PRINT : PRINT
200 PRINT "RUNNING....PLEASE WAIT"
210 Z = Y - 1900
220 ZD = (Z * 12.368267) - 2
230 A = INT (ZD)
240 DEF FN RAD(X) = X * 3.141592 / 180
250 A = A + 1
260 B = 29.1053561 * A
270 C = B + 13.7774
280 D = (25.81691806 * A) + 138.94
290 E = (30.6705065 * A) + 216.6378
300 F = E - ( SIN ( FN RAD(D))) * .412
310 G = F + ( SIN ( FN RAD(2 * D))) / 8.8
320 H = G + ( SIN ( FN RAD(C))) * 2.265
330 I = H + ( SIN ( FN RAD(2 * E))) * .13
340 I = SIN ( FN RAD(I))
350 J = 0.7128 - ( COS ( FN RAD(D))) / 36
360 W = I * 10 ^ J
370 IF W < 0 THEN W = 1.87469 + W * 1.8216: GOTO 390
380 IF W > 0 THEN W = 1.87469 - W * 1.8216
390 K = W + ( COS ( FN RAD(D))) / 30
400 IF K < 0 THEN GOTO 250
405 IF K < .01 THEN K = .01
410 IF FL = 1 GOTO 430
420 HOME : PRINT : PRINT : PRINT : PRINT : PRINT
430 PRINT : PRINT "----------------------"
440 PRINT "MAGNITUDE OF ECLIPSE IS.. ";
450 K = VAL ( LEFT$ ( STR$ (K),4))
460 PRINT K
470 PRINT
480 L = 2415036.025 + (A * 29.53058868)
490 L = L - (.406 * SIN ( FN RAD(D))) + (.174 * SIN ( FN RAD(C)))
500 L = L + ( SIN ( FN RAD(2 * D))) / 62
510 L = INT (L - ( SIN ( FN RAD(2 * E))) / 97)
520 IF L < 2299161 THEN GOTO 580
530 L2 = INT ((2299161 - 1867216.25) / 36525.25)
540 L = L2 + L
550 M = INT (L2 / 4)
560 L = L - M
570 L = L + 1
580 N = L - 1720995
590 O = INT ((N - 122.1) / 365.25)
600 P = INT (O * 365.25)
610 Q = INT ((N - P) / 30.6001)
620 R = ((N - P) - INT (Q * 30.6001)) / 10000
630 IF Q < 13 THEN GOTO 650
640 S = Q - 12 - 1: GOTO 660
650 S = Q - 1
660 T = S
670 T2 = T + R
680 IF S > 3 GOTO 700
690 O = O + 1
700 U = O + T2
710 R = 3 + R * 10000
720 IF T = 2 AND R > 28 THEN T = T + 1:R = R - 28
730 IF T = 3 AND R > 31 THEN T = T + 1:R = R - 31
740 PRINT "DATE OF ECLIPSE IS ..."
750 PRINT
760 PRINT " YEAR ";O
770 PRINT " MONTH ";T
780 PRINT " DAY ";R
790 PRINT : PRINT
800 INPUT " DO YOU WANT THE NEXT ECLIPSE ";A$
810 PRINT : PRINT
820 IF A$ = "Y" THEN PRINT :FL = 1: GOTO 250
830 IF A$ < > "N" THEN PRINT "INVALID REPLY": PRINT : GOTO 800
840 INPUT " DO YOU WANT ANOTHER YEAR ";A$
850 IF A$ = "Y" THEN HOME : PRINT : PRINT : GOTO 170
860 IF A$ < > "N" THEN PRINT "INVALID REPLY": PRINT : GOTO 840
870 HOME
880 END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment