100 DIM DX(2),AR(2),AC(2),AD(2)
110 DX(0)=1
120 DX(1)=-1
130 CALL CLEAR
140 FOR I=1 TO 22
150 READ C,C$
160 CALL CHAR(C,C$)
170 NEXT I
180 FOR I=1 TO 16
190 READ F,B
200 CALL COLOR(I,F,B)
210 NEXT I
220 PRINT TAB(10);"APERTURE": : : : : : : : : : : : : :
230 PRINT " PRESS ANY KEY TO START"
240 CALL KEY(0,K,S)
250 IF S=0 THEN 240
260 L=2
270 GOSUB 8000
290 X=Y=D=AR(0)=AR(1)=AC(0)=AC(1)=T=0
500 CALL VCHAR(R,C,D+144)
501 GOSUB 5000
510 IF B=99 THEN 580
520 CALL GCHAR(R+1,C,G)
530 IF(G=120)+((G>=136)*(G<=138))THEN 1500
540 IF G<>97 THEN 580
550 Y=1
560 X=0
570 GOTO 600
580 Y=0
600 CALL KEY(3,K,S)
605 IF S=0 THEN 670
610 IF(K=83)*(Y=0)THEN 800
620 IF(K=68)*(Y=0)THEN 830
630 IF(K=69)*(Y=0)THEN 860
640 IF(K=88)*(Y=0)THEN 900
650 IF K=66 THEN 1000
660 IF K=79 THEN 1020
670 IF Y=0 THEN 510 ELSE 720
700 CALL GCHAR(R+Y,C+X,G)
701 IF G=104 THEN 1200
702 IF G=112 THEN 1230
703 IF(G=120)+((G>=136)*(G<=138))THEN 1500
704 IF G=128 THEN 2000
705 IF G=153 THEN 3000
710 IF(G<>97)*(G<>99)THEN 510
720 CALL VCHAR(R,C,B)
730 R=R+Y
740 C=C+X
750 B=G
760 GOTO 500
800 X=-1
810 D=1
820 GOTO 700
830 X=1
840 D=0
850 GOTO 700
860 IF B<>99 THEN 510
870 Y=-1
880 X=0
890 GOTO 700
900 CALL GCHAR(R+1,C,G)
910 IF G<>99 THEN 600
920 Y=1
930 X=0
940 GOTO 720
1000 PO=0
1010 GOTO 1030
1020 PO=1
1030 CALL VCHAR(R,C,D+146)
1035 PX=DX(D)
1040 PR=R
1050 PC=C+PX
1060 CALL GCHAR(PR,PC,G)
1070 IF G=96 THEN 1110
1080 IF(G<>97)*(G<>99)*(G<>128)THEN 500
1090 PC=PC+PX
1100 GOTO 1060
1110 IF AR(PO)=0 THEN 1130
1120 CALL VCHAR(AR(PO),AC(PO),96)
1130 AR(PO)=PR
1140 AC(PO)=PC
1150 CALL VCHAR(PR,PC,104+(PO*<img src='http://www.atariage.com/forums/public/style_emoticons/<#EMO_DIR#>/icon_cool.gif' class='bbc_emoticon' alt='8)' />)
1160 CALL GCHAR(PR,PC-1,G)
1170 AD(PO)=ABS((G=97)+(G=99)+(G=128)+(G=146)+(G=147))
1180 GOTO 500
1200 PO=0
1210 PD=1
1220 GOTO 1250
1230 PO=1
1240 PD=0
1250 IF(AR(PD)=0)THEN 501
1260 CALL VCHAR(R,C,B)
1270 R=AR(PD)
1280 C=AC(PD)+DX(AD(PD))
1290 D=AD(PD)
1300 CALL GCHAR(R,C,B)
1310 GOTO 500
1500 CALL SOUND(500,-6,2)
1510 CALL VCHAR(R,C,B)
1520 FOR I=1 TO 1000
1530 NEXT I
1540 GOTO 270
2000 CALL GCHAR(CR,CC+DX(D),CG)
2001 IF CG=104 THEN 2300
2002 IF CG=112 THEN 2320
2010 IF(CG<>97)*(CG<>99)THEN 501
2020 CALL VCHAR(CR,CC,CB)
2030 CALL VCHAR(R,C,B)
2040 B=CB
2050 CB=CG
2060 CC=CC+DX(D)
2070 R=R+Y
2080 C=C+X
2090 CALL VCHAR(CR,CC,128)
2100 CALL VCHAR(R,C,D+144)
2110 CALL GCHAR(CR+1,CC,CG)
2120 IF CG=120 THEN 2200
2130 IF CG<>97 THEN 600
2140 CALL VCHAR(CR,CC,CB)
2150 CR=CR+1
2160 CB=CG
2170 CALL VCHAR(CR,CC,128)
2180 GOTO 2110
2200 CALL VCHAR(CR,CC,97)
2210 CR=CC=0
2220 GOTO 600
2300 PO=1
2310 GOTO 2330
2320 PO=0
2330 IF AR(PO)=0 THEN 501
2340 CALL VCHAR(CR,CC,CB)
2345 CALL VCHAR(R,C,B)
2346 B=CB
2347 R=CR
2348 C=CC
2350 CR=AR(PO)
2360 CC=AC(PO)+DX(AD(PO))*2
2370 CALL GCHAR(CR,CC,CB)
2380 GOTO 2090
3000 L=L+1
3010 GOTO 270
5000 T=T+1
5010 IF T=4 THEN 5040
5030 RETURN
5040 T=0
5050 RETURN
8000 CALL CLEAR
8010 PRINT "TEST CHAMBER";L: : : : : : : : : : : : : : : : : : : : : : :
8020 CALL HCHAR(2,1,98,736)
8030 FOR I=1 TO 21
8040 CALL HCHAR(2+I,2,96,30)
8050 NEXT I
8060 ON L GOTO 8100,8120,8140,8160,8180,8200,8220,8240,8260,8280
8100 RESTORE 20000
8110 GOTO 8500
8120 RESTORE 20100
8130 GOTO 8500
8140 RESTORE 20200
8150 GOTO 8500
8160 RESTORE 20300
8170 GOTO 8500
8180 RESTORE 20400
8190 GOTO 8500
8200 RESTORE 20500
8210 GOTO 8500
8220 RESTORE 20600
8230 GOTO 8500
8240 RESTORE 20700
8250 GOTO 8500
8260 RESTORE 20800
8270 GOTO 8500
8280 RESTORE 20900
8290 GOTO 8500
8500 READ T$
8510 I=1
8520 T=ASC(SEG$(T$,I,1))-48
8530 IF T=0 THEN 9000
8535 IF T=5 THEN 8500
8540 I=I+1
8550 R=ASC(SEG$(T$,I,1))-48
8560 I=I+1
8570 C=ASC(SEG$(T$,I,1))-48
8580 I=I+1
8590 B=ASC(SEG$(T$,I,1))
8600 I=I+1
8610 ON T GOTO 8620,8640,8680,8720
8620 CALL VCHAR(R,C,B)
8630 GOTO 8520
8640 H=ASC(SEG$(T$,I,1))-48
8650 I=I+1
8660 CALL HCHAR(R,C,B,H)
8670 GOTO 8520
8680 H=ASC(SEG$(T$,I,1))-48
8690 I=I+1
8700 CALL VCHAR(R,C,B,H)
8710 GOTO 8520
8720 V=ASC(SEG$(T$,I,1))-48
8730 I=I+1
8740 H=ASC(SEG$(T$,I,1))-48
8750 I=I+1
8760 FOR J=1 TO V
8770 CALL HCHAR((R-1)+J,C,B,H)
8780 NEXT J
8790 GOTO 8520
9000 READ T$
9010 R=ASC(SEG$(T$,1,1))-48
9020 C=ASC(SEG$(T$,2,1))-48
9030 B=ASC(SEG$(T$,3,1))
9040 CR=ASC(SEG$(T$,4,1))-48
9050 CC=ASC(SEG$(T$,5,1))-48
9060 CB=ASC(SEG$(T$,6,1))
9100 RETURN
10000 DATA 96,FFFFFFFFFFFFFFFF,97,0,98,FF88BBBBFF88BBBB,104,1038387C7C383810,112,1038387C7C383810
10010 DATA 120,F9A7D50E6FE5AB70,128,00EE92926C9292EE,129,00C0A0881888A0C0,130,0003051130110503
10020 DATA 131,C0A080808080A0C0,132,0305010101010503,133,C0A0A0A0A0A0A0C0,134,03050505050503
10030 DATA 136,002854385428,152,FF5A,153,FF999999999999FF,99,7E007E007E007E,100,FFFF423C
10040 DATA 144,0018123C50146C40,145,0018483C0A283602,146,0018133E5010282C,147,0018C87C0A081434
11000 DATA 2,4,2,4,2,4,2,4,2,4,2,4,2,4,2,4
11010 DATA 15,16,6,15,10,15,4,12,2,16,8,16,7,16,2,15
20000 DATA "4=2b;;4=3a5L4B>a6544La323B=c634Kc>16N™0"
20010 DATA "A4a000"
20100 DATA "446a4C486a<94D3a4544Ka4348Ba<74BFa654:Ia624>:`34373c93>>c63D8c43DEc438Mc834Ab4263a32?4a22:?a32?Ka25"
20101 DATA "2@6`22;=`217J™0"
20110 DATA "G5a000"
20200 DATA "0"
20210 DATA "000000"
20300 DATA "0"
20310 DATA "000000"
20400 DATA "0"
20410 DATA "000000"
20500 DATA "0"
20510 DATA "000000"
20600 DATA "0"
20610 DATA "000000"
20700 DATA "0"
20710 DATA "000000"
20800 DATA "0"
20810 DATA "000000"
20900 DATA "0"
20910 DATA "000000"