10
20
30 :
40 FOR M%=0 TO 11
50 MODE M%:mode%=M% AND 7
60 size%=2
70 IF mode%=0 OR mode%=3:size%=1
80 IF mode%=2 OR mode%=5:size%=4
90 colr%=1
100 IF mode%=1 OR mode%=5:colr%=2
110 IF mode%=2:colr%=3
120 IF M%>7:colr%=colr%*2:IF colr%>3:colr%=3
130 PRINT'CHR$8;:W%=POS/2:VDU13
140 PRINT SPC(W%-3)"MODE ";M%
150 IF M%>7:PRINT'SPC(W%-6);"If supported";
160 PRINT'SPC((W%-13)AND(W%>10));"Characters should be ";
170 IF size%=1:PRINT"thin"
180 IF size%=2:PRINT"square"
190 IF size%=4:PRINTSPC(W%-2);"wide"
200 IF M%=7:PRINT" If supported this should be teletext"
210 IF M%=7:PRINT CHR$147;STRING$(38,",")'SPC2;
220 IF M%=7:FOR C%=1 TO 7:PRINT CHR$(128+C%);MID$("RED GRN YELWBLUEMGNTCYANWHTE",C%*4-3,4);:NEXT:PRINT
230 IF M%=7:PRINT CHR$149;STRING$(38,",")
240 IF M%<>7:PRINT'SPC((W%-17)AND(W%>10))"There should be at";SPC(3+2*(W%>10));"least ";2^colr%;" colours"
250 IF M%<>7:FOR C%=0 TO 15:COLOUR 135-(C%AND1)*7:COLOUR C%:PRINT"COLOUR ";C%;SPC(2+(C%>9));:NEXT:COLOUR 7:PRINTCHR$8'
260 IF M%=0:PRINTSPC(W%-26)"This should be the default 2-colour high-res MODE"
270 IF M%=1:PRINTSPC(W%-13)"This should be the default"'SPC(W%-11)"4-colour 'square' MODE"
280 IF M%=3:PRINTSPC(W%-27)"This should be the fall-back 2-colour high-res MODE"
290 IF M%=4:PRINTSPC(W%-13)"This should be the default"'SPC(W%-11)"2-colour 'square' MODE"
300 IF M%=6:PRINTSPC(W%-14)"This should be the fall-back"'SPC(W%-11)"2-colour 'square' MODE"
310 A%=INKEY(300)
320 NEXT
330 RUN