Atari 65XE Owner's Manual page 85

Hide thumbs Also See for 65XE:
Table of Contents

Advertisement

THE BIG BANG
Close the door before you run the next program so that you won't
disturb the neighbors.
10 POKE 764,255:POKE 580,1
20 GRAPHICS 17
30 FOR X=10 TO 100: SOUND 0 , X , 1 0 , 1 0 : S O U N D 1,X-2,10,8:
SOUND 2 , X + 2 , l 0 , 1 2 : N E X T X
40 SOUND 1 , 0 , 0 , 0 : S O U N D 2,0,0,0
50 POSITION 4,11: PRINT #6; " B A R O O O O M M M ! "
60 FOR DECAY=15 TO 0 STEP -0.5:FOR B=1 TO 20:
SOUND 0,100,B,DECAY: POKE 712,B:NEXT B:NEXT DECAY
70 GRAPHICS 1+32:POKE 712,148
80 POKE 752,l:PRINT : PRINT " Press Start to set off
another explosion. "
90 IF PEEK(53279)<>6 THEN GOTO 90
100 GOTO 20
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.
10 DATA ATARI,DISK DRIVE, M O N I T O R , C O M P U T E R , T O U C H
T A B L E T , P R I N T E R , K E Y B O O R D
20 DATA SOFTWARE,PROGRAM R E C O R D E R , W O R D PROCESSING,
ACCOUNTING,DATA B A S E , F U N
30 DIM Z$(1000),A(50),A$(20),S(10)
40 S(1)=1:FOR L=1 TO 9: S(L+1)=S(L)*3+1:NEXT L
50 TRAP 80:GRAPHICS 0:? "HERE IS THE LIST:"
60 READ A$:B=LEN(Z$):C=LEN(A$): Z$
(B+1,B+1)=CHR$(C):? A$
70 Z$(B+2,B+1+C)=:A$: Q = Q + 1 : A ( Q ) = B + 1 : G O T O 60
80 ? : ? "READY TO SORT. . .",:P=0
90 P=P+1:IF S(P+2)<Q THEN 90
100 FOR I=P TO 1 STEP -1:S=S(I) : FOR J=S+1 TO
Q:L=J-S:A=A(J): B=A(L)
110 IF Z$(A+1,A+ASC(Z$(A,A)))>Z$ (B+1,B+ASC(Z$(B,B)))
THEN 130
120 A(L+S)=B:L=L-S:IF L>0 THEN B=A(L):GOTO 110
130 A ( L + S ) = A : N E X T J:NEXT I:? : ? "SORTED."
140 FOR L=1 TO Q : A = A ( L ) : ? Z$(A+1,A+ASC(Z$(A,A))):NEXT L
80

Advertisement

Table of Contents
loading

Table of Contents