1 REM ** CHARACTER GRID **
2 REM ** WILLIAM LAWRIE ** 3 REM ** 15,JURA STREET ** 4 REM ** NORTH MUIRTON ** 5 REM ** PERTH,SCOTLAND ** 6 ' USE :- 7 ' CALL 30000 - TO ACTIVATE 8 ' 9 KEY 138,"run"+CHR$(13) 10 DIM lx(4,25),ly(4,25),a0(4,20),b0(4,20),a1(4,40),b1(4,40),a2(4,80),b2(4,80):a$="123456789*" 20 REM ** prints MENU ** 30 MODE 1:BORDER 16:INK 1,1:INK 0,25 40 LOCATE 19,3:PRINT"REM:" 50 LOCATE 7,5:PRINT"(Press STOP on Numeric Pad)" 60 LOCATE 7,7:PRINT"(for [RUN] and for [MENU])" 70 LOCATE 9,11:PRINT"*** CHARACTER GRID ***" 80 LOCATE 5,15:PRINT"(Press Key 0 - 1 - 2 for Mode)" 90 z$=INKEY$:IF z$="0"THEN 100 ELSE IF z$="1"THEN 260 ELSE IF z$="2"THEN 420 ELSE 70 100 MODE 0:GOSUB 590 110 REM ** plots points for lines down ** 120 FOR i=1 TO 20 130 a0(2,i)=cx(2)+(cx(3)-cx(2))*i/20 140 b0(2,i)=cy(2)+(cy(3)-cy(2))*i/20 150 NEXT 160 FOR i=1 TO 20 170 a0(4,i)=cx(1)+(cx(4)-cx(1))*i/20 180 b0(4,i)=cy(1)+(cy(4)-cy(1))*i/20 190 NEXT 200 REM ** draws lines down ** 210 row =2:FOR i=1 TO 20:PLOT a0(row,i),b0(row,i) 220 DRAW a0(row+2,i),b0(row+2,i):NEXT 230 REM ** prints numbers + transparent mode ** 240 PRINT a$+a$;CHR$(22)+CHR$(1) 250 LOCATE 1,24:END 260 MODE 1:GOSUB 590 270 REM ** plots points for lines down ** 280 FOR i=1 TO 40 290 a1(2,i)=cx(2)+(cx(3)-cx(2))*i/40 300 b1(2,i)=cy(2)+(cy(3)-cy(2))*i/40 310 NEXT 320 FOR i=1 TO 40 330 a1(4,i)=cx(1)+(cx(4)-cx(1))*i/40 340 b1(4,i)=cy(1)+(cy(4)-cy(1))*i/40 350 NEXT 360 REM ** draws lines down ** 370 row =2:FOR i=1 TO 40:PLOT a1(row,i),b1(row,i) 380 DRAW a1(row+2,i),b1(row+2,i):NEXT 390 REM ** prints numbers + trnasparent mode ** 400 PRINT a$+a$+a$+a$;CHR$(22)+CHR$(1) 410 LOCATE 1,24:END 420 MODE 2:GOSUB 590 430 REM ** plots points for lines down ** 440 FOR i=1 TO 80 450 a2(2,i)=cx(2)+(cx(3)-cx(2))*i/80 460 b2(2,i)=cy(2)+(cy(3)-cy(2))*i/80 470 NEXT 480 FOR i=1 TO 80 490 a2(4,i)=cx(1)+(cx(4)-cx(1))*i/80 500 b2(4,i)=cy(1)+(cy(4)-cy(1))*i/80 510 NEXT 520 REM ** draws lines down ** 530 row=2:FOR i=1 TO 80:PLOT a2(row,i),b2(row,i) 540 DRAW a2(row+2,i),b2(row+2,i):NEXT 550 REM ** prints numbers + transparent mode ** 560 PRINT a$+a$+a$+a$+a$+a$+a$+a$;CHR$(22)+CHR$(1) 570 LOCATE 1,24:END 580 REM ** plots and draws rectangle ** 590 FOR i=1 TO 4:READ cx(i),cy(i):NEXT 600 DATA 0,399,0,0,639,0,639,399 610 PLOT cx(4),cy(4) 620 FOR i=1 TO 4:DRAW cx(i),cy(i):NEXT 630 REM ** plots points for lines across ** 640 FOR i=1 TO 25 650 lx(1,i)=cx(1)+(cx(2)-cx(1))*i/25 660 ly(1,i)=cy(1)+(cy(2)-cy(1))*i/25 670 NEXT 680 FOR i=1 TO 25 690 lx(3,i)=cx(4)+(cx(3)-cx(4))*i/25 700 ly(3,i)=cy(4)+(cy(3)-cy(4))*i/25 710 NEXT 720 REM ** draws lines across ** 730 row=1:FOR i=1 TO 25:PLOT lx(row,i),ly(row,i) 740 DRAW lx(row+2,i),ly(row+2,i):NEXT 750 RETURN |