1 WIDTH 80:CLS:CLEAR:KEY(2) ON:ON KEY(2) GOSUB 65140:KEY 2,"RUN"+CHR$(34)+"CONTROL"+CHR$(13)
5 PRINT"Which display should I worm my way into?"+CHR$(13)+"1 - Monochrome"+CHR$(13)+"2 - Color"
6 ANS$=INKEY$:IF ANS$="" THEN GOTO 6
7 IF VAL(ANS$) <1 OR VAL(ANS$) >2 THEN BEEP:GOTO 6
10 KEY OFF:WL=20:DIM W(WL,2):DIM OLD(4,4):DIM NEWX(4,4):IF VAL(ANS$)=1 THEN DEF SEG=&HB000 ELSE DEF SEG=&HB800
20 DIM NEWFROM(4):NEWFROM(1)=3:NEWFROM(2)=4:NEWFROM(3)=1:NEWFROM(4)=2
40 OLD(1,2)=200:OLD(1,3)=186:OLD(1,4)=188
50 OLD(2,1)=200:OLD(2,3)=201:OLD(2,4)=205
60 OLD(3,1)=186:OLD(3,2)=201:OLD(3,4)=187
70 OLD(4,1)=188:OLD(4,2)=205:OLD(4,3)=187
80 NEWX(1,2)=205:NEWX(1,3)=186:NEWX(1,4)=205
90 NEWX(2,1)=186:NEWX(2,3)=186:NEWX(2,4)=205
100 NEWX(3,1)=186:NEWX(3,2)=205:NEWX(3,4)=205
110 NEWX(4,1)=186:NEWX(4,2)=205:NEWX(4,3)=186
111 FOR I=0 TO 1999:POKE 2*I,219:NEXT I
120 FOR I=0 TO WL-1:POKE 2*(5*80+I),205:W(I,1)=5:W(I,2)=I:NEXT I:H=WL-1:F=4
140 ND=1+INT(RND*3.999999):WHILE ND=F:ND=1+INT(RND*3.999999):WEND:IF (ND=1 AND W(H,1)=0)OR(ND=2 AND W(H,2)=79)OR(ND=3 AND W(H,1)=24)OR(ND=4 AND W(H,2)=0)THEN GOTO 140
160 T=(H+1)MOD WL:POKE 2*(W(T,1)*80+W(T,2)),255:POKE 2*(W(H,1)*80+W(H,2)),OLD(F,ND):NH=(H+1)MOD WL:W(NH,1)=W(H,1):W(NH,2)=W(H,2):H=NH
170 POKE 2*(W(H,1)*80+W(H,2)),OLD(F,ND):NH=(H+1)MOD WL
190 IF ND=1 THEN W(H,1)=W(H,1)-1 ELSE IF ND=2 THEN W(H,2)=W(H,2)+1 ELSE IF ND=3 THEN W(H,1)=W(H,1)+1 ELSE IF ND=4 THEN W(H,2)=W(H,2)-1
230 POKE 2*(W(H,1)*80+W(H,2)),NEWX(F,ND):F=NEWFROM(ND)
240 GOTO 140
65130 E=ERR:RESUME NEXT
65140 ON ERROR GOTO 65130:RUN"BASMENU
65150 IF E<>71 THEN RUN"control
65160 RUN"A:TRANSFER
65170 SYSTEM