RTR logo


BBC BASIC (86) Manual

Teletext MODE7

Annex H to


MODE7.COM is a resident utility which creates a new Viewdata/Teletext compatible display mode. This new mode is similar to the one used by Prestel and Teletext and consists of 25 rows of 40 characters.

MODE7.COM requires an EGA with at least 128K of RAM, a VGA or an SVGA.

Because of differences in the hardware available, the following versions of the Viewdata emulator are provided:

MODE7.COM This is the 'standard' version of the emulator. It is for a computer fitted with an EGA or a standard VGA or SVGA.
MODE7B.COM   This version is for a computer fitted with a non-standard VGA or SVGA.

Installing MODE7.COM

Provided MODE7.COM is in the current directory or the directory search path, you may install it by typing:
from the MS-DOS prompt. If it is not in the current directory or directory search path, you will need to enter the full path name.

MODE7.COM uses up about 3K of memory which will be released only on re-booting MS-DOS (or returning to Microsoft WindowsTM).

The Viewdata display modeis not immediately active; it will usually be activated from an application program (BBCBASIC(86), for example), but it may be selected for test purposes, etc by entering:

from the MS-DOS prompt. SETMODE7.COM must be in the current directory or the directory search path or you will need to use the full path name.

You can return to the normal mode by typing

MODE CO80<Enter>
MODE7.COM may be loaded from within BBCBASIC(86), but since it is memory resident it will leave a large 'hole' in memory when BBCBASIC(86) is exited.


MODE7.COM emulates the SAA5050 chip in the BBC Micro, and the level of functionality is approximately the same as the BBC Micro MODE 7. For example, the START BOX and END BOX codes are not recognised (they are intended for inserting text into a TV picture) and there is no REVEAL command.

All Viewdata display features other than those mentioned in this Annex are provided as specified in the Broadcast Teletext Specification (September 1976). These include colour, graphics (contiguous and separated), background colour, flashing, double-height (text and graphics) and held-graphics.

Character Set

The full Viewdata (UK) character set is supported; note particularly that the code normally corresponding to backslash (and used by MS-DOS as a directory delimiter) displays as the fraction ½.

As with the BBC Micro MODE 7, the ASCII codes for # (hash) £ (pound) and _ (underscore) are 'shuffled' so as to display as expected, rather than using the Viewdata codes. To force use of the standard Viewdata codes (such as would be required for displaying a Prestel or Teletext page) set bit 7 of the stored characters.


To reveal concealed text, an applications program must change all CONCEAL characters to something innocuous (e.g. <Escape>).

The two procedures below are taken from the demonstration program 'MODE7DEM.BBC'. The first procedure converts all Conceal characters to Escape characters. The second converts all Escape characters to Conceal characters.

180 DEF PROCreveal
190 X%=POS:Y%=VPOS:VDU 30
200 FOR N%=1 TO 24*40
210   IF (&FF00 AND USR&FFF4)DIV256=&98 VDU &9B ELSE VDU 9
220 NEXT
230 PRINTTAB(X%,Y%);
250 :
260 :
270 DEF PROCconceal
280 X%=POS:Y%=VPOS:VDU 30
290 FOR N%=1 TO 24*40
300   IF (&FF00 AND USR&FFF4)DIV256=&9B VDU &98 ELSE VDU 9
310 NEXT
320 PRINTTAB(X%,Y%);

Double Height Characters

To obtain double-height text or graphics, two consecutive display rows should contain identical data; the characters in the first row are not automatically duplicated in the second as would be the case in a conventional hardware implementation. Again, this is the same as the BBC Micro and is what BBC BASIC expects. It has the advantage of allowing special effects such as the top and bottom halves of double-height characters being in different colours. Software drivers for Prestel or Teletext must take account of this feature and carry out the duplication themselves.


HOME Right

Best viewed with Any Browser Valid HTML 3.2!
© Doug Mounter and Richard Russell 1999