' ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
' º PHIL'S AGE PROGRAM º
' º ------------------ º
' º By Phil Jamieson º
' ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
CLS
SCREEN 7
COLOR 14
A$ = "G"
A$ = " " + A$ + " "
CLS
FOR X = 1 TO 22 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "E"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 21 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "A"
A$ = " " + A$
FOR X = 1 TO 20 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
7 NEXT Y
PRINT A$
NEXT X
A$ = "P"
A$ = " " + A$ + " "
FOR X = 40 - LEN(A$) TO 22 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "S"
A$ = " " + A$
FOR X = 1 TO 18 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "R"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 24 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "'"
A$ = " " + A$
FOR X = 1 TO 17 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "O"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 25 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "L"
A$ = " " + A$
FOR X = 1 TO 16 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "G"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 26 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "I"
A$ = " " + A$
FOR X = 1 TO 15 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "R"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 27 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "H"
A$ = " " + A$
FOR X = 1 TO 14 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "A"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 28 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "P"
A$ = " " + A$
FOR X = 1 TO 13 - LEN(A$)
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
A$ = "M"
A$ = A$ + " "
FOR X = 40 - LEN(A$) TO 29 STEP -1
LOCATE 12, X
FOR Y = 1 TO 300
NEXT Y
PRINT A$
NEXT X
SOUND 32767, 15
LOCATE 12, 12
Z$ = " "
C$ = "PHIL'S AGE PROGRAM"
PRINT C$
SOUND 32767, 4
PRINT Z$
LOCATE 12, 12
PRINT C$
FOR T = 11 TO 1 STEP -1
PRINT Z$
LOCATE (T), 12
SOUND 32767, 4
PRINT C$
NEXT T
SCREEN 12
1 CLS
COLOR 1
LOCATE 1, 27
PRINT "Todays date is: "; DATE$
COLOR 4
LOCATE 4, 29
PRINT "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
LOCATE 5, 29
PRINT "º º"
LOCATE 6, 29
PRINT "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼"
LOCATE 5, 31
COLOR 2
PRINT "Phil's Age Program"
DAY$ = MID$(DATE$, 4, 2)
MONTH$ = LEFT$(DATE$, 2)
YEAR$ = RIGHT$(DATE$, 4)
DAY = VAL(DAY$)
MONTH = VAL(MONTH$)
YEAR = VAL(YEAR$)
COLOR 15
LOCATE 12, 1
INPUT "ENTER YOUR NAME"; name$
IF name$ = "" THEN GOSUB 1
PLAY "l30N40N45N50"
Y1 = YEAR + 1
LOCATE 14, 1
WHILE Y1 > YEAR OR Y1 < YEAR - 130
INPUT "WHAT YEAR IS YOUR BIRTHDAY "; Y1
LOCATE 14, 1
WEND
PLAY "l30N40N45N50"
Y% = Y1 / 4
L = Y1 / 4
IF Y% = L THEN GOSUB 30
15 Y = YEAR - Y1 - 1
IF Y = 0 THEN Y = Y + 1
IF Y = -1 THEN Y = 0
IF Y1 = YEAR THEN Y = Y - 1
LOCATE 15, 1
WHILE M1 > 12 OR M1 < 1
INPUT "WHAT MONTH IS YOUR BIRTHDAY IN "; M1
LOCATE 15, 1
WEND
PLAY "l30N40N45N50"
LOCATE 16, 1
WHILE D1 > 31 OR D1 < 1
INPUT "WHAT DAY OF THE MONTH IS YOUR BIRTHDAY "; D1
LOCATE 16, 1
WEND
PLAY "l30N40N45N50"
M = MONTH - M1
IF M < 0 THEN M = M + 12 - MONTH
IF M1 = MONTH AND D1 < DAY THEN M = 0
IF M1 > MONTH THEN M = M + 2
IF M1 < MONTH THEN M = M - 1
IF M1 < MONTH THEN Y = Y + 1
D = DAY - D1
IF D1 = DAY AND M1 = MONTH AND Y1 = YEAR THEN GOSUB 40
IF M1 = 1 OR M1 = 3 OR M1 = 5 OR M1 = 7 OR M1 = 8 OR M1 = 10 OR M1 = 12 THEN GOSUB 20
IF M1 = 9 OR M1 = 4 OR M1 = 6 OR M1 = 11 THEN GOSUB 25
IF M1 = 2 THEN GOSUB 35
18 IF M1 = MONTH AND D1 = DAY THEN D = 0
GOSUB 40
20 IF D < 1 THEN D = D + 31 - DAY
GOSUB 18
25 IF D < 1 THEN D = D + 30 - DAY
RETURN
30 IF D < 1 THEN D = D + 29 - DAY
RETURN
35 IF D < 1 THEN D = D + 28 - DAY
RETURN
40 CLS
COLOR 2
LOCATE 12, 34
IF M1 = MONTH AND D1 = DAY AND Y1 = YEAR THEN Y = 0 AND D = 0 AND M = 0
PRINT name$; " is:"
LOCATE 13, 21
IF Y = 1 THEN GOSUB 45
IF M = 1 THEN GOSUB 50
IF D = 1 THEN GOSUB 55
IF M = 0 AND D = 0 AND Y = 0 THEN GOSUB 80
IF M = 0 AND D = 0 THEN GOSUB 75
IF D = 0 THEN GOSUB 60
IF M = 0 THEN GOSUB 65
IF Y = 0 THEN GOSUB 70
IF Y <> 0 THEN GOSUB 43
42
GOSUB 85
43 PRINT Y; "Years"; M; "Months and"; D; "Days old"
RETURN 42
45 PRINT Y; "Year"; M; "Months and"; D; "Days old"
RETURN 42
50 PRINT Y; "Years"; M; "Month and"; D; "Days old"
RETURN 42
55 PRINT Y; "Years"; M; "Months and"; D; "Day old"
RETURN 42
60 PRINT " "; Y; "Years and"; M; "Months old"
RETURN 42
65 PRINT " "; Y; "Years and"; D; "Days old"
RETURN 42
70 PRINT M; "Months and"; D; "Days old"
RETURN 42
75 PRINT " "; Y; "Years old"
LOCATE 17, 17
PRINT " Happy Birthday!"
RETURN 42
80 LOCATE 17, 19
PRINT " You were born today!"
LOCATE 19, 17
PRINT " Happy Birthday!"
LOCATE 12, 34
PRINT " "
85 LOCATE 15, 26
COLOR 2
PRINT "Your star sign is"
LOCATE 15, 44
READ AQU$, PIS$, ARI$, TAU$, GEM$, CAN$, LEO$, VIR$, LIB$, SCO$, SAG$, CAP$
DATA Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn
IF M1 = 1 THEN GOSUB 100
IF M1 = 2 THEN GOSUB 200
IF M1 = 3 THEN GOSUB 300
IF M1 = 4 THEN GOSUB 400
IF M1 = 5 THEN GOSUB 500
IF M1 = 6 THEN GOSUB 600
IF M1 = 7 THEN GOSUB 700
IF M1 = 8 THEN GOSUB 800
IF M1 = 9 THEN GOSUB 900
IF M1 = 10 THEN GOSUB 1000
IF M1 = 11 THEN GOSUB 1100
IF M1 = 12 THEN GOSUB 1200
COLOR 13
END
100 IF D1 >= 21 THEN GOSUB 1300
IF D1 < 21 THEN GOSUB 2400
RETURN
200 IF D1 >= 20 THEN GOSUB 1400
IF D1 < 20 THEN GOSUB 1300
RETURN
300 IF D1 >= 21 THEN GOSUB 1500
IF D1 < 21 THEN GOSUB 1400
RETURN
400 IF D1 >= 21 THEN GOSUB 1600
IF D1 < 21 THEN GOSUB 1500
RETURN
500 IF D1 >= 22 THEN GOSUB 1700
IF D1 < 22 THEN GOSUB 1600
RETURN
600 IF D1 >= 22 THEN GOSUB 1800
IF D1 < 22 THEN GOSUB 1700
RETURN
700 IF D1 >= 24 THEN GOSUB 1900
IF D1 < 24 THEN GOSUB 1800
RETURN
800 IF D1 >= 24 THEN GOSUB 2000
IF D1 < 24 THEN GOSUB 1900
RETURN
900 IF D1 >= 24 THEN GOSUB 2100
IF D1 < 24 THEN GOSUB 2000
RETURN
1000 IF D1 >= 24 THEN GOSUB 2200
IF D1 < 24 THEN GOSUB 2100
RETURN
1100 IF D1 >= 23 THEN GOSUB 2300
IF D1 < 23 THEN GOSUB 2200
RETURN
1200 IF D1 >= 23 THEN GOSUB 2400
IF D1 < 23 THEN GOSUB 2300
RETURN
1300 PRINT AQU$
RETURN
1400 PRINT PIS$
RETURN
1500 PRINT ARI$
RETURN
1600 PRINT TAU$
RETURN
1700 PRINT GEM$
RETURN
1800 PRINT CAN$
RETURN
1900 PRINT LEO$
RETURN
2000 PRINT VIR$
RETURN
2100 PRINT LIB$
RETURN
2200 PRINT SCO$
RETURN
2300 PRINT SAG$
RETURN
2400 PRINT CAP$
RETURN