20 ' PATTERNS    ED DAVIS 1-2-82
30 ' Comments welcome
40 ' but BE  KIND!
50 ' Burlington (8-446)-2091
60 ' HI RES COLOR DEMO
70 ' ###################################
100 KEY OFF:SCREEN 0,1:COLOR 15,0,0:WIDTH 40:CLS:M%=0
110 LOCATE 10,1:PRINT "<<-  IF THIS PRINTING IS NOT IN THE  ->>"
120 LOCATE 11,1:PRINT "   CENTER OF THE SCREEN PRESS  'M' TO
130 LOCATE 12,1:PRINT "   MOVE THE PICTURE TO THE RIGHT, ANY
140 LOCATE 13,1:PRINT "    OTHER KEY TO GO TO THE PROGRAM.
150 K$=INKEY$:IF K$="" GOTO 150
160 IF K$="M" OR K$="m" THEN OUT 980,2: OUT 981,43:M%=1:GOTO 200
170 M%=0
200 CLS
210 COLOR 23 :LOCATE 2,13:PRINT"PATTERNS"
215 LOCATE 3,13:PRINT"E.DAVIS
220 COLOR  7,0,0:LOCATE 6,2:PRINT"Please select one of the following:
240 LOCATE 8,9: PRINT"1- WALLPAPER (NICE!)
250 LOCATE 9,9:PRINT"2- WAVES
260 LOCATE 10,9:PRINT "3- ALPHA PARTICLE
270 LOCATE 11,9:PRINT "4- FACE
300 LOCATE 21,9:PRINT "0- TO SWITCH TO/FROM DISPLAYS
310 LOCATE 22,9:PRINT "Q- TO QUIT PROGRAM
320 LOCATE 23,9:PRINT "M- TO MOVE SCREEN"
390 LOCATE 4,16
400 K$=INKEY$:IF K$="" GOTO 400
410 IF K$="0" THEN GOSUB 65000
420 IF K$="1" THEN GOSUB 500
430 IF K$="2" THEN GOSUB 600
440 IF K$="3" THEN GOSUB 700
450 IF K$="4" THEN GOTO 800
490 IF K$="Q" OR K$="q" THEN CLS:END
495 IF K$="M" OR K$="m" THEN GOTO 100
499 GOTO 200
500 CLS :REM BEGINNING OF PATTERN PGMS E.DAVIS 1-2-82
510 SCREEN 1,0:COLOR 0,1:IF M%=1 THEN OUT 980,2:OUT 981,43
520 FOR I=0 TO 300:C=C+1:C=C-(3*INT(C/3)):IF C>3 THEN C=0
530 LINE (I,0)-(300-I,191),C:NEXT
540 FOR I=0 TO 191:C=C+1:C=C-(3*INT(C/3)):IF C>3 THEN C=0
550 LINE (0,191-I)-(300,I),C:NEXT I:GOSUB 2000:GOTO 500
600 CLS ' WAVES
610 SCREEN 1,0:COLOR 0,1:IF M%=1 THEN OUT 980,2:OUT 981,43
620  C=3:LC=0:T#=18.8495559#
630 FOR X=0 TO T# STEP T#/279:LINE (140,96)-(X*14.8,60*SIN(X)+96),C
640 NEXT :GOSUB 2000:GOTO 600
700 CLS' ALPHA PARTICLES
710 SCREEN 1,0:COLOR 1,0:IF M%=1 THEN OUT 980,2:OUT 981,43
715 CLS
720 FOR J=1 TO 150:SOUND RND*2000+1037,2:X=INT(RND(1)*277):Y=INT(RND(1)*151)
730 LINE (140,96)-(X,Y),C:C=INT (RND(1)*3):NEXT J:GOSUB 2000:GOTO 700
800 CLS:IF PIC=1 THEN GOTO 804
801 PIC=1
802 S=3.142*235/180:F=3.142*305/180:DIM FF%(600):DIM FS%(600)
804 SCREEN 1,0:COLOR 7,0
806 CIRCLE (160,30),100,2,S,F,1
808 CIRCLE (160,100),50,2
810 PAINT (160,140),3,2
812 CIRCLE (160,170),100,2,S-3.142,F-3.142,1
814 PAINT (160,65),3,2
816 GET(115,115)-(205,145),FS%
818 GET (115,55)-(205,88),FF%
820 CLS
822 CIRCLE (160,100),90,2
824 PAINT (100,100),2,2
826 CIRCLE (120,75),11,1,,,1.1
828 PAINT (120,65),1,1
830 CIRCLE(200,75),11,1,,,1.1
832 PAINT (200,65),1,1
834 PRESET (120,40):DRAW "C1S4F11D1H11G11D1E11F11"
836 PRESET (200,40):DRAW "C1S4F11D1H11G11D1E11F11"
838 PUT (115,115),FS%
840 KEY OFF:LOCATE 25,10:PRINT "PRESS ANY KEY FOR MENU";
842 FOR I=1 TO 1000:NEXT I:PUT (115,115),FS%:PUT (115,115),FF%:GOSUB 846
844 FOR I=1 TO 600:NEXT I:PUT (115,115),FF%:PUT (115,115),FS%:GOSUB 846:GOTO 842
846 K$=INKEY$: IF K$="" THEN RETURN
848 GOTO 200
2000 ' ROUTINE TO REPEAT OR RETURN
2010 KEY OFF:LOCATE 25,2:PRINT " 'R' TO REPEAT, OTHER KEY TO RETURN";
2015 LOCATE 1,1
2020 K$=INKEY$:IF K$="" GOTO 2020
2030 IF K$="R" OR K$="r" THEN RETURN
2040 RETURN 200
65000 ' COLOR MONITOR-MONOCHROME MONITOR SWITCH    EMD 11-81
65001 CLS
65002 PRINT:PRINT"IF YOU WANT TO TOGGLE MONOCHROME/COLOR  THEN;"
65003 PRINT"   FOR COLOR PRESS - C"
65004 PRINT"   FOR MONO  PRESS - M"
65005 PRINT"   FOR NO CHANGE PRESS ANY OTHER KEY."
65006 K$=INKEY$:IF K$="" GOTO 65006
65007 IF K$="C" OR K$="c" THEN GOSUB 65019:RETURN
65008 IF K$="M" OR K$="m" THEN GOSUB 65011:RETURN
65009 CLS
65010 PRINT"@@@@@@@@@@@@    NO CHANGE   @@@@@@@@@@@@@@":RETURN
65011 REM switch to monochrome adapter
65012 DEF SEG=0
65013 POKE &H410,(PEEK(&H410) OR &H30)
65014 DEF SEG
65015 LOCATE ,,1,12,13
65016 SCREEN 0
65017 WIDTH 80
65018 RETURN
65019 REM switch to color/graphics adapter
65020 DEF SEG=0
65021 POKE &H410,(PEEK(&H410) AND &HCF) OR &H20
65022 DEF SEG
65023 LOCATE ,,1,6,7
65024 SCREEN 0
65025 WIDTH 40
65026 RETURN