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

144 Other values of the first number following GCOL enable the logical colour to be plotted to be ANDed, ORed or Exclusive-ORed with the logical colour presently on the screen. The user is referred to the BASIC keywords chapter for a description of AND , OR and EOR but the following examples may help. In MODE 5 with the background set to red by the following statements MODE 5 GCOL 0,129 CLG an attempt to draw a yellow line ORed with the background colour by using the statement GCOL 1,2 would in fact produce a white line since the background logical colour is 1 and the new line is to be drawn in logical colour (1 OR 2) ie logical colour 3.

The same principles apply to GCOL 2 , which ANDs the new colour with the previously displayed logical colour and to GCOL 3 , which Exclusive-ORs the colours together. Obviously, an understanding of AND, OR and EOR is required before all the GCOL statements can be used. The effects which can be produced are very useful when it comes to producing sophisticated animations. How to plot a point on the screen The PLOT command can also be used to plot points. Type MODE 4 (which is a two colour MODE ) and type PLOT 69,500,500 This will plot a point in white at coordinates X=500, Y=500. Type PLOT 69,600,500 and another point will appear at X=600, Y=500.

How to remove a point selectively Typing CLG would clear the whole graphics area. However, instead of CLG , type PLOT 70,500,500 and you will see that one of the points has gone. This is because PLOT 70 prints the ‘inverse’ colour at the given point. This is particularly useful when ‘animating’, for example, a point (see below). In MODE 4 the ‘inverse’ of logical colour 1 is logical colour 0.