VDU 19
From BeebWiki
Define Logical Colour.
| Syntax | VDU 19,<logical>,<physical>,0,0,0
|
| Keyboard equivalent | CTRL S |
| Character stream (hex) | 13 <logical> <physical> r g b
|
| Description | Set the logical colour <logical> to be the physical colour <physical>. |
Description
VDU 19, sets the logical colour, used in a GCOL (VDU 18) or
a COLOUR (VDU 17) to the provided physical colour. On the 8-bit
machines, the physical colour list is the same as the default for a 16
colour mode, as shown below. On 32-bit systems and compatible extensions for
8-bit systems, the individual red/green/blue colour levels can be set with
the last three parameters.
| Logical colour | Physical colour |
|---|---|
| 0 | Black |
| 1 | Red |
| 2 | Green |
| 3 | Yellow |
| 4 | Blue |
| 5 | Magenta |
| 6 | Cyan |
| 7 | White |
| 8 | Flashing black/white |
| 9 | Flashing red/cyan |
| 10 | Flashing green/magenta |
| 11 | Flashing yellow/blue |
| 12 | Flashing blue/yellow |
| 13 | Flashing magenta/green |
| 14 | Flashing cyan/red |
| 15 | Flashing white/black |
The logical colour value is MODed by the number of colours in the mode, so in a four colour mode, defining colour 4 will alter colour 0.
On a BBC Micro, this VDU call performs similar to OSBYTE &9B and will update the ULA colour registers. It will automatically invert the physical colour value as required by the ULA.
Calling from BBC BASIC
On BASIC V and later:
-
COLOUR l,psends VDU 19,l,p,0,0,0 -
COLOUR l,r,g,bsends VDU 19,l,16,r,g,b
--Tautology 13:10, 1 May 2011 (UTC)

