home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / basic / basictut.ark / TUTR.06 < prev    next >
Encoding:
Text File  |  1985-02-10  |  7.6 KB  |  181 lines

  1. 3000    ' tutor 6    Ver 2.0        01AUG83
  2. 3010    GOSUB 37100
  3. 3020    T5$ = SPACE$(5) : T10$ = SPACE$(10) : T15$ = SPACE$(15) :VT$ = CHR$(11)
  4. 3030    C = 0
  5. 3040    GOTO 3070
  6. 3050    C = C + 1
  7. 3060    RETURN
  8.  
  9. 3070    PRINT T10$;"   Back again? GOOD! And I hope you're all ready for your"
  10. 3080    PRINT T10$;"sixth lesson. By now you should feel quite comfortable using"
  11. 3090    PRINT T10$;"the 'BASIC' language and that's the whole idea."
  12. 3100    PRINT
  13. 3110    PRINT T10$;"   Here are some of the terms we have used in our first five"
  14. 3120    PRINT T10$;"lessons. Just so we know we understand everything so far, let's"
  15. 3130    PRINT T10$;"check up a little bit. we'll let the choice selection be:"
  16. 3140    GOSUB 5000
  17. 3150    PRINT T10$;"   When you're ready, we'll have a few questions about these"
  18. 3160    PRINT T10$;"terms so you can check on yourself. before we do that, look at"
  19. 3170    PRINT T10$;"each one and see if you can tell what it is for."
  20. 3180    PRINT
  21. 3190    GOSUB 37000 : GOSUB 37100 : GOSUB 5000
  22. 3200    PRINT T10$;"   For instance, take 'NEW'? This is the one we use when we want"
  23. 3210    PRINT T10$;"to formulate a program not already in the computer's memory. Then"
  24. 3220    PRINT T10$;"there's 'RUN' - this one is used to begin the execution of any"
  25. 3230    PRINT T10$;"program. How many of the other 16 are you pretty sure you know? ";
  26. 3240    GOSUB 40900 : GOSUB 37100
  27. 3250    PRINT
  28. 3260    PRINT T10$;"   Well, here's your chance to test yourself. I am going to"
  29. 3270    PRINT T10$;"type out 10 questions. Answer each one by using the number of"
  30. 3280    PRINT T10$;"the choice you select. After you have tried them all, we'll"
  31. 3290    PRINT T10$;"take a look at the answers and see how you did. OK?"
  32. 3300    GOSUB 37000 : PRINT CR$;ELR$; :GOSUB 5000
  33. 3310    PRINT T10$;"    1. Which is used to call a program from the disk? ";
  34. 3320    GOSUB 40900 : Z$ = CVTSTR$
  35. 3330    IF NOT (Z$ = "4" OR Z$ = "5") THEN 3350
  36. 3340    GOSUB 3050
  37. 3350    PRINT VT$;T10$;ELR$;"    2. Which one must never be omitted in a completed program? ";
  38. 3360    GOSUB 40900 : Y$ = CVTSTR$
  39. 3370    IF Y$ <> "2" THEN 3390
  40. 3380    GOSUB 3050
  41. 3390    PRINT VT$;T10$;ELR$;"    3. Which causes the computer to alter normal sequence? ";
  42. 3400    GOSUB 40900 : X$ = CVTSTR$
  43. 3410    IF X$ <> "13" THEN 3430
  44. 3420    GOSUB 3050
  45. 3430    PRINT VT$;T10$;ELR$;"    4. Which is used in getting into MBASIC? ";
  46. 3440    GOSUB 40900 : W$ = CVTSTR$
  47. 3450    IF W$ <> "17" THEN 3470
  48. 3460    GOSUB 3050
  49. 3470    PRINT VT$;T10$;ELR$;"    5. Which prints your program on the terminal? ";
  50. 3480    GOSUB 40900 : V$ = CVTSTR$
  51. 3490    IF V$ <> "11" THEN 3510
  52. 3500    GOSUB 3050
  53. 3510    PRINT VT$;T10$;ELR$;"    6. Which tells you what programs are on the diskette? ";
  54. 3520    GOSUB 40900 : U$ = CVTSTR$
  55. 3530    IF U$ <> "18" THEN 3550
  56. 3540    GOSUB 3050
  57. 3550    PRINT VT$;T10$;ELR$;"    7. Which waits for data entry from the terminal? ";
  58. 3560    GOSUB 40900 : T$ = CVTSTR$
  59. 3570    IF T$ <> "16" THEN 3590
  60. 3580    GOSUB 3050
  61. 3590    PRINT VT$;T10$;ELR$;"    8. Which is the correct one to interrupt the machine? ";
  62. 3600    GOSUB 40900 : S$ =CVTSTR$
  63. 3610    IF S$ <> "8" THEN 3630
  64. 3620    GOSUB 3050
  65. 3630    PRINT VT$;T10$;ELR$;"    9. Which is used to show an equation? ";
  66. 3640    GOSUB 40900 : R$ = CVTSTR$
  67. 3650    IF R$ <> "1" THEN 3670
  68. 3660    GOSUB 3050
  69. 3670    PRINT VT$;T10$;ELR$;"   10. Which is used with subscripted variables? ";
  70. 3680    GOSUB 40900 : P$ = CVTSTR$
  71. 3690    IF P$ <> "6" THEN 3710
  72. 3700    GOSUB 3050
  73. 3710    GOSUB 37100
  74. 3720    IF C = 10 THEN 4400
  75. 3730    PRINT VT$;T10$;ELR$;"You answered"; C; "correctly. Let's check your answers:"
  76. 3740    PRINT
  77. 3750    PRINT T10$;"Question    Should     Your"
  78. 3760    PRINT T10$;" Number      Be         Answer"
  79. 3770    PRINT
  80. 3780    PRINT T10$;"    1          4        "; Z$
  81. 3790    PRINT T10$;"    2          2        "; Y$
  82. 3800    PRINT T10$;"    3         13        "; X$
  83. 3810    PRINT T10$;"    4         17        "; W$
  84. 3820    PRINT T10$;"    5         11        "; V$
  85. 3830    PRINT T10$;"    6         18        "; U$
  86. 3840    PRINT T10$;"    7         16        "; T$
  87. 3850    PRINT T10$;"    8          8        "; S$
  88. 3860    PRINT T10$;"    9          1        "; R$
  89. 3870    PRINT T10$;"   10          6        "; P$
  90. 3880    PRINT
  91. 3890    IF C > 6 THEN GOSUB 37000 : GOTO 4030
  92. 3900    PRINT T10$;"   Your score is actually less than a passing score (7 right)."
  93. 3910    PRINT T10$;"Do you think maybe you ought to go back and try a previous"
  94. 3920    PRINT T10$;"lesson again(yes or no)? ";
  95. 3930    GOSUB 40900 : D$ = CVTSTR$
  96. 3940    PRINT
  97. 3950    IF LEFT$(D$,1) = "Y" THEN 3990
  98. 3960    IF LEFT$(D$,1) = "N" THEN 4010
  99. 3970    PRINT T10$;"Your answer doesn't make sense. Let's start over!";
  100.         VT$,VT$;CR$;
  101. 3980    GOTO 3920
  102. 3990    PRINT T10$;"Good idea. Press any key to return to menu."; : GOSUB 40800
  103. 4000    GOTO 39999
  104. 4010    GOSUB 37100 : PRINT T10$;"Well, it's up to you, of course. Let's continue. but first,"
  105. 4020    GOTO 4070
  106. 4030    PRINT CR$;T10$;"Rate yourself this way: 10 right - EXCELLENT, 9 right - GOOD,"
  107. 4040    PRINT T10$;"8 right - FAIR, and 7 right - PASSING."
  108. 4050    GOSUB 37000 : GOSUB 37100
  109. 4060    PRINT T10$;"   We'll continue with our lesson directly. But before we go on,"
  110. 4070    PRINT T10$;"let's just quickly correct any question you missed. Remember:"
  111. 4080    PRINT
  112. 4090    IF Z$ <> "4" THEN 4200
  113. 4100    IF Y$ <> "2" THEN 4220
  114. 4110    IF X$ <> "13" THEN 4240
  115. 4120    IF W$ <> "14" THEN 4260
  116. 4130    IF V$ <> "11" THEN 4280
  117. 4140    IF U$ <> "18" THEN 4300
  118. 4150    IF T$ <> "16" THEN 4320
  119. 4160    IF S$ <> "8" THEN 4340
  120. 4170    IF R$ <> "1" THEN 4360
  121. 4180    IF P$ <> "6" THEN 4380
  122. 4190    GOTO 4410
  123. 4200    PRINT T15$;"'LOAD' puts a saved program into memory."
  124. 4210    GOTO 4100
  125. 4220    PRINT T15$;"'END' must always be included."
  126. 4230    GOTO 4110
  127. 4240    PRINT T15$;"'GOTO' changes execution sequence."
  128. 4250    GOTO 4120
  129. 4260    PRINT T15$;"'MBASIC' loads basic so you can run or write programs."
  130. 4270    GOTO 4130
  131. 4280    PRINT T15$;"'LIST' results in your program being typed on the terminal."
  132. 4290    GOTO 4140
  133. 4300    PRINT T15$;"'FILES' lists your stored programs."
  134. 4310    GOTO 4150
  135. 4320    PRINT T15$;"'INPUT' waits for data entries from the terminal."
  136. 4330    GOTO 4160
  137. 4340    PRINT T15$;"'CRTL/C' should be used to interrupt the machine."
  138. 4350    GOTO 4170
  139. 4360    PRINT T15$;"'LET' is used to show equations."
  140. 4370    GOTO 4180
  141. 4380    PRINT T15$;"'DIM' is used if there are subscripted variables."
  142. 4390    GOSUB 37000 : GOSUB 37100 : GOTO 4410
  143. 4400    PRINT T10$;"Good for you - a PERFECT SCORE!!"
  144. 4410    PRINT
  145. 4420    PRINT T10$;"  Our new objective will be to learn how to get the computer to"
  146. 4430    PRINT T10$;"do the same problem many times with different data. Iterative"
  147. 4440    PRINT T10$;"instruction groups are often referred to as 'loops'. In their"
  148. 4450    PRINT T10$;"simplest form, they cause the machine to do the problem over"
  149. 4460    PRINT T10$;"and over, using different numerical values each time. "
  150. 4470    PRINT
  151. 4480    PRINT T10$;"This lesson is continued in the program 'TUTR07' "
  152. 4490    PRINT CRLF$;FNCENTER$("press any key to return to the menu");
  153. 4500    FOR CT = 1 TO 35: PRINT CHR$(8); : NEXT CT :GOSUB 40800 
  154. 4510    GOTO 39999
  155.  
  156. 5000    PRINT
  157. 5010    PRINT T10$;"   1=LET     2=END     3=NEW     4=LOAD    5=RUN     6=DIM"
  158. 5020    PRINT T10$;"   7=SAVE    8=CTRL/C  9=READ   10=DATA   11=LIST   12=PRINT"
  159. 5030    PRINT T10$;"  13=GOTO   14=CLEAR  15=KILL   16=INPUT  17=MBASIC 18=FILES"
  160. 5040    PRINT
  161. 5099    RETURN
  162.  
  163. 37000    'press any key pause
  164. 37010    PRINT T10$;CRLF$;CRLF$;FNCENTER$("press any key to continue");
  165. 37020    FOR CT= 1 TO 25 : PRINT CHR$(8); : NEXT CT
  166. 37030    GOSUB 40800
  167. 37099    RETURN
  168.  
  169. 37100    ' heading
  170. 37110    PRINT CLS$;FNPOSCUR$(4,1);FNCENTER$("Tutor -- Lesson 6");CRLF$
  171. 37199    RETURN
  172.  
  173. 38000    ' converted for Non-linear Systems, Kaypro Educational Division
  174. 38010    ' by t.crew , Simple Software, San Diego CA
  175. 38020    ' has to be run with mentutr to get all variables
  176. 38030    ' tutor lesson 6 version 2.0  released to nls 1 aug 83
  177.  
  178. 39999    RUN "MENU" 'end of overlay
  179.  
  180. tutr to get all variables
  181. 38030    '