Difference between revisions of "VDU 19"
m (1 revision) |
(update) |
||
Line 6: | Line 6: | ||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| [[BASIC metasyntax|Syntax]] | | [[BASIC metasyntax|Syntax]] | ||
− | | <code>VDU 19,<logical>,<physical>, | + | | <code>VDU 19,</code><logical><code>,</code><physical><code>,</code><red><code>,</code><green><code>,</code><blue> |
− | |||
− | |||
− | |||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| Character stream (hex) | | Character stream (hex) | ||
− | | <code>13</code> <logical> <physical> < | + | | <code>13</code> <logical> <physical> <red> <green> <blue> |
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
| Description | | Description | ||
Line 19: | Line 16: | ||
== Description == | == Description == | ||
− | |||
<code>VDU 19</code>, sets the logical colour, used in a GCOL ([[VDU 18]]) or | <code>VDU 19</code>, sets the logical colour, used in a GCOL ([[VDU 18]]) or | ||
a COLOUR ([[VDU 17]]) to the provided physical colour. On the 8-bit | 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 | 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 | + | colour mode, as shown below, and the red, green and blue parameters are |
− | 8-bit systems, the individual red/green/blue colour levels can be set with | + | given as zero. 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. | the last three parameters. | ||
Revision as of 14:53, 8 March 2015
Define Logical Colour.
Syntax | VDU 19, <logical>, <physical>, <red>, <green>, <blue>
|
Character stream (hex) | 13 <logical> <physical> <red> <green> <blue>
|
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, and the red, green and blue parameters are
given as zero. 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,p
sends VDU 19,l,p,0,0,0 -
COLOUR l,r,g,b
sends VDU 19,l,16,r,g,b
--Tautology 13:10, 1 May 2011 (UTC)