Surround

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10122 – 10175.

Gallery

Surround

Source Code

   1 REM SURROUND
   2 REM BLACK  1-5  UP,Z-V DOWN,Q-T RIGHT,AG LEFT.
   3 REM GREY 6-0 UP,Y-P RIGHT,B-M DOWN; H-ENTER LEFT.
   5 LET SX=0
   6 LET SB=0
   7 LET O=PEEK 16396+256*PEEK 16397
  10 POKE 16418,0
  20 PRINT AT 0,0;"++++++++++++++++++++++++++++++++"
  30 FOR P=1 TO 22
  40 PRINT "+                              +"
  50 NEXT P
  60 PRINT ;"++++++++++++++++++++++++++++++++"
  70 PRINT AT 2,2;STR$ SX;AT 2,28;STR$ SB
  80 LET X=12
  90 LET Y=3
 100 LET B=12
 110 LET C=28
 120 LET X1=0
 130 LET Y1=1
 140 LET B1=0
 145 LET C1=-1
 150 IF PEEK (O+1+Y+33*X)<>0 THEN GOTO 400
 160 IF PEEK (O+1+C+33*B)<>0 THEN GOTO 300
 170 PRINT AT X,Y;CHR$ (128);AT B,C;CHR$ (136)
 180 LET A=PEEK 16421
 185 IF A=238 OR A=222 OR A=190 OR A=254 OR A=126 THEN LET X1=1
 190 IF A=247 OR A=231 OR A=215 OR A=183 OR A=119 THEN LET X1=-1
 200 IF X1<>0 THEN LET Y1=0
 210 IF A=235 OR A=251 OR A=219 OR A=187 OR A=125 THEN LET Y1=1
 215 IF A=237 OR A=221 OR A=253 OR A=189 OR A=125 THEN LET Y1=-1
 220 IF Y1<>0 THEN LET X1=0
 230 IF A=231 OR A=239 OR A=235 OR A=237 OR A=238 THEN LET B1=-1
 235 IF A=119 OR A=123 OR A=125 OR A=126 OR A=127 THEN LET B1=1
 240 IF B1<>0 THEN LET C1=0
 245 IF A=215 OR A=219 OR A=223 OR A=221 OR A=222 THEN LET C1=1
 250 IF A=183 OR A=187 OR A=189 OR A=191 OR A=190 THEN LET C1=-1
 260 IF C1<>0 THEN LET B1=0
 270 LET X=X+X1
 280 LET Y=Y+Y1
 290 LET B=B+B1
 295 GOTO 150
 300 LET SX=SX+1
 310 IF SX<15 THEN GOTO 7
 320 STOP 
 400 LET SB=SB+1
 410 IF SB<15 THEN GOTO 7
 500 SAVE "1013%5"
 600 RUN 

People

No people associated with this content.

Scroll to Top