45 8 Introducing graphics Modes, colours, graphics and windows The BBC Microcomputer can display text and windows in eight different screen modes. Only one mode can be used at a time. When the computer is turned on, and also when the BREAK key is pressed, it is in MODE 7 . MODE 7 will display text (40 columns and 32 rows) and/or graphics. MODE 7 differs from all the other modes in many ways and a whole chapter (chapter 28) has been devoted to it. In particular it is not easy to draw lines or triangles in MODE7 and the colour of the text is changed in a different way. Finally some characters are displayed on the screen differently in this mode – for example the character [ is displayed as 8 .
The description that follows assumes that you are in MODE 5 . To enter MODE 5 , simply type MODE 5 RETURN Note that pressing BREAK will return you to MODE 7 so avoid using BREAK . The ‘panic button’ is marked ESCAPE . If you press this the computer will stop what it is doing and return control to you. MODE 5 is a four colour mode which means that up to four different colours can be shown on the screen at any time. When you enter MODE 5 two ‘colours’ are displayed – white letters on a black background. As you will be aware from earlier chapters the colour of the text can be changed by using the COLOUR statement, and since this is a four colour mode you can select from:
COLOUR 0 Black COLOUR 1 Red COLOUR 2 Yellow COLOUR 3 White The same four colours (black, red, yellow and white) may be selected for the background with the commands: COLOUR 128 (128+0) Black COLOUR 129 (128+1) Red COLOUR 130 (128+2) Yellow COLOUR 131 (128+3) White The colour can be used to change the colour of the text foreground and