8-Bit Software Online Conversion

Colour Clash Demonstration - Listing

10REM >ColClsh 20REM by Steven Flintham 30REM 40REM Demonstrate different colour co mbinations 50REM 60REM Sunday 6th September 1992 70: 80MODE 7 90VDU 23;8202;0;0;0; 100PROCdisable 110PROCinit 120PROCshow`clashes 130MODE 7 140PROCenable 150END 160: 170DEF PROCdisable 180*FX229,1 190*FX4,2 200ENDPROC 210: 220DEF PROCinit 230ON ERROR MODE 7:REPORT:PRINT " at l ine ";ERL:PROCenable:END 240DIM colour$(7) 250RESTORE 260FOR read%=0 TO 7 270READ colour$(read%) 280NEXT 290ENDPROC 300: 310DATA black,red,green,yellow,blue,ma genta,cyan,white 320: 330DEF PROCenable 340*FX229,0 350*FX4,0 360ENDPROC 370: 380DEF PROCtitle(title$,fore%,back%) 390LOCAL x% 400x%=20-LEN(title$)/2 410PRINTTAB(x%-4,0);CHR$141;CHR$(128+b ack%);CHR$157;CHR$(128+fore%);title$;" ";CHR$156 420PRINTTAB(x%-4,1);CHR$141;CHR$(128+b ack%);CHR$157;CHR$(128+fore%);title$;" ";CHR$156 430ENDPROC 440: 450DEF PROCshow`clashes 460PROCtitle("Colour clash demonstrati on",3,4) 470VDU 28,0,24,39,3 480lines%=0 490FOR back%=0 TO 7 500FOR fore%=1 TO 7 510IF back%<>fore% THEN lines%=lines%+ 1:PRINT CHR$(128+back%);CHR$(156+ABS(bac k%<>0));CHR$(128+fore%);"This is ";colou r$(fore%);" on ";colour$(back%);"." 520IF lines%=20 THEN PROCspace:CLS:lin es%=0 530NEXT 540NEXT 550IF lines%<>0 THEN PROCspace 560ENDPROC 570: 580DEF PROCspace 590PRINT'"Press SPACE to continue..."; 600*FX21 610REPEAT UNTIL GET=32 620ENDPROC