5 WIDTH "lpt1:",255
6 GOSUB 10000
7 GOSUB 11000
10 INPUT "no of side of structure",S
20 INPUT "input the radius of structure",R
25 GOSUB 10000
30 SCREEN 2:KEY OFF:CLS
40 CONST = 3.141593*2/S
50 FOR I = 1 TO S
60 X1 = R*COS(I*CONST)*2
70 Y1 = (28*R/32)*SIN(I*CONST)
80 FOR N = 1 TO S
90 X2 = R*COS(N*CONST)*2
100 Y2 = (28*R/32)*SIN(N*CONST)
110 LINE (X1+320,Y1+100)-(X2+320,Y2+100),3
120 NEXT N
130 N=1
140 NEXT I
145 GOSUB 11000
150 INPUT "Would you like to print the screen 'Y' for yes: ",YES$
160 IF YES$<>"Y" GOTO  180
170 GOSUB 20500
180 INPUT "Would you like another pattern? 'Y' for yes: ",YES$
190 IF YES$="Y" GOTO  10
200 END
10000 REM switch to color
10010 KEY OFF
10020 LOCATE ,,0
10030 DEF SEG = 0
10040 POKE &H410,(PEEK(&H410)AND &HCF)OR &H10
10050 WIDTH 40
10060 LOCATE ,,1,6,7
10070 RETURN
11000 REM switch to mono
11010 KEY OFF
11020 LOCATE,,0
11030 DEF SEG = 0
11040 POKE &H410,PEEK(&H410) OR &H30
11050 DEF SEG
11060 SCREEN 1
11070 SCREEN 0
11080 WIDTH 80
11090 LOCATE ,,1,12,13
11100 RETURN
20500 DEF SEG = &HB800
20510 FOR J = 0 TO 79
20520 LPRINT CHR$(&H1B);"L";CHR$(&H20);CHR$(&H3);
20530 FOR K = 99 TO 0 STEP -1
20540 X=J+(80*K):C% = PEEK(X):B% = PEEK(8192+X)
20550 IF C%=13 THEN C%=9
20560 IF B%=13 THEN B%=9
20570 LPRINT CHR$(B%);CHR$(B%);CHR$(B%);CHR$(B%);CHR$(C%);CHR$(C%);CHR$(C%);CHR$(C%);
20580 NEXT K
20590 K=0:LPRINT CHR$(&H1B);"A";CHR$(8);CHR$(10);
20600 NEXT J
20610 RETURN