Atari 130XE — 130XE Owners Manual_Page_086

THE BIG BANG Close the door before you run the next program so that you won't disturb the neighbors . .18 POKE 764 .. 255: POKE 588 .. .1 28 GRAPHICS .17 38 FOR K=.18 TO .188: SOUND 8 .. K .. .18 .. .18:S0UND.1 .. K-2 .. .18 .. 8: SOUND 2 .. K+2 .. .18 .. .12:NEKT K 48 SOUND.1 .. 8 .. 8 .. 8: SOUND 2 .. 8 .. 8 .. 8 58 POSITION 4 .. .1.1: PRINT U6; "BAROOOOMMM!" 68 FOR DECAV=.15 TO 8 STEP -8.5: FOR B=.1 TO 28: SOUND 8 .. .188 .. B .. DECAV: POKE 7.12 .. B : NEKT B : NEKT DECAV 78 GRAPHICS .1+32 ': POKE 7.12 .. .148 88 POKE 752 .. .1 : PRINT:

PRINT" Press S'tar't 'to se't of f ano'ther explosion." ~8 IF PEEK (5327~) THEN GOTO ~8 .188 GOTO 28 SORT THOSE WORDS This sorting program puts words in their proper places-in alphabetic order. Replace the words in the DATA statements in lines 10 and 20 to sort words of your own choosing. Remember to separate each of your words with a comma . .18 DATA ATARI .. DISK DRIVE .. MONITOR .. COMPUTER .. TOUCH TABLET .. PRINTER .. KEVBOARD 28 DATA SOFTWARE .. PROGRAM RECORDER .. WORD PROCESSING .. ACCOUNTING .. DATABASE .. FUN 38 DIM Z$(.1888) .. A(58) .. A$(28) .. S(.18) 48 S(.1)=.1:FOR L=.1 TO~: S(L+.1)=S(L)*3+.1:NEKT L 50 TRAP 80: GRAPHICS 0:? "HERE IS THE LIS T : " 60 READ : B=LEN (Z$) :

C=LEN (A$): (B+.1 .. B+.1)=CHR$(C):? 70 Z$(B+2 .. B+.1+C)=A$: 0=0+.1: A(O)=B+.1: GOTO 68 80? :? "READV TO SORT " .. : P=0 .108 FOR I=P TO .1 STEP -.1 : S=S (I): FOR J=S +.1 TO 0: L=J-S: A=A(J) : B=A(L) ~0 P=P+.1:IF S(P+2){0 THEN ~0 .1.18 IF Z$(A+.1 .. A+ASC(Z$(A .. A)))}Z$ (B+.1 .. B+ASC(Z$(B .. B))) THEN .130 .128 A (L+S) =B : L=L-S: IF L}8 THEN B=A (L) : GOTO .1.18 .130 A(L+S)=A: NEXT J: NEXT I:? : ? "SORTED." .140 FOR L=.1 TO 0: A=A(L): ? Z$(A+.1 .. A+ASC (Z$(A .. A))): NEXT L 80