home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
UpTime Volume 1 #3
/
utv1n3s1.d64
/
longevity.exe
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-28
|
14KB
|
445 lines
10 rem (c) 1987 uptime by softdisk publishing, inc.
11 goto20
15 poke781,vt:poke782,ht:sys65520:return
16 geta$:ifa$=""goto16
17 return
18 forxx=vtto22:poke781,xx:sys59903:next:return
20 print"";chr$(14);:poke53281,15:poke53280,14:clr:sh$=chr$(160)
50 poke 198,0:vt=21:ht=0:gosub 15
51 print " [196]o you want background information?"
60 print " ([217] or [206]) ";:gosub16
65 if a$<>"y" and a$<>"[217]" and a$<>"n" and a$<>"[206]" and a$<>"[140]" then 60
67 poke 53269,0
70 if a$="[140]" then 3950
80 if a$="n" or a$="[206]" then 110
90 if a$="y" or a$="[217]" then vt=4:gosub18:gosub15:goto 3510
100 goto 50
110 vt=4:gosub18:vt=7:ht=0:gosub15:print " [215]hat is your name: ";:mx=20
112 gosub 5000
115 n$=t$
120 if n$="" then 110
125 a$=chr$(asc(left$(n$,1))or 128)
128 n$=a$+right$(n$,len(n$)-1)
130 vt=9:gosub15: print" [215]hat is your age: ";:mx=2:gosub 5000
140 ay=val(t$):a=ay:if t$="" thengosub3470:vt=9:gosub18:goto130
150 if t$<"0" or t$>"99" then 3860
160 poke 198,0:gosub 4040
170 vt=11:ht=0:gosub15:print " [193]re you male or female? ([205] or [198]) ";
180 get sx$:if sx$="" then 180
190 if sx$="m" or sx$="[205]"or sx$="f" or sx$="[198]" or sx$="[140]" then 200
191 dd=3:gosub 3470:goto 160
200 if sx$="[140]" then 3950
210 ba=a*.190796+68.478510
220 if sx$="f" or sx$="[198]" then ba=a*.122769+75.953098
230 s$=sx$:print
240 ba=int(ba+.5):t=ba
250 vt=13:gosub15:print " [212]he base life expectancy for ";n$
260 print tab(14)"is"t"years."
270 a$=" "
280 poke 198,0:print
290 vt=16:gosub15:print " [193]re you caucasian? ([217] or [206]) ";:gosub16
300 if a$="n" or a$="[206]" then t=t-5:gosub 3380:goto 340
310 if a$="y" or a$="[217]" then t=t+0:gosub 3380:goto 340
320 if a$="[140]" then 3950
330 gosub 3470:goto 280
340 vt=10:gosub18:vt=10:ht=0:gosub15:gosub 3370
350 print " [208][193][210][212] [201] [198][193][205][201][204][217] [200][201][211][212][207][210][217]": gosub 3370:vt=14:gosub18
360 vt=14:gosub15:print " [196]id at least two of your grandparents"
370 poke 198,0
380 print " live to be 80 or more? ([217] or [206]) ";:gosub16
390 if a$="[140]" then 3950
400 if a$="n" or a$="[206]" then t=t-2:gosub 3380:goto 430
410 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 430
420 gosub 3470:goto 360
430 rem
440 vt=14:gosub18
450 vt=14:gosub15:print " [215]hat is/was your mother's age: ";:mx=3:gosub 5000
455 a=val(t$)
460 if a<11 or t$="" then gosub 3470:goto 440
470 if a<80 then t=t+0:gosub 3380:goto 490
480 t=t+1.5:gosub 3380
490 rem
500 vt= 14:gosub18:gosub15
501 print " [215]hat is/was your father's age: ";:mx=3:gosub 5000
505 a=val(t$)
510 if a<11 or t$="" then gosub 3470:goto 500
520 if a<80 then t=t+0:gosub 3380:goto 540
530 t=t+2:gosub 3380
540 gosub 4040
550 vt=14:gosub 18:vt= 14:ht=0:gosub15
560 print " [196]id any of your grandparents, parents,"
570 print " brothers or sisters die of a heart"
580 print " attack or stroke before the age of 50?"
590 poke 198,0:print " ([217] or [206])":gosub16
600 if a$="[140]" then 3950
610 if a$="n" or a$="[206]" then t=t-0:gosub 3380:goto 640
620 if a$="y" or a$="[217]" then t=t-4:gosub 3380:goto 640
630 gosub 3470:goto 550
640 vt=14:gosub18:vt=14:gosub15
650 print " [196]id any of your above kin die of heart"
660 print " attack or stroke before the age of 60?"
670 poke 198,0: print " ([217] or [206]) ";:gosub16
680 if a$="[140]" then 3950
690 if a$="n" or a$="[206]" then t=t-0:gosub 3380:goto 720
700 if a$="y" or a$="[217]" then t=t-2:gosub 3380:goto 720
710 dd=2:gosub 3470:goto 640
720 rem
730 vt=14:gosub18
740 vt=14:gosub 15:print " [215]hat is the total number of incidences"
750 print " of asthma, bronchitis, cancer,"
760 print " diabetes, digestive system, emphysema"
770 print " or thyroid disorder found in your"
780 print " parents and grandparents: ";:mx=2:gosub 5000
785 a=val(t$)
790 if a<0 or a>15 or a$=sh$ then gosub 3470:goto 730
800 t=t-3*a:gosub 3380
810 rem
820 vt=10:gosub18:gosub15:gosub3370
830 print " [208][193][210][212] [201][201] [200][197][193][204][212][200] [193][206][196] [196][201][197][212]"
840 gosub 3370
850 gosub 4040:poke 198,0
860 vt=14:ht=0:gosub15:print " [196]o you have high blood pressure?"
870 print " ([217] or [206]) ";: gosub16
880 if a$="[133]" then 3950
890 if a$="y" or a$="[217]" then t=t+10*(ay>=20):gosub 3380:print:goto 920
900 if a$="n" or a$="[206]" then t=t+0:gosub 3380:print:goto 920
910 gosub 3470:goto 850
920 rem
930 vt=14:gosub18:gosub15
940 print" [200]ow many pounds overweight ":print" are you: ";:mx=3
942 gosub 5000:a=val(t$)
945 if t$="" then gosub 3470:goto930
950 if a=0 then b=0:goto 970
960 b=a/10
970 t=t-b:gosub 3380
980 vt=14:gosub 18
990 vt=14:gosub 15:print " [200]ow many packs of cigarettes do you"
1000 print" smoke each day: ";:mx=2:gosub 5000:a=val(t$)
1010 if a<0 or t$="" then gosub 3470:goto 980
1020 if a=0 then b=0:goto 1100
1030 if a<1 then b=2:goto 1100
1040 if a=1 then b=4:goto 1100
1050 if a<1.5 then b=5:goto 1100
1060 if a<2 then b=7:goto 1100
1070 if a=2 then b=8:goto 1100
1080 if a<3 then b=10:goto 1100
1090 if a=>3 then b=12:goto 1100
1100 t=t-b:gosub 3380
1110 vt=14:gosub18
1120 vt=14:gosub15:print " [200]ow many alcoholic drinks do you have"
1130 print" each day: ";:mx=2:gosub 5000:a=val(t$)
1140 if a<0 or t$="" then gosub 3470:goto 1110
1150 if a=0 then t=t-1:gosub 3380:goto 1180
1160 if a<=2 then t=t+3:gosub 3380:goto 1180
1170 if a>2 then t=t-8:gosub 3380:goto 1180
1180 vt=14:gosub18:poke 198,0:vt=14:ht=0:gosub15
1190 print " [196]o you want to know why? ([217]/[206])":gosub 16
1200 if a$="n" or a$="[206]" then 1320
1210 if a$="y" or a$="[217]" then 1230
1220 goto 1180
1230 vt=14:gosub18:vt=14:gosub15
1240 print " [205]oderate drinking (up to two drinks"
1250 print " per day) reduces emotional stress, but"
1260 print " more than two drinks per day produces"
1270 print " physiological damage. [193]s for teeto-"
1280 print " talers, they may have rather rigid ";
1290 print " value systems and may undergo stress"
1300 print " in maintaining that system!"
1310 tp=14:gosub 4090
1320 vt=14:gosub18:gosub 4040
1330 vt=14:gosub15:print " [196]o you exercise moderately - jog, bike";
1340 print " ride, take long walks, swim - at least"
1350 poke 198,0:print " 2 or 3 times each week? ([217] or [206]) ";
1360 gosub16
1370 if a$="[133]" then 3950
1380 if a$="n" or a$="[206]" then t=t+0:gosub 3380:goto 1410
1390 if a$="y" or a$="[217]" then t=t+3:gosub 3380:goto 1410
1400 dd=2:gosub 3470:goto 1330
1410 rem
1420 vt=14:gosub 18:gosub 15
1430 print " [200]ow many hours do you sleep each day: ";:mx=2:gosub 5000
1435 a=val(t$)
1440 if a<1 or a>24 or a$="" then gosub 3470:goto 1420
1450 if a<9 then t=t-0:gosub 3380:goto 1480
1460 if a=9 then t=t-4:gosub 3380:goto 1480
1470 if a=>9 then t=t-6:gosub 3380
1480 gosub 4040:vt=14:ht=0:gosub 18:gosub15
1490 print " [196]o you want to know why? ([217] or [206])"
1500 poke 198,0:gosub16
1510 if a$="[140]" then 3950
1520 if a$="n" or a$="[206]" then 1630
1530 if a$="y" or a$="[217]" then 1550
1540 goto 1480
1550 vt=14:gosub 18:vt=14:gosub15
1560 print " [193]dults who sleep too much usually spend";
1570 print " too much time in nonphysical activity"
1580 print " and may be unhappy, using sleep as an"
1590 print " escape, a psychological crutch..."
1600 print " [196]epressed people have shorter life ";
1610 print " expectancies."
1620 tp=14:gosub 4090
1630 gosub 4040
1640 if sx$="m" or sx$="[205]" then 1730
1650 vt=14:gosub18:vt=14: ht=0:gosub15
1660 print " [196]o you have a breast examination and a ";
1670 print " pap smear at least once a year?"
1680 poke 198,0:print " ([217] or [206]) ";: gosub16
1690 if a$="[133]" then 3950
1700 if a$="n" or a$="[206]" then t=t+0:gosub 3380:goto 1810
1710 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 1810
1720 gosub 3470:goto 1650
1730 vt=14:gosub18:gosub15
1740 print " [196]o you have a physical and proctoscopic";
1750 print " examination at least once each year?"
1760 poke 198,0:print " ([217] or [206]) ";:gosub16
1770 if a$="[140]" then 3950
1780 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 1810
1790