home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 1 #3 / utv1n3s1.d64 / longevity.exe (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  14KB  |  445 lines

  1. 10 rem  (c) 1987 uptime  by softdisk publishing, inc.
  2. 11 goto20
  3. 15 poke781,vt:poke782,ht:sys65520:return
  4. 16 geta$:ifa$=""goto16
  5. 17 return
  6. 18 forxx=vtto22:poke781,xx:sys59903:next:return
  7. 20 print"";chr$(14);:poke53281,15:poke53280,14:clr:sh$=chr$(160)
  8. 50 poke 198,0:vt=21:ht=0:gosub 15
  9. 51 print "  [196]o you want background information?"
  10. 60 print "                ([217] or [206])               ";:gosub16
  11. 65 if a$<>"y" and a$<>"[217]" and a$<>"n" and a$<>"[206]" and a$<>"[140]" then 60
  12. 67 poke 53269,0
  13. 70 if a$="[140]" then 3950
  14. 80 if a$="n" or a$="[206]" then 110
  15. 90 if a$="y" or a$="[217]" then vt=4:gosub18:gosub15:goto 3510
  16. 100 goto 50
  17. 110 vt=4:gosub18:vt=7:ht=0:gosub15:print " [215]hat is your name: ";:mx=20
  18. 112 gosub 5000
  19. 115 n$=t$
  20. 120 if n$="" then 110
  21. 125 a$=chr$(asc(left$(n$,1))or 128)
  22. 128 n$=a$+right$(n$,len(n$)-1)
  23. 130 vt=9:gosub15: print" [215]hat is your age: ";:mx=2:gosub 5000
  24. 140 ay=val(t$):a=ay:if t$="" thengosub3470:vt=9:gosub18:goto130
  25. 150 if t$<"0" or t$>"99" then 3860
  26. 160 poke 198,0:gosub 4040
  27. 170 vt=11:ht=0:gosub15:print " [193]re you male or female? ([205] or [198]) ";
  28. 180 get sx$:if sx$="" then 180
  29. 190 if sx$="m" or sx$="[205]"or sx$="f" or sx$="[198]" or sx$="[140]" then 200
  30. 191 dd=3:gosub 3470:goto 160
  31. 200 if sx$="[140]" then 3950
  32. 210 ba=a*.190796+68.478510
  33. 220 if sx$="f" or sx$="[198]" then ba=a*.122769+75.953098
  34. 230 s$=sx$:print
  35. 240 ba=int(ba+.5):t=ba
  36. 250 vt=13:gosub15:print " [212]he base life expectancy for ";n$
  37. 260 print tab(14)"is"t"years."
  38. 270 a$=" "
  39. 280 poke 198,0:print
  40. 290 vt=16:gosub15:print " [193]re you caucasian? ([217] or [206]) ";:gosub16
  41. 300 if a$="n" or a$="[206]" then t=t-5:gosub 3380:goto 340
  42. 310 if a$="y" or a$="[217]" then t=t+0:gosub 3380:goto 340
  43. 320 if a$="[140]" then 3950
  44. 330 gosub 3470:goto 280
  45. 340 vt=10:gosub18:vt=10:ht=0:gosub15:gosub 3370
  46. 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
  47. 360 vt=14:gosub15:print " [196]id at least two of your grandparents"
  48. 370 poke 198,0
  49. 380 print " live to be 80 or more? ([217] or [206]) ";:gosub16
  50. 390 if a$="[140]" then 3950
  51. 400 if a$="n" or a$="[206]" then t=t-2:gosub 3380:goto 430
  52. 410 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 430
  53. 420 gosub 3470:goto 360
  54. 430 rem
  55. 440 vt=14:gosub18
  56. 450 vt=14:gosub15:print " [215]hat is/was your mother's age: ";:mx=3:gosub 5000
  57. 455 a=val(t$)
  58. 460 if a<11 or t$="" then gosub 3470:goto 440
  59. 470 if a<80 then t=t+0:gosub 3380:goto 490
  60. 480 t=t+1.5:gosub 3380
  61. 490 rem
  62. 500 vt= 14:gosub18:gosub15
  63. 501 print " [215]hat is/was your father's age: ";:mx=3:gosub 5000
  64. 505 a=val(t$)
  65. 510 if a<11 or t$="" then gosub 3470:goto 500
  66. 520 if a<80 then t=t+0:gosub 3380:goto 540
  67. 530 t=t+2:gosub 3380
  68. 540 gosub 4040
  69. 550 vt=14:gosub 18:vt= 14:ht=0:gosub15
  70. 560 print " [196]id any of your grandparents, parents,"
  71. 570 print " brothers or sisters die of a heart"
  72. 580 print " attack or stroke before the age of 50?"
  73. 590 poke 198,0:print "                ([217] or [206])":gosub16
  74. 600 if a$="[140]" then 3950
  75. 610 if a$="n" or a$="[206]" then t=t-0:gosub 3380:goto 640
  76. 620 if a$="y" or a$="[217]" then t=t-4:gosub 3380:goto 640
  77. 630 gosub 3470:goto 550
  78. 640 vt=14:gosub18:vt=14:gosub15
  79. 650 print " [196]id any of your above kin die of heart"
  80. 660 print " attack or stroke before the age of 60?"
  81. 670 poke  198,0: print "                ([217] or [206]) ";:gosub16
  82. 680 if a$="[140]" then 3950
  83. 690 if a$="n" or a$="[206]" then t=t-0:gosub 3380:goto 720
  84. 700 if a$="y" or a$="[217]" then t=t-2:gosub 3380:goto 720
  85. 710 dd=2:gosub 3470:goto 640
  86. 720 rem
  87. 730 vt=14:gosub18
  88. 740 vt=14:gosub 15:print " [215]hat is the total number of incidences"
  89. 750 print " of asthma, bronchitis, cancer,"
  90. 760 print " diabetes, digestive system, emphysema"
  91. 770 print " or thyroid disorder found in your"
  92. 780 print " parents and grandparents: ";:mx=2:gosub 5000
  93. 785 a=val(t$)
  94. 790 if a<0 or a>15 or a$=sh$ then gosub 3470:goto 730
  95. 800 t=t-3*a:gosub 3380
  96. 810 rem
  97. 820 vt=10:gosub18:gosub15:gosub3370
  98. 830 print " [208][193][210][212] [201][201]     [200][197][193][204][212][200] [193][206][196] [196][201][197][212]"
  99. 840 gosub 3370
  100. 850 gosub 4040:poke 198,0
  101. 860 vt=14:ht=0:gosub15:print " [196]o you have high blood pressure?"
  102. 870 print "                ([217] or [206]) ";: gosub16
  103. 880 if a$="[133]" then 3950
  104. 890 if a$="y" or a$="[217]" then t=t+10*(ay>=20):gosub 3380:print:goto 920
  105. 900 if a$="n" or a$="[206]" then t=t+0:gosub 3380:print:goto 920
  106. 910 gosub 3470:goto 850
  107. 920 rem
  108. 930 vt=14:gosub18:gosub15
  109. 940 print" [200]ow many pounds overweight        ":print" are you: ";:mx=3
  110. 942 gosub 5000:a=val(t$)
  111. 945 if t$="" then gosub 3470:goto930
  112. 950 if a=0 then b=0:goto 970
  113. 960 b=a/10
  114. 970 t=t-b:gosub 3380
  115. 980 vt=14:gosub 18
  116. 990 vt=14:gosub 15:print " [200]ow many packs of cigarettes do you"
  117. 1000 print" smoke each day: ";:mx=2:gosub 5000:a=val(t$)
  118. 1010 if a<0 or t$="" then gosub 3470:goto 980
  119. 1020 if a=0 then b=0:goto 1100
  120. 1030 if a<1 then b=2:goto 1100
  121. 1040 if a=1 then b=4:goto 1100
  122. 1050 if a<1.5 then b=5:goto 1100
  123. 1060 if a<2 then b=7:goto 1100
  124. 1070 if a=2 then b=8:goto 1100
  125. 1080 if a<3 then b=10:goto 1100
  126. 1090 if a=>3 then b=12:goto 1100
  127. 1100 t=t-b:gosub 3380
  128. 1110 vt=14:gosub18
  129. 1120 vt=14:gosub15:print " [200]ow many alcoholic drinks do you have"
  130. 1130 print" each day: ";:mx=2:gosub 5000:a=val(t$)
  131. 1140 if a<0 or t$="" then gosub 3470:goto 1110
  132. 1150 if a=0 then t=t-1:gosub 3380:goto 1180
  133. 1160 if a<=2 then t=t+3:gosub 3380:goto 1180
  134. 1170 if a>2 then t=t-8:gosub 3380:goto 1180
  135. 1180 vt=14:gosub18:poke 198,0:vt=14:ht=0:gosub15
  136. 1190 print " [196]o you want to know why? ([217]/[206])":gosub 16
  137. 1200 if a$="n" or a$="[206]" then 1320
  138. 1210 if a$="y" or a$="[217]" then 1230
  139. 1220 goto 1180
  140. 1230 vt=14:gosub18:vt=14:gosub15
  141. 1240 print " [205]oderate drinking (up to two drinks"
  142. 1250 print " per day) reduces emotional stress, but"
  143. 1260 print " more than two drinks per day produces"
  144. 1270 print " physiological damage.  [193]s for teeto-"
  145. 1280 print " talers, they may have rather rigid     ";
  146. 1290 print " value systems and may undergo stress"
  147. 1300 print " in maintaining that system!"
  148. 1310 tp=14:gosub 4090
  149. 1320 vt=14:gosub18:gosub 4040
  150. 1330 vt=14:gosub15:print " [196]o you exercise moderately - jog, bike";
  151. 1340 print " ride, take long walks, swim - at least"
  152. 1350 poke 198,0:print " 2 or 3 times each week? ([217] or [206]) ";
  153. 1360 gosub16
  154. 1370 if a$="[133]" then 3950
  155. 1380 if a$="n" or a$="[206]" then t=t+0:gosub 3380:goto 1410
  156. 1390 if a$="y" or a$="[217]" then t=t+3:gosub 3380:goto 1410
  157. 1400 dd=2:gosub 3470:goto 1330
  158. 1410 rem
  159. 1420 vt=14:gosub 18:gosub 15
  160. 1430 print " [200]ow many hours do you sleep each        day: ";:mx=2:gosub 5000
  161. 1435 a=val(t$)
  162. 1440 if a<1 or a>24 or a$="" then gosub 3470:goto 1420
  163. 1450 if a<9 then t=t-0:gosub 3380:goto 1480
  164. 1460 if a=9 then t=t-4:gosub 3380:goto 1480
  165. 1470 if a=>9 then t=t-6:gosub 3380
  166. 1480 gosub 4040:vt=14:ht=0:gosub 18:gosub15
  167. 1490 print " [196]o you want to know why? ([217] or [206])"
  168. 1500 poke 198,0:gosub16
  169. 1510 if a$="[140]" then 3950
  170. 1520 if a$="n" or a$="[206]" then 1630
  171. 1530 if a$="y" or a$="[217]" then 1550
  172. 1540 goto 1480
  173. 1550 vt=14:gosub 18:vt=14:gosub15
  174. 1560 print " [193]dults who sleep too much usually spend";
  175. 1570 print " too much time in nonphysical activity"
  176. 1580 print " and may be unhappy, using sleep as an"
  177. 1590 print " escape, a psychological crutch..."
  178. 1600 print " [196]epressed people have shorter life     ";
  179. 1610 print " expectancies."
  180. 1620 tp=14:gosub 4090
  181. 1630 gosub 4040
  182. 1640 if sx$="m" or sx$="[205]" then 1730
  183. 1650 vt=14:gosub18:vt=14: ht=0:gosub15
  184. 1660 print " [196]o you have a breast examination and a ";
  185. 1670 print " pap smear at least once a year?"
  186. 1680 poke 198,0:print "                ([217] or [206]) ";: gosub16
  187. 1690 if a$="[133]" then 3950
  188. 1700 if a$="n" or a$="[206]" then t=t+0:gosub 3380:goto 1810
  189. 1710 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 1810
  190. 1720 gosub 3470:goto 1650
  191. 1730 vt=14:gosub18:gosub15
  192. 1740 print " [196]o you have a physical and proctoscopic";
  193. 1750 print " examination at least once each year?"
  194. 1760 poke 198,0:print "                ([217] or [206]) ";:gosub16
  195. 1770 if a$="[140]" then 3950
  196. 1780 if a$="y" or a$="[217]" then t=t+2:gosub 3380:goto 1810
  197. 1790