Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

351 16 This code ( VDU16 or CTRL P ) clears the graphics area of the screen to the graphics background colour and the BASIC statement CLG has exactly the same effect. The graphics background colour starts off as black but may have been changed with the GCOL statement. VDU16 does not move the graphics cursor – it just clears the graphics area of the screen. 17 VDU17 is used to change the text foreground and background colours. In BASIC the statement COLOUR is used for an identical purpose. VDU17 is followed by one number which determines the new colour. See the BASIC keyword COLOUR for more details. 18 This code allows the definition of the graphics foreground and background colours.

It also specifies how the colour is to be placed on the screen. The colour can be plotted directly, ANDed, ORed or Exclusive-ORed with the colour already there, or the colour there can be inverted. In BASIC this is called GCOL . The first byte specifies the mode of action as follows: 0 Plot the colour specified. 1 OR the specified colour with that already there. 2 AND the specified colour with that already there. 3 Exclusive-OR the specified colour with that already there. 4 Invert the colour already there. The second byte defines the logical colour to be used in future. If the byte is greater than 127 then it defines the graphics background colour (modulo the number of colours available).

If the byte is less than 128 then it defines the graphics foreground colour (modulo the number of colours available). 19 This code is used to select the actual colour that is to be displayed for each logical colour. The statements COLOUR (and GCOL ) are used to select the logical colour that is to be text (and graphics) in the immediate future. However the actual colour can be redefined with VDU19 . For example MODE 5 COLOUR 1 will print all text in colour 1 which is red by default. However the addition of VDU 19,1,4,0,0,0 or VDU 19,1,4;0; will set logical colour 1 to actual colour 4 (blue). The three zeros after the actual colour in the VDU19 statement are for future expansion.