Derek_Stewart wrote: Sat Feb 01, 2025 10:04 pm
does this work on all SMSQ/E systems?
My function? Yes, it works on all SMSQ/E systems
A quick & dirty test program:
(run it in High colour mode, 512x384 minimum resolution)
Code: Select all
100 WINDOW 512,384,0,0:CLS
110 DrawTable
120 n%=1:line%=3
130 FOR k%=0 TO 3
140 FOR i%=0 TO 7
150 AT line%,15:
160 FOR j%=0 TO 7
170 x=scolor(i%,j%,k%)
180 INK 7: PAPER 0: PRINT_USING "#####", x;: STRIP x:PRINT" ";
190 n%=n%+1:
200 IF n%=9 THEN n%=1:PRINT:
210 END FOR j%
220 line%=line%+1
230 END FOR i%
240 END FOR k%
250 a$=INKEY$(-1)
255 REMark ----------------------------------
260 DEFine FuNction scolor(col%,con%,stp%)
270 RETurn 64*stp%+8*(col%^^con%)+col%
280 END DEFine scolor
285 REMark ----------------------------------
290 DEFine PROCedure DrawTable
300 LOCal i%, j%, line%
310 line%=1: INK 7:PAPER 0
320 AT line%-1,0:PRINT " | |";
330 AT line%,0:PRINT "Stipple | Col |";
340 AT line%+1,0:PRINT "---------------------------------------------------------------------------------";
350 FOR i%=3 TO 34: AT i%,8:PRINT"| |";
360 FOR i%=0 TO 3
370 AT line%+1+8+i%*8,0:PRINT "______________|";
380 AT line%+5+i%*8,3:PRINT i%;
390 END FOR i%
400 AT 0,45:PRINT"Contrast";
410 FOR i%=0 TO 7: AT 1,21+i%*8:PRINT i%;
420 FOR i%=0 TO 3
430 FOR j%=0 TO 7
440 AT 3+i%*8+j%, 11: PRINT j%;
450 END FOR j%
460 END FOR i%
470 END DEFine DrawTable
