Personal Computer News


Multicoloured Dragon Mixes

 
Published in Personal Computer News #056

Multicoloured Dragon Mixes

This microwave was printed in Issue 55 without the routine. Here is the complete item:

The Dragon 32 is quoted as having 8-colour graphics. In practice, four colours are the most you can expect on one screen. The routine below demonstrates a number of different colours not generally available which can be used as backgrounds on the high resolution screens. The routine produces at least six new colours by mixing those already available.

The program is just a demonstration to show how colours are mixed. It is possible to mix three colours to form many more combinations. The routine can be incorporated into a program to give backgrounds of any desired colour.

 10 REM COLOUR MIXER
 20 PMODE 3,1:PCLS:CLS
 30 INPUT"FIRST COLOUR TO MIX:";C1:C1=INT(C1)
 40 INPUT"SECOND COLOUR TO MIX:";C2:C2=INT(C2)
 50 IF C2>8 OR IF C1>8 THEN PRINT"MUST BE LESS THAN 9":GOTO 30
 60 IF SGN(C1-4.5)<>SGN(C2-4.5)THEN PRINT"IMPOSSIBLE TO MIX - TRY AGAIN":GOTO 30
 70 IF C2<0 OR C1<0 THEN PRINT"MUST BE GREATER THAN 0":GOTO 30
 80 IF C1>4 THEN SCREEN 1,1 ELSE SCREEN 1,0
 90 FOR N=1 TO 192 STEP 2
100 DRAW"C"+STR$(C1)
110 DRAW"BM0,"+STR$(N)+"R255"
120 DRAW"C"+STR$(C2)
130 DRAW"BM0,"+STR$(N+1)+"R255"
140 NEXT N
150 GOTO 150

Stephen McCoy
Wantage, Oxon

Stephen McCoy