home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 2 #5 / utv2n5s1.d64 / stroop (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  8KB  |  237 lines

  1. 0 rem stroop
  2. 50 poke 45,peek(174):poke 46,peek(175):clr
  3. 100 dim d(9,20):dimcr(46):dimcr$(46):zq=1:dimcw$(46):dim n$(46)
  4. 110 poke53269,0:poke53281,0:poke53280,0:print"[147]";:sys 949
  5. 120 print"[156]stroop"
  6. 130 print"                                       "
  7. 150 gosub 950
  8. 160 gosub 830
  9. 170 aa=1
  10. 180 poke53265,peek(53265)and239
  11. 190 print"[147]":gosub 530
  12. 200 gosub 320
  13. 210 print"";:for a=1to9
  14. 220 ifaa=1thenb=int((rnd(1)*26)+65):a$(a)=chr$(b):gosub420:print"[145][145][145]";:goto250
  15. 230 a$(a)=chr$(a(a)+48)
  16. 240 gosub 420:print"[145][145][145]";
  17. 250 if a=3 or a=6 then print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
  18. 260 next
  19. 270 poke53265,peek(53265)or16
  20. 280 gosub700:gosub950
  21. 290 ifaa=1thengosub1520:gosub1320:gosub1000:aa=aa+1:ifaa=2thengosub525:goto 180
  22. 300 gosub 1590:gosub 1660
  23. 310 goto 1080
  24. 320 forx=1to9
  25. 330 a(x)=int(rnd(1)*9)+1
  26. 340 for y=1tox-1:ifx=1 then 360
  27. 350 ifa(y)=a(x)then 330
  28. 360 next:next
  29. 370 forx=1to9
  30. 380 b(x)=int(rnd(1)*6)+1
  31. 390 z=0:for y=1 to x-1:ifx=1then410
  32. 400 ifb(y)=b(x)thenz=z+1:ifz=2then380
  33. 410 next:next:return
  34. 420 for x=1tob(a)
  35. 430 c(x)=int(rnd(1)*20)+1
  36. 440 fory=1tox-1:ifx=1then 460
  37. 450 if c(y)=c(x) then 430
  38. 460 d(a,c(x))=c(x):next:next
  39. 470 forx=1to20
  40. 480 ifx=6orx=11orx=16then print"[157][157][157][157][157]";
  41. 490 if d(a,x)=0 then print"[150] ";
  42. 500 if d(a,x)<>0 then print"[150]";a$(a);
  43. 510 next
  44. 520 return
  45. 525 forx=1to9:fory=1to20:d(x,y)=0:next:next:return
  46. 530 print"[154]         [176][192][192][192][192][192][178][192][192][192][192][192][178][192][192][192][192][192][174]
  47. 540 [153]"         (NULL)     (NULL)     (NULL)     (NULL)
  48. 550 print"         [221]     [221]     [221]     [221]
  49. 560 [153]"         (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL)    close(NULL)
  50. 570 print"         [221]     [221][160][160][160][160][160][221][160][160][160][160][160][221]
  51. 580 [153]"         -tantantantantan(NULL)tantantantantan(NULL)tantantantantan<
  52. 590 print"         [221]     [221]     [221]     [221]
  53. 600 [153]"         (NULL)     (NULL)     (NULL)     (NULL)
  54. 610 print"         [221][160][160][160][160][160][221][160][160][160][160][160][221]    [160][221]
  55. 620 [153]"         (NULL)     (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL)
  56. 630 print"         [171][192][192][192][192][192][219][192][192][192][192][192][219][192][192][192][192][192][179]
  57. 640 [153]"         (NULL)     (NULL)     (NULL)     (NULL)
  58. 650 print"         [221]     [221]     [221]     [221]
  59. 660 [153]"         (NULL)closecloseclosecloseclose(NULL)closecloseclosecloseclose(NULL)    close(NULL)
  60. 670 print"         [221]     [221][160][160][160][160][160][221][160][160][160][160][160][221]
  61. 680 [153]"         /tantantantantan>tantantantantan>tantantantantanexp
  62. 690 return
  63. 700 ti$="000000":x=0
  64. 710 print"";
  65. 720 j=peek(56320)
  66. 730 if j=111 then ta=ti:bb$=ti$:goto 760
  67. 740 x=x+1:ifx/10=int(x/10)then print"[156] [146]";:goto 720
  68. 750 goto 720
  69. 760 print:print
  70. 770 tb=ta/60
  71. 780 tc=int(tb*1000)
  72. 790 t(zq)=tc/1000
  73. 800 print"";
  74. 810 print"  it took you a total of";t(zq);"seconds"
  75. 820 zq=zq+1:return
  76. 830 print"[147]after you read this page and press the":print
  77. 840 print"joystick button, the screen will clear.":print
  78. 850 print"after the data table is organized,":print
  79. 860 print"a 3x3 grid will appear on the screen.":print
  80. 870 print"in this grid will be various letters.":print
  81. 880 print"your task will be; starting with the":print
  82. 890 print"upper left square and proceeding left":print
  83. 900 print"to right, to quickly recite out loud":print
  84. 910 print"how many letters are in each square.":print
  85. 920 print"after saying the number of letters in":print
  86. 930 print"the last square, press the button.":print
  87. 940 gosub 950:return
  88. 950 print"[158]  press the joystick button to continue"
  89. 960 x=0
  90. 970 j=peek(56320)
  91. 980 if j=111 andx>10then return
  92. 990 x=x+1:goto 970
  93. 1000 print"[147]the next task will be almost":print
  94. 1010 print"identical to the first one except that":print
  95. 1020 print"instead of letters, there will be":print
  96. 1030 print"numbers in the grid.  remember, it is":print
  97. 1040 print"your task to quickly recite out loud":print
  98. 1050 print"the number of digits in each square,":print
  99. 1060 print"not the name of the digit."
  100. 1070 gosub950:return
  101. 1080 print"[147]";
  102. 1090 print"the time of your 1st test was";t(1):print
  103. 1100 print"the time of your 3rd test was";t(3):print:print
  104. 1110 print"the time of your 2nd test was";t(2):print
  105. 1120 print"the time of your 4th test was";t(4)
  106. 1130 print:print"[156]the stroop effect was first reported"
  107. 1140 print"by j. r. stroop in 1935.  these types"
  108. 1150 print"of tests are used today by cognitive"
  109. 1160 print"psychologists to demonstrate the nature"
  110. 1170 print"of automatic processing.  even though"
  111. 1180 print"you might try to ignore the meaning of"
  112. 1190 print"of a digit or a word, your brain"
  113. 1200 print"automatically registers this meaning."
  114. 1210 print"this is why you probably did better at"
  115. 1220 print"the first and third tasks: there were"
  116. 1230 print"no conflicting stimuli for your brain"
  117. 1240 print"to automatically process (as there were"
  118. 1250 print"in the second and fourth tasks)."
  119. 1260 print:print"[158]   would you like to play again?"
  120. 1270 geta$:if a$=""then 1270
  121. 1280 if a$="n" then 1820
  122. 1290 if a$="y"then clr:run
  123. 1300 goto 1270
  124. 1310 end
  125. 1320 poke53265,peek(53265)and239:print"[147]":forx=1to50
  126. 1325 print"[147]":forx=1to46
  127. 1330 cr(x)=int(rnd(1)*6)+1
  128. 1340 ifcr(x)=1thencr$(x)=""
  129. 1350 ifcr(x)=2thencr$(x)="[158]"
  130. 1360 ifcr(x)=3thencr$(x)="[156]"
  131. 1370 ifcr(x)=4thencr$(x)=""
  132. 1380 ifcr(x)=5thencr$(x)="[151]"
  133. 1390 ifcr(x)=6thencr$(x)=""
  134. 1400 ifcr(x-1)=cr(x)then1330
  135. 1410 next
  136. 1420 n$(1)="i":n$(2)="heartily":n$(3)="accept":n$(4)="the":n$(5)="motto,-"
  137. 1421 n$(6)="that":n$(7)="government":n$(8)="is":n$(9)="best":n$(10)="which"
  138. 1422 n$(11)="governs":n$(12)="least;":n$(13)="and":n$(14)="i":n$(15)="should"
  139. 1430 n$(16)="like":n$(17)="to":n$(18)="see":n$(19)="it":n$(20)="acted"
  140. 1431 n$(21)="up":n$(22)="to":n$(23)="more":n$(24)="rapidly":n$(25)="and"
  141. 1440 n$(26)="systematically.":n$(27)=" carried":n$(28)="out,":n$(29)="it"
  142. 1441 n$(30)="finally":n$(31)="amounts":n$(32)="to"
  143. 1442 n$(33)="this,":n$(34)="which"
  144. 1450 n$(35)="i":n$(36)="also":n$(37)="believe-":n$(38)="that"
  145. 1451 n$(39)="government":n$(40)="is":n$(41)="best":n$(42)="which"
  146. 1452 n$(43)="governs":n$(44)="not":n$(45)="at":n$(46)="all."
  147. 1460 for x=1to46
  148. 1470 if pos(1)>=30 then print:print
  149. 1480 printcr$(x);:printn$(x);" ";
  150. 1490 next
  151. 1500 poke53265,peek(53265)or16
  152. 1510 gosub 700:gosub 950:return
  153. 1520 print"[147]in this task, after you have read the":print
  154. 1530 print"instructions and pressed the button, ":print
  155. 1540 print"the screen will clear.  when the message"
  156. 1550 print"appears, you must quickly say out loud":print
  157. 1560 print"the color that each word is printed in.":print
  158. 1570 print"when you have recited the color of all":print
  159. 1580 print"of the words, press the joystick button.":gosub 950:return
  160. 1590 print"[147]this task will be almost identical to":print
  161. 1600 print"the second task.  the difference is,":print
  162. 1610 print"however, that instead of a paragraph,":print
  163. 1620 print"color words will appear.  remember, you":print
  164. 1630 print"must quickly recite out loud the color":print
  165. 1640 print"that the word is printed in, not the":print
  166. 1650 print"word itself.":gosub950:return
  167. 1660 poke53265,peek(53265)and239:print"[147]":forx=1to46
  168. 1670 cr(x)=int(rnd(1)*6)+1
  169. 1680 if cr(x)=cr(x-1) then 1670
  170. 1690 if cr(x)=1 then cw$(x)="green"
  171. 1700 if cr(x)=2 then cw$(x)="blue"
  172. 1710 if cr(x)=3 then cw$(x)="yellow"
  173. 1720 if cr(x)=4 then cw$(x)="gray"
  174. 1730 if cr(x)=5 then cw$(x)="red"
  175. 1740 if cr(x)=6 then cw$(x)="purple"
  176. 1750 next
  177. 1760 for x=1to46
  178. 1770 if pos(1)>=33 then print:print
  179. 1780 printcr$(x);cw$(x);" ";
  180. 1790 next
  181. 1800 poke53265,peek(53265)or16
  182. 1810 gosub 700:gosub 950:return
  183. 1820 f=20:no=1:nt=10:nn=1
  184. 1830 v=53248:i=249:rem video & image #
  185. 1840 poke 53280,0
  186. 1850 poke53281,14:poke 53265,peek(53265) and 239
  187. 1860 s=54272:forsd=stos+24:pokes,0:next
  188. 1870 pokes+24,15:pokes+2,0:pokes+5,129:pokes+6,65
  189. 1880