10
20
30
40 :
50 PROCcolour(-1):
60 PROCcls
70 FOR A=0 TO 255:PROCcolour(A)
80 PRINT" ";LEFT$(STR$A+" ",3);
90 IF (A AND 15)=15:PRINT ELSE PRINT" ";
100 NEXT A
110 PROCcolour(128):PROCcolour(7):END
120 :
130 DEFPROCcls:PRINT'CHR$27;"[2J";CHR$27;"[1;1H";:ENDPROC
140 DEFPROCcolour(C):IF C<0:fgd=7:bgd=0:PRINT CHR$27;"[0m";:ENDPROC:
150 IF (C >= 192):border=C AND 15:ENDPROC :
160 IF (C AND 128):bgd=C AND 15 ELSE fgd=C AND 15 :
170 PRINT CHR$27;"[0";
180 IF (C AND 16):PRINT ";5"; :
190 IF (C AND 32):PRINT ";4"; :
200 IF (C AND 64):PRINT ";7"; :
210 PRINT ";";30+(fgd AND 7); :
220 IF (fgd AND 8):PRINT ";1"; :
230 PRINT ";";40+(bgd AND 7); :
240 IF (bgd AND 8):PRINT ";";100+(bgd AND 7); :
250 PRINT "m";
260 ENDPROC