home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C64Software / METRIC-MEASURE (.txt) < prev    next >
Commodore BASIC  |  2019-04-13  |  10KB  |  169 lines

  1. 1 POKE781,VT:POKE782,HT:POKE783,PEEK(783)AND254:SYS65520:VT=0:HT=0:IFQTHENRETURN
  2. 2 WW=49152:IFPEEK(2)=2THEN5
  3. 3 IFPEEK(49152)<>76THEN:LOAD"WW.OBJ.",8,1
  4. 4 IFPEEK(2)<>2THENPOKE2,2:SYSWW
  5. 5 Q=1:POKE808,234:IFPEEK(32768)=16THENV=1
  6. 6 IFPEEK(32768)=54THENV=1
  7. 7 DIMNA$(200),SC$(200),MO$(200),S$(28),CR$(11),VR$(11),EW$(11),VW$(11):!RESTORE:W=49160:SD=54272:FORI=SDTOSD+23:POKEI,0:NEXT:POKESD+24,15:POKE160,0:FORI=139TO143:Z=INT(RND(0)*254)+1:POKEI,Z:NEXT:POKEW+4,1:POKEW+5,1:POKEW+6,1:POKEW+7,0:POKEW+8,32:POKEW+9,50:POKEW+10,1
  8. 8 SYS58692:S=53280:POKES,10:POKES+1,9:POKE646,7:PRINTCHR$(142):NK=1:!DIM(13,10,20,3):!OPEN,"ONE MOMENT PLEASE":CLOSE15:OPEN15,8,15:OPEN9,8,9,"0:RECORD,S,R":INPUT#15,E,E$,JU,JU:IFE>1THENPRINT#15,"I0":CLOSE9:CLOSE15:GOTO11
  9. 9 INPUT#9,NA$(NK),SC$(NK),MO$(NK):IFNA$(NK)="EOR"THENCLOSE9:CLOSE15:GOTO11
  10. 10 NK=NK+1:GOTO9
  11. 11 IFNK>198THEN87
  12. 12 !CLOSE:POKEW+10,60:M1$="[153]                                        ":M2$="[153][165]         [165]         [165]         [165]         ":M4$="[153][165]                   [165]                   ":M3$="[153][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165][165]"
  13. 13 M5$="[153][165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] [165] ":M9$="                                        ":S$(0)="0                  1                   2":S$(1)="1                  2                   3":S$(2)="2                  3                   4"
  14. 14 S$(3)="3                  4                   5":S$(4)="4                  5                   6":S$(5)="5                  6                   7":S$(6)="6                  7                   8":S$(7)="7                  8                   9"
  15. 15 S$(8)="8                  9                   1":S$(9)="9                  10                  1":S$(10)="10                 11                  1":S$(11)="11                 12                  1"
  16. 16 S$(12)="12                 13                  1":S$(13)="13                 14                  1":S$(14)="14                 15                  1":S$(15)="15                 16                  1"
  17. 17 S$(16)="0        10        20        30        5":S$(17)="10       20        30        40        5":S$(18)="20       30        40        50        6":S$(19)="30       40        50        60        7"
  18. 18 S$(20)="40       50        60        70        8":S$(21)="50       60        70        80        9":S$(22)="60       70        80        90       10":EW$(1)="[160][160][160] [160]NO WAY ! [160] ":EW$(2)="[160]NOT THIS TIME  ":EW$(3)="PLEASE TRY AGAIN"
  19. 19 EW$(4)="[160]*[160]INCORRECT *  ":EW$(5)="    NO GOOD !   ":EW$(6)="     ERROR      ":EW$(7)="     THINK !    ":EW$(8)="[160][160][160][160]NO NO NO    ":EW$(9)="[160]YOU BLEW IT !  ":EW$(10)="  TRY HARDER !  ":EW$(11)=" NOT THIS WAY!  ":VW$(1)="NO WAY HOZE A"
  20. 20 VW$(2)="NOT THIS TIME":VW$(3)="PLEASE TRY AGAIN":VW$(4)="INCORRECT ANSWER":VW$(5)="THIS WILL NEVER DO":VW$(6)="YOUR ANSWER DOES NOT COMPUTE":VW$(7)="DID YOU LEVE YOUR BRAIN IN OUTER SPACE":VW$(8)="NO NO NO NO NO NO NO NO"
  21. 21 VW$(9)="YOU BLEW IT THIS TIME":VW$(10)="YOU REALLY MUST TRY HARDER":VW$(11)="YOU WILL NEVER GET YOUR A THIS WAY":CR$(1)="[160][160][160][160]CORRECT     ":CR$(2)="YOU GOT THIS ONE":CR$(3)="  KEEP IT UP!   ":CR$(4)="   [160]THAT'S IT   ":CR$(5)="   GOOD WORK !  "
  22. 22 CR$(6)="  [160][160]TERRIFIC    ":CR$(7)="   GOOD GUESS   ":CR$(8)="   S U P E R !  ":CR$(9)="   EXCELLENT !  ":CR$(10)="LOOKING FOR AN A":CR$(11)=" ASTRONOMICAL ! ":VR$(1)="YOUR ANSWER IS CORRECT":VR$(2)="YOU GOT THIS ONE":VR$(3)="KEEP IT UP"
  23. 23 VR$(4)="THATS IT":VR$(5)="GOOD WORK":VR$(6)="TERRIFIC":VR$(7)="I THINK YOU WERE JUST GUESSING":VR$(8)="SUPER":VR$(9)="EXCELLENT":VR$(10)="YOU ARE ABOUT TO GO INTO ORBIT":VR$(11)="SUPER KALA FRAGILISTIC EXTRA ALADOSHIS":GOTO88
  24. 24 GOSUB52
  25. 25 GOSUB52:SYS58692:PRINTTAB(13)"LINEAR MEASURE":PRINT"[176][192][192][192][192][192][174]"SPC(26)"[176][192][192][192][192][192][174][194][150]RIGHT[194]"SPC(26)"[194][150]WRONG[194]";:PRINT"[194]     [194]"SPC(26)"[194]     [194][173][192][192][192][192][192][189]"SPC(26)"[173][192][192][192][192][192][189]":VT=2:HT=1:GOSUB1:PRINTNR:VT=2:HT=34:GOSUB1:PRINTNW:VT=4:HT=20:GOSUB1:PRINT"[158][164][164][164][164][164][164][164][164][164][164][164][164][164][164]":PRINT" YOU ARE USING A "
  26. 26 PRINT" WHAT IS THE LENGTH OF THE YELLOW BAR?":PRINT" USE THE UNITS INDICATED BELOW.":VT=20:HT=25:GOSUB1:PRINT"[176][192][192][192][192][192][192][192][192][192][192][192][174]":PRINTTAB(25)"[194]   [150]UNITS   [194]":PRINTTAB(25)"[194]           [194]":PRINTTAB(25)"[173][192][192][192][192][192][192][192][192][192][192][192][189]":VT=23:HT=2:GOSUB1:PRINT"[150](_)BACKSPACE (Q)QUIT[158]"
  27. 27 FORI=0TO20:IFPEEK(1184)<>32THENPF=64
  28. 28 NEXT:IFPF=64THENPF=0:GOTO25
  29. 29 FORI=1TO2:VT=12+I:GOSUB1:PRINT"[153]";M1$:NEXT:VT=12:GOSUB1:PRINT"[150]SCALE NUMBERED IN CENTIMETERS[153]":VT=5:HT=20:GOSUB1:PRINT"[158]"R$:VT=22:HT=26:GOSUB1:PRINTU$:IFJ<16THENVT=15:GOSUB1:PRINTM4$:VT=16:GOSUB1:PRINTM3$:GOTO31
  30. 30 VT=15:GOSUB1:PRINTM2$:VT=16:GOSUB1
  31. 31 VT=16:GOSUB1:IFJ<16THENPRINTM5$:GOTO33
  32. 32 PRINTM3$
  33. 33 VT=14:GOSUB1:PRINTS$(J);"[158]":VT=17:GOSUB1:FORI=1TOK:PRINT"[162]";:NEXT:VT=18:GOSUB1:FORI=1TOK:PRINT"[184]";:NEXT:PRINT:G=2:T$="":PRINT" ANSWER = ";:GOSUB66:A=VAL(T$):IFT$=""THENT$="00"
  34. 34 A3$=T$:T$="":IFA3$="Q"THEN134
  35. 35 IFJ>15THENT=J-16:IFT<1THENT=0
  36. 36 IFJ<16THENT=J
  37. 37 IFJ<16THENA2=(K/2)+(10*T)
  38. 38 IFJ>15THENA2=K+(10*T)
  39. 39 IFJ>15THEN44
  40. 40 IFU=1THENA=A:A4$=STR$(A2)
  41. 41 IFU=2THENA=A*10:A4$=STR$(A2/10)
  42. 42 IFU=3THENA=A*1000:A4$=STR$(A2/1000)
  43. 43 GOTO47
  44. 44 IFU=1THENA=A/10:A4$=STR$(A2*10)
  45. 45 IFU=2THENA=A:A4$=STR$(A2)
  46. 46 IFU=3THENA=A*100:A4$=STR$(A2/100)
  47. 47 A=INT((A+.0005)*1000)/1000:IFA=A2THENNR=NR+1:GOSUB62:GOSUB130
  48. 48 IFPK>9THENPK=0:GOTO133
  49. 49 IFA=A2THEN51
  50. 50 NW=NW+1:GOSUB62:GOSUB126:IFTY<3THENGOTO27
  51. 51 GOSUB62:VT=17:GOSUB1:PRINTM9$+M9$:VT=21:GOSUB1:PRINT"                 ":VT=22:HT=26:GOSUB1:PRINT"           ":FORI=1TO1000:NEXT:GOSUB52:GOTO27
  52. 52 TY=0:IFLE=1THENJ=INT(RND(1)*7)+16:GOTO54
  53. 53 J=INT(RND(1)*28):IFJ>22THENJ=J-6
  54. 54 R$=" METRIC RULER ":IFJ>15THENR$=" METER STICK  "
  55. 55 K=INT(RND(1)*39)+1:U=0:IFLE=2THENU=LE
  56. 56 IFLE=1THENU=2:GOTO59
  57. 57 IFLE=3THENU=LE
  58. 58 U=INT(RND(1)*U)+1:IFU=1THENU$="[158]MILLIMETERS[158]":POKES,7
  59. 59 IFU=2THENU$="[150]CENTIMETERS":POKES,10
  60. 60 IFU=3THENU$="  METERS[158]":POKES,15
  61. 61 RETURN
  62. 62 VT=2:HT=1:GOSUB1:PRINTNR:VT=2:HT=34:GOSUB1:PRINTNW:RETURN
  63. 63 TX=TI
  64. 64 IFTI<TX+30THEN64
  65. 65 RETURN
  66. 66 PRINTCHR$(166);:PRINT"[157]";
  67. 67 GETA$:IFG=1ANDPEEK(1064)<>32THENRUN
  68. 68 IFG=2ANDPEEK(1184)<>32THENRUN
  69. 69 IFA$=""THEN67
  70. 70 IFA$="Q"THEN78
  71. 71 IFA$=CHR$(13)THEN81
  72. 72 IFG=1ANDA$=" "THEN78
  73. 73 IFA$="_"THEN83
  74. 74 IFA$="Q"THEN78
  75. 75 IFG=1THENIFASC(A$)<65ORASC(A$)>90THEN67
  76. 76 IFG=2THENIFASC(A$)<46ORASC(A$)>57THEN67
  77. 77 IFG=2ANDA$="/"THEN67:CHARACTERNOTALLOWED
  78. 78 T$=T$+A$:IFG=1ANDLEN(T$)<17THEN:PRINTA$;:A$="":GOTO66
  79. 79 IFG=2ANDLEN(T$)<7THEN:PRINTA$;:A$="":GOTO66
  80. 80 T$=LEFT$(T$,LEN(T$)-1):GOTO67
  81. 81 IFLEN(T$)>16THENT$=LEFT$(T$,16)
  82. 82 PRINT" ":RETURN
  83. 83 IFLEN(T$)<1THEN67
  84. 84 PRINT"[157]  [157][157]";:PRINTCHR$(166);:PRINT"[157]";:L=LEN(T$):IFL<1THENT$="":GOTO86
  85. 85 T$=LEFT$(T$,L-1)
  86. 86 GOTO67
  87. 87 !RESTORE:SYS58692:PRINT"RECORD FILE OVERFLOW":PRINT"PROGRAM TERMINATED":PRINT"USE DOS COMMAND TO SCRATCH":PRINT"FILE NAME  RECORD":POKE2,0:SYS49152:POKE808,237:END
  88. 88 SYS58692:!DIM(3,5,20,10):!OPEN:VT=4:HT=7:GOSUB1:PRINT"[153][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]":PRINTTAB(7)" LINEAR MEASURE ":PRINTTAB(7)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":PRINTTAB(14)"[158]BY":PRINTTAB(7)"ROBERT  CROSWELL":PRINTTAB(7)"[150]V3.O        1986":POKEW+10,1:!DIM(18,20,16,5):!OPEN,"[160][160][160][160][160][160][160][160][160][160][160][160][160][160]"
  89. 89 Z=0:VT=19:HT=22:GOSUB1:PRINT"[158]DO YOU NEED":PRINTTAB(22)"DIRECTIONS ?"
  90. 90 VT=21:HT=22:GOSUB1:PRINT"PRESS (Y/N)":IFPEEK(1064)<>32THEN88
  91. 91 IFZ=0THENZ=1:POKE646,10:GOSUB63:GOTO93
  92. 92 IFZ=1THENZ=0:POKE646,1:GOSUB63:GOTO93
  93. 93 GETZ$:IFZ$=""THEN90
  94. 94 IFZ$=CHR$(178)THEN158
  95. 95 IFZ$=CHR$(189)THENPRINT"ENTER RUN TO RESTART":POKE808,237:SYSWW:POKE2,0:END
  96. 96 IFZ$="N"THEN103
  97. 97 IFZ$<>"Y"THEN93
  98. 98 POKE646,1:POKEW+10,1:!DIM(2,2,36,20):!OPEN,"[160][160][160][160][160][160]*[160]* *[160]DIRECTIONS[160]* * *[160]":VT=5:HT=3:GOSUB1:PRINT"[158]YOU WILL BE ASKED TO LOG IN USING":PRINTTAB(3)"YOUR HANDLE. YOU WILL THEN SEE A ":PRINTTAB(3)"SECTION OF A METER STICK OR RULER":PRINTTAB(3)"AND A YELLOW BAR. YOU WILL ENTER"
  99. 99 PRINTTAB(3)"THE LENGTH OF THE BAR IN METRIC ":PRINTTAB(3)"UNITS (MILLIMETERS, METERS OR  ":PRINTTAB(3)"CENTIMETERS) AS REQUESTED. NOTICE":PRINTTAB(3)"THAT THE UNITS CHANGE OFTEN IF YOU":PRINTTAB(3)"SELECTED LEVEL TWO OR THREE. YOUR":PRINTTAB(3)"SCORE WILL BE SHOWN ON THE SCREEN."
  100. 100 PRINTTAB(3)"IF YOU ENTER A WRONG ANSWER THREE ":PRINTTAB(3)"TIMES, THE COMPUTER WILL TELL YOU ":PRINTTAB(3)"THE CORRECT ANSWER. YOU WILL HAVE ":PRINTTAB(3)"TEN PROBLEMS SOLVE.               ":PRINTTAB(3)"      [150]PRESS RETURN TO GO ON[158]"
  101. 101 GETZ$:IFZ$<>CHR$(13)THEN101
  102. 102 !CLOSE:GOTO93
  103. 103 !CLOSE:!DIM(15,20,16,9):!OPEN,"[160]SELECT LEVEL":VT=17:HT=22:GOSUB1:PRINT"[153][164][164][164]":VT=18:HT=22:GOSUB1:PRINT" 1 [146][158] NOVICE":PRINTTAB(22)"[153][164][164][164]":PRINTTAB(22)" 2 [146][158] STUDENT":PRINTTAB(22)"[153][164][164][164]":PRINTTAB(22)" 3 [146][158] EXPERT":IFVTHENPOKESD+24,15:(null)"SELECT LEVEL 1 2 OR 3"
  104. 104 VT=16:HT=21:GOSUB1:PRINT" SELECT LEVEL":IFPEEK(1064)<>32THENRUN
  105. 105 IFZ=0THENZ=1:POKE646,10:GOSUB63:GOTO107
  106. 106 IFZ=1THENZ=0:POKE646,1:GOSUB63:GOTO107
  107. 107 GETZ$:LE=VAL(Z$):IFZ$="Q"THENRUN
  108. 108 IFLE<1ORLE>3THEN104
  109. 109 POKE646,7:!CLOSE:!DIM(16,4,28,7):!OPEN,"[160]PLEASE LOG IN ":IFVTHENPOKESD+24,15:(null)"PLEASE LAWG IN"
  110. 110 VT=21:HT=7:GOSUB1:PRINT"[150](_)BACKSPACE   (Q)QUIT[158]"
  111. 111 GETZ$:IFZ$<>""THEN111
  112. 112 VT=19:HT=5:GOSUB1:PRINT"[150][218]---------------- [218][158]":VT=19:HT=6:GOSUB1:G=1:T$="":GOSUB66:IFT$="Q"THENRUN
  113. 113 !CLOSE:X=0:FORI=1TONK:IFT$=NA$(I)THENR=I:I=NK:X=1
  114. 114 NEXT:IFXTHEN120
  115. 115 R=NK:Z$=LEFT$(T$+"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]",25):!DIM(15,8,27,8):!OPEN,Z$:IFVTHENPOKESD+24,15:(null)T$
  116. 116 VT=18:HT=9:GOSUB1:PRINT"I CAN'T FIND YOUR NAME.":IFVTHEN:(null)"I CANT FIND YOUR NAME."
  117. 117 VT=19:HT=9:GOSUB1:PRINT"THIS MUST BE YOUR FIRST  ":VT=20:HT=9:GOSUB1:PRINT"TIME HERE.   GOOD LUCK ! ":IFVTHEN:(null)"THIS MUST BE YOUR FIRST TIME HERE.GOOD LUCK"
  118. 118 NA$(R)=T$:SC$(R)="0":NK=NK+1:IFV=0THENFORI=1TO8:GOSUB63:NEXT
  119. 119 GOTO24
  120. 120 Z$="WELCOME BACK":!DIM(14,8,27,9):!OPEN,Z$:IFVTHENPOKESD+24,15:(null)Z$
  121. 121 VT=17:HT=9:GOSUB1:PRINTT$:IFVTHEN:(null)T$
  122. 122 VT=19:HT=9:GOSUB1:PRINT"YOUR LAST SCORE WAS "SC$(R):IFVTHEN:(null)"YOUR LAST SCORE WAS":V$=SC$(R):(null)V$
  123. 123 VT=21:HT=9:GOSUB1:PRINT"[150]LAST LEVEL "MO$(R)"[158]":IFVTHEN:(null)"YOUR LEVEL WAS":V$=MO$(R):(null)V$
  124. 124 GOSUB63:IFV=0THENFORI=1TO4:GOSUB63:NEXT
  125. 125 GOTO24
  126. 126 TY=TY+1:I=INT(RND(1)*11)+1:POKEW+4,0:!DIM(14,8,19,3):!OPEN,EW$(I):IFVTHENV$=VW$(I):(null)V$:GOSUB63
  127. 127 IFNOTVTHENFORI=1TO4:GOSUB63:NEXT
  128. 128 !CLOSE:POKEW+4,1:VT=21:HT=11:GOSUB1:PRINT"            ":IFTY>2THENGOSUB143
  129. 129 RETURN
  130. 130 PK=PK+1:I=INT(RND(1)*11)+1:!DIM(14,8,19,3):!OPEN,CR$(I):IFVTHENV$=VR$(I):POKESD+24,15:(null)V$
  131. 131 IFNOTVTHENFORI=1TO4:GOSUB63:NEXT
  132. 132 !CLOSE:RETURN
  133. 133 :
  134. 134 !DIM(10,5,24,12):!OPEN,NA$(R):VT=13:HT=8:GOSUB1:PRINT"NUMBER RIGHT ="NR:VT=15:HT=8:GOSUB1:PRINT"NUMBER WRONG ="NW:IFNR+NW<10THENSC$(R)="INC.":GOTO136
  135. 135 SC$(R)=STR$(INT((NR/(NR+NW)+.005)*100))
  136. 136 VT=17:HT=8:GOSUB1:PRINT"YOUR SCORE   ="SC$(R)"%":IFSC$(R)="INC."THENSC$(R)="INCOMPLETE"
  137. 137 IFVTHENPOKESD+24,15
  138. 138 IFVTHEN:V$=NA$(R):(null)V$:(null)"YOU ANSWERED":V$=STR$(NR):(null)V$
  139. 139 IFVTHEN:(null)"PROBLEMS CORRECTLY. YOU ANSWERED":V$=STR$(NW):(null)V$
  140. 140 IFVTHEN:(null)"INCORRECTLY. YOUR FINAL SCORE IS":V$=SC$(R):(null)V$
  141. 141 GOSUB63:VT=19:HT=8:GOSUB1:PRINT"HAVE A NICE DAY":IFVTHEN:(null)"HAVE A NICE DAY"
  142. 142 FORI=1TO4:GOSUB63:NEXT:GOTO149
  143. 143 T$="CORRECT ANSWER ="+A4$:!DIM(12,8,25,8):!OPEN,T$:T$="":IFVTHENPOKESD+24,15:(null)"THE CORRECT ANSWER IS":(null)A4$
  144. 144 IFA3$=""THENA3$="0"
  145. 145 VT=17:HT=10:GOSUB1:PRINT"YOUR ANSWER WAS "A3$:IFVTHEN:(null)"YOUR ANSWER OF":(null)A3$:(null)"IS NOT CORRECT"
  146. 146 IFVTHEN:(null)"LETS TRY THE NEXT PROBLEM"
  147. 147 IFV=0THENFORI=1TO8:GOSUB63:NEXT
  148. 148 !CLOSE:FORI=1TO4:GOSUB63:NEXT:RETURN
  149. 149 IFNK<20THENGOSUB63:GOSUB63
  150. 150 CLOSE15:OPEN15,8,15,"I0":PRINT#15,"S0:RECORD":CLOSE15:OPEN9,8,9,"0:RECORD,S,W":IFLE=1THENMO$(R)="NOVICE"
  151. 151 IFLE=2THENMO$(R)="STUDENT"
  152. 152 IFLE=3THENMO$(R)="EXPERT"
  153. 153 FORI=1TONK:IFNA$(I)=""THEN157
  154. 154 IFSC$(I)=""THENSC$(I)="00"
  155. 155 IFMO$(I)=""THENMO$(I)="XXX"
  156. 156 PRINT#9,NA$(I):PRINT#9,SC$(I):PRINT#9,MO$(I)
  157. 157 NEXT:PRINT#9,"EOR":PRINT#9,"XXX":PRINT#9,"YYY":CLOSE9:!CLOSE:RUN
  158. 158 POKE53280,0:POKE53281,7:POKE646,11:SYS58692:PRINT"             [164][164][164][164][164][164][164][164][164][164][164][164][164][164]":PRINT"              READ RECORDS ":N=1:OPEN9,8,9,"0:RECORD,S,R"
  159. 159 INPUT#9,A$,B$,C$:IFA$="EOR"THENCLOSE9:GOTO166
  160. 160 A$=LEFT$(A$+"                    ",16):B$=LEFT$(B$+"          ",5):C$=LEFT$(C$+"         ",9):IFN<10THENN$=STR$(N)+" . "
  161. 161 IFN>9THENN$=STR$(N)+". "
  162. 162 IFK<18THENPRINTN$" "A$" "B$" "C$"[144]":K=K+1:N=N+1:GOTO159
  163. 163 PRINTTAB(12)"<PRESS RETURN>[144]"
  164. 164 GETZ$:IFZ$<>CHR$(13)THEN164
  165. 165 PRINT"[147]             [164][164][164][164][164][164][164][164][164][164][164][164][164][164]":PRINT"              READ RECORDS ":K=0:GOTO159
  166. 166 PRINTTAB(5)"<END OF RECORD PRESS RETURN>"
  167. 167 GETZ$:IFZ$<>CHR$(13)THEN167
  168. 168 RUN
  169.